public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Dave Chinner <david@fromorbit.com>
To: Christoph Hellwig <hch@infradead.org>
Cc: Christoph Hellwig <hch@lst.de>, xfs@oss.sgi.com
Subject: Re: [PATCH 22/26] move xfs_bmbt_killroot to common code
Date: Tue, 5 Aug 2008 12:08:56 +1000	[thread overview]
Message-ID: <20080805020856.GR6119@disturbed> (raw)
In-Reply-To: <20080805012630.GA22147@infradead.org>

On Mon, Aug 04, 2008 at 09:26:30PM -0400, Christoph Hellwig wrote:
> On Tue, Aug 05, 2008 at 11:14:37AM +1000, Dave Chinner wrote:
> > On Mon, Aug 04, 2008 at 03:35:42AM +0200, Christoph Hellwig wrote:
> > > xfs_bmbt_killroot is a mostly generic implementation of moving from
> > > a real block based root to an inode 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_root_to_iroot which is not very
> > > nice but at least slightly more descriptive than the old name.
> > .....
> > > +
> > > +	XFS_BTREE_TRACE_CURSOR(cur, XBT_ENTRY);
> > > +	level = cur->bc_nlevels - 1;
> > > +	ASSERT(level >= 1);
> > 
> > probably should assert root in inode is set here.
> 
> We have that check just before the call, so this might be a little
> overkill..

Fair enough.

> > > +	// XXX(hch): this assert is bmap btree specific
> > > + 	ASSERT(cur->bc_ops->get_maxrecs(cur, level) ==
> >    ^
> > > +	       XFS_BMAP_BROOT_MAXRECS(ifp->if_broot_bytes));
> > 
> > Stray whitespace. As to the assert - what is it really trying to
> > check? That the btree root space in the inode is large enough to
> > fit the max number of records? If so, does it really need to be
> > checked here (i.e. could the caller do it?)
> 
> I don't think it makes much sense at all.  My preference would
> be to simply kill it.

Agreed. Kill it - I don't think it adds any value.

Cheers,

Dave.
-- 
Dave Chinner
david@fromorbit.com

      reply	other threads:[~2008-08-05  2:08 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-04  1:35 [PATCH 22/26] move xfs_bmbt_killroot to common code Christoph Hellwig
2008-08-05  1:14 ` Dave Chinner
2008-08-05  1:26   ` Christoph Hellwig
2008-08-05  2:08     ` Dave Chinner [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080805020856.GR6119@disturbed \
    --to=david@fromorbit.com \
    --cc=hch@infradead.org \
    --cc=hch@lst.de \
    --cc=xfs@oss.sgi.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox