From: Christoph Hellwig <hch@lst.de>
To: "Darrick J. Wong" <darrick.wong@oracle.com>
Cc: linux-fsdevel@vger.kernel.org, xfs@oss.sgi.com,
linux-ext4@vger.kernel.org, ocfs2-devel@oss.oracle.com
Subject: Re: [PATCH 1/3] direct-io: always call ->end_io if non-NULL
Date: Wed, 3 Feb 2016 16:48:16 +0100 [thread overview]
Message-ID: <20160203154816.GA2698@lst.de> (raw)
In-Reply-To: <20160203000510.GB5854@birch.djwong.org>
> > - if (dio->end_io && dio->result)
> > - dio->end_io(dio->iocb, offset, transferred, dio->private);
> > + if (dio->end_io)
> > + dio->end_io(dio->iocb, offset, ret, dio->private);
>
> Could we make end_io return an int so that errors during completion can be
> stuffed into ret to be picked up by whatever's calling directio? Something
> like this:
>
> if (dio->end_io) {
> int ret2;
>
> ret2 = dio->end_io(dio->iocb, offset, ret, dio->private);
> if (ret2 && !ret)
> ret = ret2;
> }
>
> That way I can capture IO errors during the CoW remapping step and pass them to
> userland either via dio_complete()'s return value or through ki_complete.
>
> (If ret itself is an error code then obviously we don't bother with the
> post-CoW remap.)
Should be doable, I'll respin it with that change.
next prev parent reply other threads:[~2016-02-03 15:48 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-02 20:17 VFS/XFS: directio updates to ease COW handling Christoph Hellwig
2016-02-02 20:17 ` [PATCH 1/3] direct-io: always call ->end_io if non-NULL Christoph Hellwig
2016-02-03 0:05 ` Darrick J. Wong
2016-02-03 15:48 ` Christoph Hellwig [this message]
2016-02-02 20:17 ` [PATCH 2/3] xfs: don't use ioends for direct write completions Christoph Hellwig
2016-02-03 13:52 ` Brian Foster
2016-02-02 20:17 ` [PATCH 3/3] xfs: fold xfs_vm_do_dio into xfs_vm_direct_IO Christoph Hellwig
2016-02-03 13:52 ` Brian Foster
-- strict thread matches above, loose matches on Subject: below --
2016-02-03 18:40 vfs/xfs: directio updates to ease COW handling V2 Christoph Hellwig
2016-02-03 18:40 ` [PATCH 1/3] direct-io: always call ->end_io if non-NULL Christoph Hellwig
2016-02-03 19:55 ` Darrick J. Wong
2016-02-04 7:14 ` Christoph Hellwig
2016-02-04 8:17 ` Darrick J. Wong
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=20160203154816.GA2698@lst.de \
--to=hch@lst.de \
--cc=darrick.wong@oracle.com \
--cc=linux-ext4@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=ocfs2-devel@oss.oracle.com \
--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;
as well as URLs for NNTP newsgroup(s).