ftp://ftp.kernel.org/pub/linux/kernel/v2.6/linux-2.6.6.tar.bz2
[linux-2.6.git] / fs / xfs / xfs_dir2_trace.h
1 /*
2  * Copyright (c) 2000 Silicon Graphics, Inc.  All Rights Reserved.
3  *
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.
7  *
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.
11  *
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.
18  *
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.
22  *
23  * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
24  * Mountain View, CA  94043, or:
25  *
26  * http://www.sgi.com
27  *
28  * For further information regarding this notice, see:
29  *
30  * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/
31  */
32 #ifndef __XFS_DIR2_TRACE_H__
33 #define __XFS_DIR2_TRACE_H__
34
35 /*
36  * Tracing for xfs v2 directories.
37  */
38
39 #if defined(XFS_DIR2_TRACE)
40
41 struct ktrace;
42 struct xfs_dabuf;
43 struct xfs_da_args;
44
45 #define XFS_DIR2_GTRACE_SIZE            4096    /* global buffer */
46 #define XFS_DIR2_KTRACE_SIZE            32      /* per-inode buffer */
47 extern struct ktrace *xfs_dir2_trace_buf;
48
49 #define XFS_DIR2_KTRACE_ARGS            1       /* args only */
50 #define XFS_DIR2_KTRACE_ARGS_B          2       /* args + buffer */
51 #define XFS_DIR2_KTRACE_ARGS_BB         3       /* args + 2 buffers */
52 #define XFS_DIR2_KTRACE_ARGS_DB         4       /* args, db, buffer */
53 #define XFS_DIR2_KTRACE_ARGS_I          5       /* args, inum */
54 #define XFS_DIR2_KTRACE_ARGS_S          6       /* args, int */
55 #define XFS_DIR2_KTRACE_ARGS_SB         7       /* args, int, buffer */
56 #define XFS_DIR2_KTRACE_ARGS_BIBII      8       /* args, buf/int/buf/int/int */
57
58 void xfs_dir2_trace_args(char *where, struct xfs_da_args *args);
59 void xfs_dir2_trace_args_b(char *where, struct xfs_da_args *args,
60                            struct xfs_dabuf *bp);
61 void xfs_dir2_trace_args_bb(char *where, struct xfs_da_args *args,
62                             struct xfs_dabuf *lbp, struct xfs_dabuf *dbp);
63 void xfs_dir2_trace_args_bibii(char *where, struct xfs_da_args *args,
64                                struct xfs_dabuf *bs, int ss,
65                                struct xfs_dabuf *bd, int sd, int c);
66 void xfs_dir2_trace_args_db(char *where, struct xfs_da_args *args,
67                             xfs_dir2_db_t db, struct xfs_dabuf *bp);
68 void xfs_dir2_trace_args_i(char *where, struct xfs_da_args *args, xfs_ino_t i);
69 void xfs_dir2_trace_args_s(char *where, struct xfs_da_args *args, int s);
70 void xfs_dir2_trace_args_sb(char *where, struct xfs_da_args *args, int s,
71                             struct xfs_dabuf *bp);
72
73 #else   /* XFS_DIR2_TRACE */
74
75 #define xfs_dir2_trace_args(where, args)
76 #define xfs_dir2_trace_args_b(where, args, bp)
77 #define xfs_dir2_trace_args_bb(where, args, lbp, dbp)
78 #define xfs_dir2_trace_args_bibii(where, args, bs, ss, bd, sd, c)
79 #define xfs_dir2_trace_args_db(where, args, db, bp)
80 #define xfs_dir2_trace_args_i(where, args, i)
81 #define xfs_dir2_trace_args_s(where, args, s)
82 #define xfs_dir2_trace_args_sb(where, args, s, bp)
83
84 #endif  /* XFS_DIR2_TRACE */
85
86 #endif  /* __XFS_DIR2_TRACE_H__ */