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: xfs@oss.sgi.com
Subject: Re: [PATCH 4/6] xfs: kill the b_strat callback in xfs_buf
Date: Tue, 20 Jul 2010 17:41:29 +1000	[thread overview]
Message-ID: <20100720074129.GI32635@dastard> (raw)
In-Reply-To: <20100718203926.427127966@bombadil.infradead.org>

On Sun, Jul 18, 2010 at 04:38:52PM -0400, Christoph Hellwig wrote:
> The b_strat callback is used by xfs_buf_iostrategy to perform additional
> checks before submitting a buffer.  It is used in xfs_bwrite and when
> writing out delayed buffers.  In xfs_bwrite it we can de-virtualize the
> call easily as b_strat is set a few lines above the call to
> xfs_buf_iostrategy.  For the delayed buffers the rationale is a bit
> more complicated:
> 
>  - there are three callers of xfs_buf_delwri_queue, which places buffers
>    on the delwri list:
>     (1) xfs_bdwrite - this sets up b_strat, so it's fine
>     (2) xfs_buf_iorequest.  None of the callers can have XBF_DELWRI set:
> 	- xlog_bdstrat is only used for log buffers, which are never delwri
> 	- _xfs_buf_read explicitly clears the delwri flag
> 	- xfs_buf_iodone_work retries log buffers only
> 	- xfsbdstrat - only used for reads, superblock writes without the
> 	  delwri flag, log I/O and file zeroing with explicitly allocated
> 	  buffers.
> 	- xfs_buf_iostrategy - only calls xfs_buf_iorequest if b_strat is
> 	  not set
>     (3) xfs_buf_unlock
> 	- only puts the buffer on the delwri list if the DELWRI flag is
> 	  already set.  The DELWRI flag is only ever set in xfs_bwrite,
> 	  xfs_buf_iodone_callbacks, or xfs_trans_log_buf.  For
> 	  xfs_buf_iodone_callbacks and xfs_trans_log_buf we require
> 	  an initialized buf item, which means b_strat was set to
> 	  xfs_bdstrat_cb in xfs_buf_item_init.
> 
> Conclusion: we can just get rid of the callback and replace it with
> explicit calls to xfs_bdstrat_cb.
> 
> Signed-off-by: Christoph Hellwig <hch@lst.de>

looks good.

Reviewed-by: Dave Chinner <david@fromorbit.com>

-- 
Dave Chinner
david@fromorbit.com

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

  reply	other threads:[~2010-07-20  7:38 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-18 20:38 [PATCH 0/6] a few cleanups for 2.6.36 Christoph Hellwig
2010-07-18 20:38 ` [PATCH 1/6] xfs: fix gcc 4.6 set but not read and unused statement warnings Christoph Hellwig
2010-07-20  7:34   ` Dave Chinner
2010-07-18 20:38 ` [PATCH 2/6] xfs: clean up filestreams helpers Christoph Hellwig
2010-07-20  7:35   ` Dave Chinner
2010-07-18 20:38 ` [PATCH 3/6] xfs: remove obsolete osyncisosync mount option Christoph Hellwig
2010-07-20  7:38   ` Dave Chinner
2010-07-20  8:09     ` Christoph Hellwig
2010-07-18 20:38 ` [PATCH 4/6] xfs: kill the b_strat callback in xfs_buf Christoph Hellwig
2010-07-20  7:41   ` Dave Chinner [this message]
2010-07-18 20:38 ` [PATCH 5/6] xfs: simplify xfs_truncate_file Christoph Hellwig
2010-07-20  7:44   ` Dave Chinner
2010-07-18 20:38 ` [PATCH 6/6] xfs: clean up xfs_bmap_get_bp Christoph Hellwig
2010-07-20  7:46   ` Dave Chinner
2010-07-20  7:50 ` [PATCH 0/6] a few cleanups for 2.6.36 Dave Chinner
2010-07-21 13:35 ` Alex Elder

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=20100720074129.GI32635@dastard \
    --to=david@fromorbit.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