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

Dave Chinner
2014-06-05T01:27:30Z

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@redhat.com>
> >
> > 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@redhat.com>
> > ---
....
> > @@ -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@redhat.com>

Thanks!

-Dave.
--
Dave Chinner
david@fromorbit.com