From: Christoph Hellwig <hch@infradead.org>
To: Jan Kara <jack@suse.cz>
Cc: Christoph Hellwig <hch@infradead.org>,
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 02:36:10 -0400 [thread overview]
Message-ID: <20100625063610.GA4128@infradead.org> (raw)
In-Reply-To: <20100624215922.GE3345@quack.suse.cz>
On Thu, Jun 24, 2010 at 11:59:22PM +0200, Jan Kara wrote:
> Umm, I don't get this. Looking at the ->end_io callback it has been
> always called with i_alloc_sem held. It's only aio_complete() which will
> be called with i_alloc_sem held after your changes. Or am I missing
> something?
No, that part of the commit message is flat out wrong. Not sure what
I was thinking when I wrote it.
> 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().
AIO beyond i_size is not supported using blockdev_direct_IO yet. I
think I can add it fairly easily for XFS, but that will require
passing a new DIO_* flag to __blockdev_direct_IO which will make
is_async true for writes beyond i_size.
WARNING: multiple messages have this Message-ID (diff)
From: Christoph Hellwig <hch@infradead.org>
To: Jan Kara <jack@suse.cz>
Cc: Christoph Hellwig <hch@infradead.org>,
linux-fsdevel@vger.kernel.org, linux-ext4@vger.kernel.org,
xfs@oss.sgi.com
Subject: Re: [PATCH 1/2] direct-io: move aio_complete into ->end_io
Date: Fri, 25 Jun 2010 02:36:10 -0400 [thread overview]
Message-ID: <20100625063610.GA4128@infradead.org> (raw)
In-Reply-To: <20100624215922.GE3345@quack.suse.cz>
On Thu, Jun 24, 2010 at 11:59:22PM +0200, Jan Kara wrote:
> Umm, I don't get this. Looking at the ->end_io callback it has been
> always called with i_alloc_sem held. It's only aio_complete() which will
> be called with i_alloc_sem held after your changes. Or am I missing
> something?
No, that part of the commit message is flat out wrong. Not sure what
I was thinking when I wrote it.
> 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().
AIO beyond i_size is not supported using blockdev_direct_IO yet. I
think I can add it fairly easily for XFS, but that will require
passing a new DIO_* flag to __blockdev_direct_IO which will make
is_async true for writes beyond i_size.
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
next prev parent reply other threads:[~2010-06-25 6:36 UTC|newest]
Thread overview: 18+ 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 ` Christoph Hellwig
2010-06-22 12:21 ` [PATCH 1/2] direct-io: move aio_complete into ->end_io Christoph Hellwig
2010-06-22 12:21 ` Christoph Hellwig
2010-06-24 21:59 ` Jan Kara
2010-06-24 21:59 ` Jan Kara
2010-06-25 6:36 ` Christoph Hellwig [this message]
2010-06-25 6:36 ` Christoph Hellwig
2010-06-25 10:35 ` Jan Kara
2010-06-25 10:35 ` Jan Kara
2010-06-22 12:21 ` [PATCH 2/2] xfs: move aio completion after unwritten extent conversion Christoph Hellwig
2010-06-22 12:21 ` Christoph Hellwig
2010-07-16 6:04 ` [PATCH 0/2] Fix aio completion vs unwritten extents Christoph Hellwig
2010-07-16 6:04 ` Christoph Hellwig
2010-07-16 6:30 ` Theodore Tso
2010-07-16 6:30 ` Theodore Tso
2010-07-18 5:00 ` Christoph Hellwig
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=20100625063610.GA4128@infradead.org \
--to=hch@infradead.org \
--cc=jack@suse.cz \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.