xfs
[Top] [All Lists]

Re: [PATCH 17/16] xfs: remove redundant geometry information from xfs_da

To: Brian Foster <bfoster@xxxxxxxxxx>
Subject: Re: [PATCH 17/16] xfs: remove redundant geometry information from xfs_da_state
From: Dave Chinner <david@xxxxxxxxxxxxx>
Date: Thu, 5 Jun 2014 11:26:52 +1000
Cc: xfs@xxxxxxxxxxx
Delivered-to: xfs@xxxxxxxxxxx
In-reply-to: <20140602140324.GA24196@xxxxxxxxxxxxxxx>
References: <1401257083-13433-1-git-send-email-david@xxxxxxxxxxxxx> <20140530233906.GL6677@dastard> <20140602140324.GA24196@xxxxxxxxxxxxxxx>
User-agent: Mutt/1.5.21 (2010-09-15)
On Mon, Jun 02, 2014 at 10:03:24AM -0400, Brian Foster wrote:
> On Sat, May 31, 2014 at 09:39:06AM +1000, Dave Chinner wrote:
> > 
> > From: Dave Chinner <dchinner@xxxxxxxxxx>
> > 
> > It's carried in state->args->geo, so there's no need to duplicate it
> > and use more stack space than necessary.
> > 
> > Signed-off-by: Dave Chinner <dchinner@xxxxxxxxxx>
> > ---
....
> > @@ -1089,14 +1089,15 @@ xfs_da3_root_join(
> >      * that could occur. For dir3 blocks we also need to update the block
> >      * number in the buffer header.
> >      */
> > -   memcpy(root_blk->bp->b_addr, bp->b_addr, state->blocksize);
> > +   memcpy(root_blk->bp->b_addr, bp->b_addr, state->args->geo->blksize);
> >     root_blk->bp->b_ops = bp->b_ops;
> >     xfs_trans_buf_copy_type(root_blk->bp, bp);
> >     if (oldroothdr.magic == XFS_DA3_NODE_MAGIC) {
> >             struct xfs_da3_blkinfo *da3 = root_blk->bp->b_addr;
> >             da3->blkno = cpu_to_be64(root_blk->bp->b_bn);
> >     }
> > -   xfs_trans_log_buf(args->trans, root_blk->bp, 0, state->blocksize - 1);
> > +   xfs_trans_log_buf(args->trans, root_blk->bp, 0,
> > +                     state->args->geo->blksize - 1);
> 
> FYI, you've got a local args pointer in xfs_da3_root_join().

Ah, the joys of macro based replacement. I'll fix it up. ;)

> Reviewed-by: Brian Foster <bfoster@xxxxxxxxxx>

Thanks!

-Dave.
-- 
Dave Chinner
david@xxxxxxxxxxxxx

<Prev in Thread] Current Thread [Next in Thread>