| 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@lst.de> |
| Mail-followup-to: | Christoph Hellwig <hch@xxxxxx>, xfs@xxxxxxxxxxx |
| References: | <20080804013530.GU8819@lst.de> |
| 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_TRACE_CURSOR(cur, XBT_ENTRY); > + 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. Cheers, Dave. -- Dave Chinner david@xxxxxxxxxxxxx |
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Re: [PATCH 00/26] generic btree implementation, version 3, Christoph Hellwig |
|---|---|
| Next by Date: | Re: [PATCH 21/26] implement generic xfs_btree_inÑert/insrec, Dave Chinner |
| Previous by Thread: | [PATCH 20/26] move xfs_bmbt_newroot to common code, Christoph Hellwig |
| Next by Thread: | [PATCH 23/26] implement generic xfs_btree_delete/delrec, Christoph Hellwig |
| Indexes: | [Date] [Thread] [Top] [All Lists] |