[Top] [All Lists]

Re: [PATCH 20/26] move xfs_bmbt_newroot to common code

To: Christoph Hellwig <hch@xxxxxx>
Subject: Re: [PATCH 20/26] move xfs_bmbt_newroot to common code
From: Dave Chinner <david@xxxxxxxxxxxxx>
Date: Tue, 5 Aug 2008 10:50:13 +1000
Cc: xfs@xxxxxxxxxxx
In-reply-to: <20080804013530.GU8819@xxxxxx>
Mail-followup-to: Christoph Hellwig <hch@xxxxxx>, xfs@xxxxxxxxxxx
References: <20080804013530.GU8819@xxxxxx>
Sender: xfs-bounce@xxxxxxxxxxx
User-agent: Mutt/1.5.18 (2008-05-17)
On Mon, Aug 04, 2008 at 03:35:30AM +0200, Christoph Hellwig wrote:
> xfs_bmbt_newroot is a mostly generic implementation of moving from
> an inode root to a real block based root.  So move it to xfs_btree.c
> where it can use all the nice infrastructure there and make it pointer
> size agnostic
> The new name for it is xfs_btree_iroot_to_root which is not very
> nice but at least slightly more descriptive than the old name.

> +
> +     XFS_BTREE_STATS_INC(cur, newroot);
> +
> +     level = cur->bc_nlevels - 1;
> +     /* XXX(hch): this should be an get_inode_from_root, right? */
> +     block = xfs_btree_get_block(cur, level, &bp);

Yes, probably should be. Also an assert to ensure the btree does
have the root in inode falg set might be appropriate....

Otherwise looks fine.


Dave Chinner

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