From: Nick Piggin <npiggin@gmail.com>
To: Trond Myklebust <Trond.Myklebust@netapp.com>
Cc: Chuck Lever <chuck.lever@oracle.com>,
linux-fsdevel@vger.kernel.org, linux-nfs@vger.kernel.org,
wen.gang.wang@oracle.com
Subject: Re: [PATCH] NFS: Fix "BUG at fs/aio.c:554!"
Date: Thu, 20 Jan 2011 10:50:47 +1100 [thread overview]
Message-ID: <AANLkTimwQJknzWHsMBFMpjiAe7qw5LktXMhXnQrKHoHA@mail.gmail.com> (raw)
In-Reply-To: <1295480976.22151.23.camel@heimdal.trondhjem.org>
On Thu, Jan 20, 2011 at 10:49 AM, Trond Myklebust
<Trond.Myklebust@netapp.com> wrote:
> On Thu, 2011-01-20 at 10:37 +1100, Nick Piggin wrote:
>> On Thu, Jan 20, 2011 at 10:31 AM, Trond Myklebust
>> <Trond.Myklebust@netapp.com> wrote:
>> > On Thu, 2011-01-20 at 10:26 +1100, Nick Piggin wrote:
>> >> On Thu, Jan 20, 2011 at 10:25 AM, Trond Myklebust
>>
>> >> > Also, why is EIO the correct reply when no bytes were read/written? Why
>> >> > shouldn't the VFS aio code be able to cope with a zero byte reply?
>> >>
>> >> What would it do?
>> >
>> > Just return that zero byte reply to userland.
>> >
>> > zero bytes is a valid reply for ordinary read() and write(), so why
>> > should we have to do anything different for aio_read()/aio_write()?
>>
>> It doesn't give userspace much to do. zero reply from read means
>> EOF. Zero reply from write is pretty useless, I don't think we do it
>> in the buffered write path -- we either ensure we write at least
>> something or have a meaningful error to return.
>
> zero reply from read means EOF _or_ user supplied a zero length buffer.
>
> zero reply from write may also be useless, but it is a valid value. It
> can simply mean the user supplied a zero length buffer.
OK, yes. I'm ignoring zero length request.
next prev parent reply other threads:[~2011-01-19 23:50 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-19 22:36 [PATCH] NFS: Fix "BUG at fs/aio.c:554!" Chuck Lever
2011-01-19 23:25 ` Trond Myklebust
2011-01-19 23:26 ` Nick Piggin
2011-01-19 23:31 ` Trond Myklebust
2011-01-19 23:37 ` Nick Piggin
2011-01-19 23:39 ` Chuck Lever
2011-01-19 23:42 ` Nick Piggin
2011-01-19 23:56 ` Trond Myklebust
2011-01-19 23:49 ` Trond Myklebust
2011-01-19 23:50 ` Nick Piggin [this message]
2011-01-19 23:57 ` Chuck Lever
2011-01-19 23:31 ` Chuck Lever
2011-01-21 2:42 ` Wengang Wang
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=AANLkTimwQJknzWHsMBFMpjiAe7qw5LktXMhXnQrKHoHA@mail.gmail.com \
--to=npiggin@gmail.com \
--cc=Trond.Myklebust@netapp.com \
--cc=chuck.lever@oracle.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-nfs@vger.kernel.org \
--cc=wen.gang.wang@oracle.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).