public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Alex Elder <aelder@sgi.com>
To: Christoph Hellwig <hch@infradead.org>
Cc: xfs@oss.sgi.com
Subject: Re: [PATCH] xfs: remove the ->kill_root btree operation
Date: Fri, 10 Sep 2010 15:20:47 -0500	[thread overview]
Message-ID: <1284150047.2468.16.camel@doink> (raw)
In-Reply-To: <20100907233407.GA17728@infradead.org>

On Tue, 2010-09-07 at 19:34 -0400, Christoph Hellwig wrote:
> The implementation os ->kill_root only differ by either simply zeroing
> out the now unused buffer in the btree cursor in the inode allocation
> btree or using xfs_btree_setbuf in the allocation btree.
> 
> Initially both of them used xfs_btree_setbuf, but the use in the ialloc
> btree was removed early on because it interacted badly with xfs_trans_binval.
> 
> In addition to zeroing out the buffer in the cursor xfs_btree_setbuf updates
> the bc_ra array in the btree cursor, and calls xfs_trans_brelse on the
> buffer previous occupying the slot.
> 
> The bc_ra update should be done for the alloc btree updated too, although
> the lack of it does not cause serious problems.  The xfs_trans_brelse
> call on the other hand is effectively a no-op in the end - it keeps
> decrementing the bli_recur refcount until it hits zero, and then just
> skips out because the buffer will always be dirty at this point.  So
> removing it for the allocation btree is just fine.
> 
> So unify the code and move it to xfs_btree.c.  While we're at it also
> replace the call to xfs_btree_setbuf with a NULL bp argument in
> xfs_btree_del_cursor with a direct call to xfs_trans_brelse given
> that the cursor is beeing freed just after this and the state updates
> are superflous.  After this xfs_btree_setbuf is only used with a non-NULL
> bp argument and can thus be simplified.

Looks good.

Reviewed-by: Alex Elder <aelder@sgi.com>

> Signed-off-by: Christoph Hellwig <hch@lst.de>
> 
. . .



_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

      reply	other threads:[~2010-09-10 20:20 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-07 23:34 [PATCH] xfs: remove the ->kill_root btree operation Christoph Hellwig
2010-09-10 20:20 ` Alex Elder [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=1284150047.2468.16.camel@doink \
    --to=aelder@sgi.com \
    --cc=hch@infradead.org \
    --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