On Tue, Jul 29, 2008 at 09:30:44PM +0200, Christoph Hellwig wrote:
> make the existing bmap btree tracing generic so that it applies to all
> btree types.
>
> Some fragments lifted from a patch by Dave Chinner.
>
>
> Signed-off-by: Christoph Hellwig <hch@xxxxxx>
>
> Index: linux-2.6-xfs/fs/xfs/xfs_btree.h
> ===================================================================
> --- linux-2.6-xfs.orig/fs/xfs/xfs_btree.h 2008-07-29 16:23:23.000000000
> +0200
> +++ linux-2.6-xfs/fs/xfs/xfs_btree.h 2008-07-29 16:52:06.000000000 +0200
> @@ -190,6 +190,25 @@ struct xfs_btree_ops {
>
> /* get inode rooted btree root */
> struct xfs_btree_block *(*get_root_from_inode)(struct xfs_btree_cur *);
> +
> + /* btree tracing */
> +#ifdef XFS_BTREE_TRACE
> + void (*trace_enter)(struct xfs_btree_cur *, const char *,
> + char *, int, int, __psunsigned_t,
> + __psunsigned_t, __psunsigned_t,
> + __psunsigned_t, __psunsigned_t,
> + __psunsigned_t, __psunsigned_t,
> + __psunsigned_t, __psunsigned_t,
> + __psunsigned_t, __psunsigned_t);
Would it be better to use a 'trace args' structure here rather
than passing a heap of parameters? memset(args, 0,...) rather than
passing a whole heap of zeros in most cases seems like a better
approach to me, esp. as they all get cast to (void *) anyway....
> +static void
> +xfsidb_btree_trace_record(
shouldn't these all use "xfsidbg" prefixes?
Otherwise looks ok.
Cheers,
Dave.
--
Dave Chinner
david@xxxxxxxxxxxxx
|