linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Nick Piggin <npiggin@gmail.com>
To: Chuck Lever <chuck.lever@oracle.com>
Cc: Trond Myklebust <Trond.Myklebust@netapp.com>,
	linux-fsdevel@vger.kernel.org,
	Linux NFS Mailing List <linux-nfs@vger.kernel.org>,
	Wengang Wang <wen.gang.wang@oracle.com>
Subject: Re: [PATCH] NFS: Fix "BUG at fs/aio.c:554!"
Date: Thu, 20 Jan 2011 10:42:44 +1100	[thread overview]
Message-ID: <AANLkTinyfESY_JZATKmfAy-gUUmnLfVOBSKNZscawyad@mail.gmail.com> (raw)
In-Reply-To: <1CB6BE0E-01BA-47E6-BBD1-298F62735DF6@oracle.com>

On Thu, Jan 20, 2011 at 10:39 AM, Chuck Lever <chuck.lever@oracle.com> wrote:
>
> On Jan 19, 2011, at 6:37 PM, 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.
>
> I think in this case, the zero-length requests are already shunted off.  No zero-length requests make it down here, IIRC.  So we expect that either some bytes are started, or an error occurs.  If zero bytes were started and no error occurred, that's just... wrong.

Right. So in this case you should have an error to return.

  reply	other threads:[~2011-01-19 23:42 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 [this message]
2011-01-19 23:56             ` Trond Myklebust
2011-01-19 23:49         ` Trond Myklebust
2011-01-19 23:50           ` Nick Piggin
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=AANLkTinyfESY_JZATKmfAy-gUUmnLfVOBSKNZscawyad@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).