From: Jan Kara <jack@suse.cz>
To: Christoph Hellwig <hch@infradead.org>
Cc: Jan Kara <jack@suse.cz>,
linux-fsdevel@vger.kernel.org, xfs@oss.sgi.com,
linux-ext4@vger.kernel.org
Subject: Re: [PATCH 1/2] direct-io: move aio_complete into ->end_io
Date: Fri, 25 Jun 2010 12:35:50 +0200 [thread overview]
Message-ID: <20100625103550.GA3586@quack.suse.cz> (raw)
In-Reply-To: <20100625063610.GA4128@infradead.org>
On Fri 25-06-10 02:36:10, Christoph Hellwig wrote:
> On Thu, Jun 24, 2010 at 11:59:22PM +0200, Jan Kara wrote:
> > Moreover the async testing you do does not seem to be completely right.
> > dio->is_async is a flag that controls whether dio code waits for IO to be
> > completed or not. In particular it is not set for AIO that spans beyond
> > current i_size so it does not seem to be exactly what you need (at least
> > for ext4 it isn't). I think that is_sync_kiocb() is a test that should be
> > used to recognize AIO - and that has an advantage that you don't have to
> > pass the is_async flag around.
>
> No. is_sync_kiocb() means the ioctb was not intended as sync I/O from
> the start. But we can only call aio_complete when we returned
> -EIOCBQUEUED from ->aio_read/write. Take a look at the comment near the
> end of direct_io_worker().
Ah, I see. Thanks for explanation. It's ugly but I also don't see a
nicer way how to handle this.
Honza
--
Jan Kara <jack@suse.cz>
SUSE Labs, CR
next prev parent reply other threads:[~2010-06-25 10:36 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-22 12:21 [PATCH 0/2] Fix aio completion vs unwritten extents Christoph Hellwig
2010-06-22 12:21 ` [PATCH 1/2] direct-io: move aio_complete into ->end_io Christoph Hellwig
2010-06-24 21:59 ` Jan Kara
2010-06-25 6:36 ` Christoph Hellwig
2010-06-25 10:35 ` Jan Kara [this message]
2010-06-22 12:21 ` [PATCH 2/2] xfs: move aio completion after unwritten extent conversion Christoph Hellwig
2010-07-16 6:04 ` [PATCH 0/2] Fix aio completion vs unwritten extents Christoph Hellwig
2010-07-16 6:30 ` Theodore Tso
2010-07-18 5:00 ` Christoph Hellwig
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=20100625103550.GA3586@quack.suse.cz \
--to=jack@suse.cz \
--cc=hch@infradead.org \
--cc=linux-ext4@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.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;
as well as URLs for NNTP newsgroup(s).