2 * Copyright (c) 2000-2003,2005 Silicon Graphics, Inc.
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU General Public License as
7 * published by the Free Software Foundation.
9 * This program is distributed in the hope that it would be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write the Free Software Foundation,
16 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
20 #include "xfs_types.h"
24 #include "xfs_da_btree.h"
25 #include "xfs_bmap_btree.h"
26 #include "xfs_dir_sf.h"
27 #include "xfs_dir2_sf.h"
28 #include "xfs_attr_sf.h"
29 #include "xfs_dinode.h"
30 #include "xfs_inode.h"
31 #include "xfs_dir2_trace.h"
34 ktrace_t
*xfs_dir2_trace_buf
;
37 * Enter something in the trace buffers.
57 ASSERT(xfs_dir2_trace_buf
);
58 ASSERT(dp
->i_dir_trace
);
60 memcpy(n
, name
, min((int)sizeof(n
), namelen
));
62 memset((char *)n
, 0, sizeof(n
));
63 ktrace_enter(xfs_dir2_trace_buf
,
64 (void *)(long)type
, (void *)where
,
65 (void *)a0
, (void *)a1
, (void *)a2
, (void *)a3
,
66 (void *)a4
, (void *)a5
, (void *)a6
, (void *)a7
,
67 (void *)(long)namelen
,
68 (void *)n
[0], (void *)n
[1], (void *)n
[2],
69 (void *)n
[3], (void *)n
[4]);
70 ktrace_enter(dp
->i_dir_trace
,
71 (void *)(long)type
, (void *)where
,
72 (void *)a0
, (void *)a1
, (void *)a2
, (void *)a3
,
73 (void *)a4
, (void *)a5
, (void *)a6
, (void *)a7
,
74 (void *)(long)namelen
,
75 (void *)n
[0], (void *)n
[1], (void *)n
[2],
76 (void *)n
[3], (void *)n
[4]);
84 xfs_dir2_trace_enter(args
->dp
, XFS_DIR2_KTRACE_ARGS
, where
,
85 (char *)args
->name
, (int)args
->namelen
,
86 (void *)(unsigned long)args
->hashval
,
87 (void *)((unsigned long)(args
->inumber
>> 32)),
88 (void *)((unsigned long)(args
->inumber
& 0xFFFFFFFF)),
89 (void *)args
->dp
, (void *)args
->trans
,
90 (void *)(unsigned long)args
->justcheck
, NULL
, NULL
);
94 xfs_dir2_trace_args_b(
99 xfs_dir2_trace_enter(args
->dp
, XFS_DIR2_KTRACE_ARGS_B
, where
,
100 (char *)args
->name
, (int)args
->namelen
,
101 (void *)(unsigned long)args
->hashval
,
102 (void *)((unsigned long)(args
->inumber
>> 32)),
103 (void *)((unsigned long)(args
->inumber
& 0xFFFFFFFF)),
104 (void *)args
->dp
, (void *)args
->trans
,
105 (void *)(unsigned long)args
->justcheck
,
106 (void *)(bp
? bp
->bps
[0] : NULL
), NULL
);
110 xfs_dir2_trace_args_bb(
116 xfs_dir2_trace_enter(args
->dp
, XFS_DIR2_KTRACE_ARGS_BB
, where
,
117 (char *)args
->name
, (int)args
->namelen
,
118 (void *)(unsigned long)args
->hashval
,
119 (void *)((unsigned long)(args
->inumber
>> 32)),
120 (void *)((unsigned long)(args
->inumber
& 0xFFFFFFFF)),
121 (void *)args
->dp
, (void *)args
->trans
,
122 (void *)(unsigned long)args
->justcheck
,
123 (void *)(lbp
? lbp
->bps
[0] : NULL
),
124 (void *)(dbp
? dbp
->bps
[0] : NULL
));
128 xfs_dir2_trace_args_bibii(
137 xfs_buf_t
*bpbs
= bs
? bs
->bps
[0] : NULL
;
138 xfs_buf_t
*bpbd
= bd
? bd
->bps
[0] : NULL
;
140 xfs_dir2_trace_enter(args
->dp
, XFS_DIR2_KTRACE_ARGS_BIBII
, where
,
141 (char *)args
->name
, (int)args
->namelen
,
142 (void *)args
->dp
, (void *)args
->trans
,
143 (void *)bpbs
, (void *)(long)ss
, (void *)bpbd
, (void *)(long)sd
,
144 (void *)(long)c
, NULL
);
148 xfs_dir2_trace_args_db(
154 xfs_buf_t
*dbp
= bp
? bp
->bps
[0] : NULL
;
156 xfs_dir2_trace_enter(args
->dp
, XFS_DIR2_KTRACE_ARGS_DB
, where
,
157 (char *)args
->name
, (int)args
->namelen
,
158 (void *)(unsigned long)args
->hashval
,
159 (void *)((unsigned long)(args
->inumber
>> 32)),
160 (void *)((unsigned long)(args
->inumber
& 0xFFFFFFFF)),
161 (void *)args
->dp
, (void *)args
->trans
,
162 (void *)(unsigned long)args
->justcheck
, (void *)(long)db
,
167 xfs_dir2_trace_args_i(
172 xfs_dir2_trace_enter(args
->dp
, XFS_DIR2_KTRACE_ARGS_I
, where
,
173 (char *)args
->name
, (int)args
->namelen
,
174 (void *)(unsigned long)args
->hashval
,
175 (void *)((unsigned long)(args
->inumber
>> 32)),
176 (void *)((unsigned long)(args
->inumber
& 0xFFFFFFFF)),
177 (void *)args
->dp
, (void *)args
->trans
,
178 (void *)(unsigned long)args
->justcheck
,
179 (void *)((unsigned long)(i
>> 32)),
180 (void *)((unsigned long)(i
& 0xFFFFFFFF)));
184 xfs_dir2_trace_args_s(
189 xfs_dir2_trace_enter(args
->dp
, XFS_DIR2_KTRACE_ARGS_S
, where
,
190 (char *)args
->name
, (int)args
->namelen
,
191 (void *)(unsigned long)args
->hashval
,
192 (void *)((unsigned long)(args
->inumber
>> 32)),
193 (void *)((unsigned long)(args
->inumber
& 0xFFFFFFFF)),
194 (void *)args
->dp
, (void *)args
->trans
,
195 (void *)(unsigned long)args
->justcheck
, (void *)(long)s
, NULL
);
199 xfs_dir2_trace_args_sb(
205 xfs_buf_t
*dbp
= bp
? bp
->bps
[0] : NULL
;
207 xfs_dir2_trace_enter(args
->dp
, XFS_DIR2_KTRACE_ARGS_SB
, where
,
208 (char *)args
->name
, (int)args
->namelen
,
209 (void *)(unsigned long)args
->hashval
,
210 (void *)((unsigned long)(args
->inumber
>> 32)),
211 (void *)((unsigned long)(args
->inumber
& 0xFFFFFFFF)),
212 (void *)args
->dp
, (void *)args
->trans
,
213 (void *)(unsigned long)args
->justcheck
, (void *)(long)s
,
216 #endif /* XFS_DIR2_TRACE */