| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1 | /* | 
| Nathan Scott | 7b71876 | 2005-11-02 14:58:39 +1100 | [diff] [blame] | 2 | * Copyright (c) 2000,2005 Silicon Graphics, Inc. | 
|  | 3 | * All Rights Reserved. | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 4 | * | 
| Nathan Scott | 7b71876 | 2005-11-02 14:58:39 +1100 | [diff] [blame] | 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 | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 7 | * published by the Free Software Foundation. | 
|  | 8 | * | 
| Nathan Scott | 7b71876 | 2005-11-02 14:58:39 +1100 | [diff] [blame] | 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. | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 13 | * | 
| Nathan Scott | 7b71876 | 2005-11-02 14:58:39 +1100 | [diff] [blame] | 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 | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 17 | */ | 
|  | 18 | #ifndef __XFS_DIR2_TRACE_H__ | 
|  | 19 | #define __XFS_DIR2_TRACE_H__ | 
|  | 20 |  | 
|  | 21 | /* | 
|  | 22 | * Tracing for xfs v2 directories. | 
|  | 23 | */ | 
|  | 24 |  | 
|  | 25 | #if defined(XFS_DIR2_TRACE) | 
|  | 26 |  | 
|  | 27 | struct ktrace; | 
|  | 28 | struct xfs_dabuf; | 
|  | 29 | struct xfs_da_args; | 
|  | 30 |  | 
|  | 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; | 
|  | 34 |  | 
|  | 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 */ | 
|  | 43 |  | 
|  | 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); | 
|  | 58 |  | 
|  | 59 | #else	/* XFS_DIR2_TRACE */ | 
|  | 60 |  | 
|  | 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) | 
|  | 69 |  | 
|  | 70 | #endif	/* XFS_DIR2_TRACE */ | 
|  | 71 |  | 
|  | 72 | #endif	/* __XFS_DIR2_TRACE_H__ */ |