diff options
| author | Linus Torvalds <[email protected]> | 2012-03-28 15:23:52 -0700 | 
|---|---|---|
| committer | Linus Torvalds <[email protected]> | 2012-03-28 15:23:52 -0700 | 
| commit | f21ce8f8447c8be8847dadcfdbcc76b0d7365fa5 (patch) | |
| tree | fb51d60060453aef9e776c7d3a31588609d34d76 /fs/xfs/xfs_attr_leaf.c | |
| parent | 0c9aac08261512d70d7d4817bd222abca8b6bdd6 (diff) | |
| parent | 5a5881cdeec2c019b5c9a307800218ee029f7f61 (diff) | |
Merge branch 'for-linus' of git://oss.sgi.com/xfs/xfs
Pull XFS update (part 2) from Ben Myers:
 "Fixes for tracing of xfs_name strings, flag handling in
  open_by_handle, a log space hang with freeze/unfreeze, fstrim offset
  calculations, a section mismatch with xfs_qm_exit, an oops in
  xlog_recover_process_iunlinks, and a deadlock in xfs_rtfree_extent.
  There are also additional trace points for attributes, and the
  addition of a workqueue for allocation to work around kernel stack
  size limitations."
* 'for-linus' of git://oss.sgi.com/xfs/xfs:
  xfs: add lots of attribute trace points
  xfs: Fix oops on IO error during xlog_recover_process_iunlinks()
  xfs: fix fstrim offset calculations
  xfs: Account log unmount transaction correctly
  xfs: don't cache inodes read through bulkstat
  xfs: trace xfs_name strings correctly
  xfs: introduce an allocation workqueue
  xfs: Fix open flag handling in open_by_handle code
  xfs: fix deadlock in xfs_rtfree_extent
  fs: xfs: fix section mismatch in linux-next
Diffstat (limited to 'fs/xfs/xfs_attr_leaf.c')
| -rw-r--r-- | fs/xfs/xfs_attr_leaf.c | 40 | 
1 files changed, 36 insertions, 4 deletions
diff --git a/fs/xfs/xfs_attr_leaf.c b/fs/xfs/xfs_attr_leaf.c index d25eafd4d28d..76d93dc953e1 100644 --- a/fs/xfs/xfs_attr_leaf.c +++ b/fs/xfs/xfs_attr_leaf.c @@ -235,6 +235,8 @@ xfs_attr_shortform_create(xfs_da_args_t *args)  	xfs_inode_t *dp;  	xfs_ifork_t *ifp; +	trace_xfs_attr_sf_create(args); +  	dp = args->dp;  	ASSERT(dp != NULL);  	ifp = dp->i_afp; @@ -268,6 +270,8 @@ xfs_attr_shortform_add(xfs_da_args_t *args, int forkoff)  	xfs_inode_t *dp;  	xfs_ifork_t *ifp; +	trace_xfs_attr_sf_add(args); +  	dp = args->dp;  	mp = dp->i_mount;  	dp->i_d.di_forkoff = forkoff; @@ -337,6 +341,8 @@ xfs_attr_shortform_remove(xfs_da_args_t *args)  	xfs_mount_t *mp;  	xfs_inode_t *dp; +	trace_xfs_attr_sf_remove(args); +  	dp = args->dp;  	mp = dp->i_mount;  	base = sizeof(xfs_attr_sf_hdr_t); @@ -405,6 +411,8 @@ xfs_attr_shortform_lookup(xfs_da_args_t *args)  	int i;  	xfs_ifork_t *ifp; +	trace_xfs_attr_sf_lookup(args); +  	ifp = args->dp->i_afp;  	ASSERT(ifp->if_flags & XFS_IFINLINE);  	sf = (xfs_attr_shortform_t *)ifp->if_u1.if_data; @@ -476,6 +484,8 @@ xfs_attr_shortform_to_leaf(xfs_da_args_t *args)  	xfs_dabuf_t *bp;  	xfs_ifork_t *ifp; +	trace_xfs_attr_sf_to_leaf(args); +  	dp = args->dp;  	ifp = dp->i_afp;  	sf = (xfs_attr_shortform_t *)ifp->if_u1.if_data; @@ -775,6 +785,8 @@ xfs_attr_leaf_to_shortform(xfs_dabuf_t *bp, xfs_da_args_t *args, int forkoff)  	char *tmpbuffer;  	int error, i; +	trace_xfs_attr_leaf_to_sf(args); +  	dp = args->dp;  	tmpbuffer = kmem_alloc(XFS_LBSIZE(dp->i_mount), KM_SLEEP);  	ASSERT(tmpbuffer != NULL); @@ -848,6 +860,8 @@ xfs_attr_leaf_to_node(xfs_da_args_t *args)  	xfs_dablk_t blkno;  	int error; +	trace_xfs_attr_leaf_to_node(args); +  	dp = args->dp;  	bp1 = bp2 = NULL;  	error = xfs_da_grow_inode(args, &blkno); @@ -911,6 +925,8 @@ xfs_attr_leaf_create(xfs_da_args_t *args, xfs_dablk_t blkno, xfs_dabuf_t **bpp)  	xfs_dabuf_t *bp;  	int error; +	trace_xfs_attr_leaf_create(args); +  	dp = args->dp;  	ASSERT(dp != NULL);  	error = xfs_da_get_buf(args->trans, args->dp, blkno, -1, &bp, @@ -948,6 +964,8 @@ xfs_attr_leaf_split(xfs_da_state_t *state, xfs_da_state_blk_t *oldblk,  	xfs_dablk_t blkno;  	int error; +	trace_xfs_attr_leaf_split(state->args); +  	/*  	 * Allocate space for a new leaf node.  	 */ @@ -977,10 +995,13 @@ xfs_attr_leaf_split(xfs_da_state_t *state, xfs_da_state_blk_t *oldblk,  	 *  	 * Insert the "new" entry in the correct block.  	 */ -	if (state->inleaf) +	if (state->inleaf) { +		trace_xfs_attr_leaf_add_old(state->args);  		error = xfs_attr_leaf_add(oldblk->bp, state->args); -	else +	} else { +		trace_xfs_attr_leaf_add_new(state->args);  		error = xfs_attr_leaf_add(newblk->bp, state->args); +	}  	/*  	 * Update last hashval in each block since we added the name. @@ -1001,6 +1022,8 @@ xfs_attr_leaf_add(xfs_dabuf_t *bp, xfs_da_args_t *args)  	xfs_attr_leaf_map_t *map;  	int tablesize, entsize, sum, tmp, i; +	trace_xfs_attr_leaf_add(args); +  	leaf = bp->data;  	ASSERT(leaf->hdr.info.magic == cpu_to_be16(XFS_ATTR_LEAF_MAGIC));  	ASSERT((args->index >= 0) @@ -1128,8 +1151,6 @@ xfs_attr_leaf_add_work(xfs_dabuf_t *bp, xfs_da_args_t *args, int mapindex)  	       (be32_to_cpu(entry->hashval) <= be32_to_cpu((entry+1)->hashval)));  	/* -	 * Copy the attribute name and value into the new space. -	 *  	 * For "remote" attribute values, simply note that we need to  	 * allocate space for the "remote" value.  We can't actually  	 * allocate the extents in this transaction, and we can't decide @@ -1265,6 +1286,8 @@ xfs_attr_leaf_rebalance(xfs_da_state_t *state, xfs_da_state_blk_t *blk1,  	ASSERT(leaf2->hdr.info.magic == cpu_to_be16(XFS_ATTR_LEAF_MAGIC));  	args = state->args; +	trace_xfs_attr_leaf_rebalance(args); +  	/*  	 * Check ordering of blocks, reverse if it makes things simpler.  	 * @@ -1810,6 +1833,8 @@ xfs_attr_leaf_unbalance(xfs_da_state_t *state, xfs_da_state_blk_t *drop_blk,  	xfs_mount_t *mp;  	char *tmpbuffer; +	trace_xfs_attr_leaf_unbalance(state->args); +  	/*  	 * Set up environment.  	 */ @@ -1919,6 +1944,8 @@ xfs_attr_leaf_lookup_int(xfs_dabuf_t *bp, xfs_da_args_t *args)  	int probe, span;  	xfs_dahash_t hashval; +	trace_xfs_attr_leaf_lookup(args); +  	leaf = bp->data;  	ASSERT(leaf->hdr.info.magic == cpu_to_be16(XFS_ATTR_LEAF_MAGIC));  	ASSERT(be16_to_cpu(leaf->hdr.count) @@ -2445,6 +2472,7 @@ xfs_attr_leaf_clearflag(xfs_da_args_t *args)  	char *name;  #endif /* DEBUG */ +	trace_xfs_attr_leaf_clearflag(args);  	/*  	 * Set up the operation.  	 */ @@ -2509,6 +2537,8 @@ xfs_attr_leaf_setflag(xfs_da_args_t *args)  	xfs_dabuf_t *bp;  	int error; +	trace_xfs_attr_leaf_setflag(args); +  	/*  	 * Set up the operation.  	 */ @@ -2565,6 +2595,8 @@ xfs_attr_leaf_flipflags(xfs_da_args_t *args)  	char *name1, *name2;  #endif /* DEBUG */ +	trace_xfs_attr_leaf_flipflags(args); +  	/*  	 * Read the block containing the "old" attr  	 */  |