2 * Copyright (c) 2000-2003 Silicon Graphics, Inc. All Rights Reserved.
4 * This program is free software; you can redistribute it and/or modify it
5 * under the terms of version 2 of the GNU General Public License as
6 * published by the Free Software Foundation.
8 * This program is distributed in the hope that it would be useful, but
9 * WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
12 * Further, this software is distributed without any warranty that it is
13 * free of the rightful claim of any third person regarding infringement
14 * or the like. Any license provided herein, whether implied or
15 * otherwise, applies only to this software file. Patent licenses, if
16 * any, provided herein do not apply to combinations of this program with
17 * other software, or any other product whatsoever.
19 * You should have received a copy of the GNU General Public License along
20 * with this program; if not, write the Free Software Foundation, Inc., 59
21 * Temple Place - Suite 330, Boston MA 02111-1307, USA.
23 * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
24 * Mountain View, CA 94043, or:
28 * For further information regarding this notice, see:
30 * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/
34 #include "xfs_types.h"
38 #include "xfs_da_btree.h"
39 #include "xfs_bmap_btree.h"
40 #include "xfs_dir_sf.h"
41 #include "xfs_dir2_sf.h"
42 #include "xfs_attr_sf.h"
43 #include "xfs_dinode.h"
44 #include "xfs_inode.h"
45 #include "xfs_dir2_trace.h"
48 ktrace_t *xfs_dir2_trace_buf;
51 * Enter something in the trace buffers.
71 ASSERT(xfs_dir2_trace_buf);
72 ASSERT(dp->i_dir_trace);
74 memcpy(n, name, min((int)sizeof(n), namelen));
76 memset((char *)n, 0, sizeof(n));
77 ktrace_enter(xfs_dir2_trace_buf,
78 (void *)(long)type, (void *)where,
79 (void *)a0, (void *)a1, (void *)a2, (void *)a3,
80 (void *)a4, (void *)a5, (void *)a6, (void *)a7,
81 (void *)(long)namelen,
82 (void *)n[0], (void *)n[1], (void *)n[2],
83 (void *)n[3], (void *)n[4]);
84 ktrace_enter(dp->i_dir_trace,
85 (void *)(long)type, (void *)where,
86 (void *)a0, (void *)a1, (void *)a2, (void *)a3,
87 (void *)a4, (void *)a5, (void *)a6, (void *)a7,
88 (void *)(long)namelen,
89 (void *)n[0], (void *)n[1], (void *)n[2],
90 (void *)n[3], (void *)n[4]);
98 xfs_dir2_trace_enter(args->dp, XFS_DIR2_KTRACE_ARGS, where,
99 (char *)args->name, (int)args->namelen,
100 (void *)(unsigned long)args->hashval,
101 (void *)((unsigned long)(args->inumber >> 32)),
102 (void *)((unsigned long)(args->inumber & 0xFFFFFFFF)),
103 (void *)args->dp, (void *)args->trans,
104 (void *)(unsigned long)args->justcheck, NULL, NULL);
108 xfs_dir2_trace_args_b(
113 xfs_dir2_trace_enter(args->dp, XFS_DIR2_KTRACE_ARGS_B, where,
114 (char *)args->name, (int)args->namelen,
115 (void *)(unsigned long)args->hashval,
116 (void *)((unsigned long)(args->inumber >> 32)),
117 (void *)((unsigned long)(args->inumber & 0xFFFFFFFF)),
118 (void *)args->dp, (void *)args->trans,
119 (void *)(unsigned long)args->justcheck,
120 (void *)(bp ? bp->bps[0] : NULL), NULL);
124 xfs_dir2_trace_args_bb(
130 xfs_dir2_trace_enter(args->dp, XFS_DIR2_KTRACE_ARGS_BB, where,
131 (char *)args->name, (int)args->namelen,
132 (void *)(unsigned long)args->hashval,
133 (void *)((unsigned long)(args->inumber >> 32)),
134 (void *)((unsigned long)(args->inumber & 0xFFFFFFFF)),
135 (void *)args->dp, (void *)args->trans,
136 (void *)(unsigned long)args->justcheck,
137 (void *)(lbp ? lbp->bps[0] : NULL),
138 (void *)(dbp ? dbp->bps[0] : NULL));
142 xfs_dir2_trace_args_bibii(
151 xfs_buf_t *bpbs = bs ? bs->bps[0] : NULL;
152 xfs_buf_t *bpbd = bd ? bd->bps[0] : NULL;
154 xfs_dir2_trace_enter(args->dp, XFS_DIR2_KTRACE_ARGS_BIBII, where,
155 (char *)args->name, (int)args->namelen,
156 (void *)args->dp, (void *)args->trans,
157 (void *)bpbs, (void *)(long)ss, (void *)bpbd, (void *)(long)sd,
158 (void *)(long)c, NULL);
162 xfs_dir2_trace_args_db(
168 xfs_buf_t *dbp = bp ? bp->bps[0] : NULL;
170 xfs_dir2_trace_enter(args->dp, XFS_DIR2_KTRACE_ARGS_DB, where,
171 (char *)args->name, (int)args->namelen,
172 (void *)(unsigned long)args->hashval,
173 (void *)((unsigned long)(args->inumber >> 32)),
174 (void *)((unsigned long)(args->inumber & 0xFFFFFFFF)),
175 (void *)args->dp, (void *)args->trans,
176 (void *)(unsigned long)args->justcheck, (void *)(long)db,
181 xfs_dir2_trace_args_i(
186 xfs_dir2_trace_enter(args->dp, XFS_DIR2_KTRACE_ARGS_I, where,
187 (char *)args->name, (int)args->namelen,
188 (void *)(unsigned long)args->hashval,
189 (void *)((unsigned long)(args->inumber >> 32)),
190 (void *)((unsigned long)(args->inumber & 0xFFFFFFFF)),
191 (void *)args->dp, (void *)args->trans,
192 (void *)(unsigned long)args->justcheck,
193 (void *)((unsigned long)(i >> 32)),
194 (void *)((unsigned long)(i & 0xFFFFFFFF)));
198 xfs_dir2_trace_args_s(
203 xfs_dir2_trace_enter(args->dp, XFS_DIR2_KTRACE_ARGS_S, where,
204 (char *)args->name, (int)args->namelen,
205 (void *)(unsigned long)args->hashval,
206 (void *)((unsigned long)(args->inumber >> 32)),
207 (void *)((unsigned long)(args->inumber & 0xFFFFFFFF)),
208 (void *)args->dp, (void *)args->trans,
209 (void *)(unsigned long)args->justcheck, (void *)(long)s, NULL);
213 xfs_dir2_trace_args_sb(
219 xfs_buf_t *dbp = bp ? bp->bps[0] : NULL;
221 xfs_dir2_trace_enter(args->dp, XFS_DIR2_KTRACE_ARGS_SB, where,
222 (char *)args->name, (int)args->namelen,
223 (void *)(unsigned long)args->hashval,
224 (void *)((unsigned long)(args->inumber >> 32)),
225 (void *)((unsigned long)(args->inumber & 0xFFFFFFFF)),
226 (void *)args->dp, (void *)args->trans,
227 (void *)(unsigned long)args->justcheck, (void *)(long)s,
230 #endif /* XFS_DIR2_TRACE */