Linux 2.6.28-rc5
[cris-mirror.git] / fs / xfs / xfs_dir2_trace.h
blobca3c754f48229a5017dff01f503eb1b789906b48
1 /*
2 * Copyright (c) 2000,2005 Silicon Graphics, Inc.
3 * All Rights Reserved.
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
18 #ifndef __XFS_DIR2_TRACE_H__
19 #define __XFS_DIR2_TRACE_H__
22 * Tracing for xfs v2 directories.
25 #if defined(XFS_DIR2_TRACE)
27 struct ktrace;
28 struct xfs_dabuf;
29 struct xfs_da_args;
31 #define XFS_DIR2_GTRACE_SIZE 4096 /* global buffer */
32 #define XFS_DIR2_KTRACE_SIZE 32 /* per-inode buffer */
33 extern struct ktrace *xfs_dir2_trace_buf;
35 #define XFS_DIR2_KTRACE_ARGS 1 /* args only */
36 #define XFS_DIR2_KTRACE_ARGS_B 2 /* args + buffer */
37 #define XFS_DIR2_KTRACE_ARGS_BB 3 /* args + 2 buffers */
38 #define XFS_DIR2_KTRACE_ARGS_DB 4 /* args, db, buffer */
39 #define XFS_DIR2_KTRACE_ARGS_I 5 /* args, inum */
40 #define XFS_DIR2_KTRACE_ARGS_S 6 /* args, int */
41 #define XFS_DIR2_KTRACE_ARGS_SB 7 /* args, int, buffer */
42 #define XFS_DIR2_KTRACE_ARGS_BIBII 8 /* args, buf/int/buf/int/int */
44 void xfs_dir2_trace_args(char *where, struct xfs_da_args *args);
45 void xfs_dir2_trace_args_b(char *where, struct xfs_da_args *args,
46 struct xfs_dabuf *bp);
47 void xfs_dir2_trace_args_bb(char *where, struct xfs_da_args *args,
48 struct xfs_dabuf *lbp, struct xfs_dabuf *dbp);
49 void xfs_dir2_trace_args_bibii(char *where, struct xfs_da_args *args,
50 struct xfs_dabuf *bs, int ss,
51 struct xfs_dabuf *bd, int sd, int c);
52 void xfs_dir2_trace_args_db(char *where, struct xfs_da_args *args,
53 xfs_dir2_db_t db, struct xfs_dabuf *bp);
54 void xfs_dir2_trace_args_i(char *where, struct xfs_da_args *args, xfs_ino_t i);
55 void xfs_dir2_trace_args_s(char *where, struct xfs_da_args *args, int s);
56 void xfs_dir2_trace_args_sb(char *where, struct xfs_da_args *args, int s,
57 struct xfs_dabuf *bp);
59 #else /* XFS_DIR2_TRACE */
61 #define xfs_dir2_trace_args(where, args)
62 #define xfs_dir2_trace_args_b(where, args, bp)
63 #define xfs_dir2_trace_args_bb(where, args, lbp, dbp)
64 #define xfs_dir2_trace_args_bibii(where, args, bs, ss, bd, sd, c)
65 #define xfs_dir2_trace_args_db(where, args, db, bp)
66 #define xfs_dir2_trace_args_i(where, args, i)
67 #define xfs_dir2_trace_args_s(where, args, s)
68 #define xfs_dir2_trace_args_sb(where, args, s, bp)
70 #endif /* XFS_DIR2_TRACE */
72 #endif /* __XFS_DIR2_TRACE_H__ */