xfs
[Top] [All Lists]

Re: stop using ioends for direct write completions

To: Christoph Hellwig <hch@xxxxxx>
Subject: Re: stop using ioends for direct write completions
From: "Darrick J. Wong" <darrick.wong@xxxxxxxxxx>
Date: Thu, 28 Jan 2016 13:58:53 -0800
Cc: xfs@xxxxxxxxxxx
Delivered-to: xfs@xxxxxxxxxxx
In-reply-to: <20160128211056.GA27287@xxxxxx>
References: <1452766237-2314-1-git-send-email-hch@xxxxxx> <20160128131656.GB14876@xxxxxxxxxxxxx> <20160128205333.GF20038@xxxxxxxxxxxxxxxx> <20160128211056.GA27287@xxxxxx>
User-agent: Mutt/1.5.21 (2010-09-15)
On Thu, Jan 28, 2016 at 10:10:56PM +0100, Christoph Hellwig wrote:
> On Thu, Jan 28, 2016 at 12:53:33PM -0800, Darrick J. Wong wrote:
> > On Thu, Jan 28, 2016 at 05:16:56AM -0800, Christoph Hellwig wrote:
> > > Any chance to get a review for this?  It should really help
> > > with sorting out the buffered I/O COW code.
> > 
> > It looks reasonable to me.  I separated the dio and buffered CoW remap 
> > paths a
> > couple of weeks ago, because it seems that IO errors only get passed back 
> > as a
> > return value from __blockdev_direct_IO, therefore the remapping has to be 
> > done
> > from xfs_vm_do_dio anyway because we don't want to remap if the write fails.
> > Just yesterday I removed the "is_cow" flag from the ioend, so now we're 
> > back to
> > having a separate XFS_IO_COW ioend type.
> 
> For direct I/O we will need something like this to properly support AIO
> writes.

Aw, snap, I knew I'd forgotten something.  Yep, we'll need that... I think
xfs_end_io_direct_write will have to sniff out the error status from "size"
and either remap or discard the CoW allocations as appropriate.

Heh, guess I'd better go write some aio tests. :)

> > So... reflink doesn't need the patch but OTOH directio doesn't really need 
> > the overhead of allocating an ioend anyway. :)
> 
> Yep.

--D

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