xfs
[Top] [All Lists]

Re: TAKE 964002 - Don't wait for pending I/Os when purging blocks beyond

To: David Chinner <dgc@xxxxxxx>
Subject: Re: TAKE 964002 - Don't wait for pending I/Os when purging blocks beyond eof.
From: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Date: Wed, 12 Dec 2007 05:13:51 +0000
Cc: Christoph Hellwig <hch@xxxxxxxxxxxxx>, Lachlan McIlroy <lachlan@xxxxxxx>, sgi.bugs.xfs@xxxxxxxxxxxx, xfs@xxxxxxxxxxx
In-reply-to: <20071211232517.GE4612@sgi.com>
References: <20071210055955.0F96358C4C34@chook.melbourne.sgi.com> <20071211081117.GB19213@infradead.org> <20071211232517.GE4612@sgi.com>
Sender: xfs-bounce@xxxxxxxxxxx
User-agent: Mutt/1.5.17 (2007-11-01)
On Wed, Dec 12, 2007 at 10:25:17AM +1100, David Chinner wrote:
> > which is wrong given that we don't wait for all pending direct I/O
> > requests..  (and vn_iowait doesn't wait for direct I/O anyway)
> 
> vn_iowait() does wait for direct I/O. That was it's entire purpose - to be
> able to prevent truncate vs direct I/O write races by tracking direct I/Os.
> We increment ip->i_iocount in xfs_alloc_ioend() which is called from both the
> buffered write and direct I/O write path, so vn_iowait() does wait for both
> buffered and direct writes to complete.

Sorry, forgot a little important word above - it should read
'and vn_iowait doesn't wait _just_ for direct I/O anyway), because it
waits for completion of regular I/O aswell.  Not that it should actually
matter in that caller.forgot a little important word above - it should
read
'and vn_iowait doesn't wait _just_ for direct I/O anyway), because it
waits for completion of regular I/O aswell.  Not that it should actually
matter in that caller.


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