[Top] [All Lists]

Re: [patch 20/22] move vn_iowait / vn_iowake into xfs_aops.c

To: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Subject: Re: [patch 20/22] move vn_iowait / vn_iowake into xfs_aops.c
From: Dave Chinner <david@xxxxxxxxxxxxx>
Date: Thu, 4 Dec 2008 08:48:09 +1100
Cc: xfs@xxxxxxxxxxx
In-reply-to: <20081203105831.GB19287@xxxxxxxxxxxxx>
Mail-followup-to: Christoph Hellwig <hch@xxxxxxxxxxxxx>, xfs@xxxxxxxxxxx
References: <20081202160430.775774000@xxxxxxxxxxxxxxxxxxxxxx> <20081202160652.542003000@xxxxxxxxxxxxxxxxxxxxxx> <20081203031719.GQ18236@disturbed> <20081203105831.GB19287@xxxxxxxxxxxxx>
User-agent: Mutt/1.5.18 (2008-05-17)
On Wed, Dec 03, 2008 at 05:58:31AM -0500, Christoph Hellwig wrote:
> On Wed, Dec 03, 2008 at 02:17:19PM +1100, Dave Chinner wrote:
> > On Tue, Dec 02, 2008 at 11:04:50AM -0500, Christoph Hellwig wrote:
> > > The whole machinery to wait on I/O completion is related to the I/O path
> > > and should be there instead of in xfs_vnode.c.  Also give the functions
> > > more descriptive names.
> > 
> > I'm not sure that "xfs_ioend_..." is the best name - it looks
> > slightly weird in some of the callers' contexts. Just dropping the
> > "end" out of the names makes the code read much better (i.e.
> > xfs_io_wait() and xfs_io_wake()). Not particularly important,
> > though, and everything else looks good.
> xfs_ioend_* wasn't my first choice either.  I first did
> xfs_iowait/xfs_iowake, but that clashes with the buffercache.

Ah, so it does. but:

#define xfs_iowait(bp)  xfs_buf_iowait(bp)

Perhaps we should kill that define and just use xfs_buf_iowait(bp)
because it documents that we really are waiting on a specific

Then maybe we can use xfs_data_iowake/xfs_data_iowait for the data
I/O on an inode to complete. That way it's obvious from the code
exactly what we are waiting on, too (which might make some of the
comments redundant).


Dave Chinner

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