From: Avi Kivity <avi@scylladb.com>
To: Alireza Haghdoost <haghdoost@gmail.com>
Cc: linux-aio@kvack.org, xfs@oss.sgi.com
Subject: Re: AIO read returns negative number for bytes read
Date: Mon, 16 Nov 2015 17:32:53 +0200 [thread overview]
Message-ID: <5649F725.6080508@scylladb.com> (raw)
In-Reply-To: <CAB-428nQfSdBpLkANvEoWjsJhV=6KbQD2wQ7hJbXmHh-GgjyTQ@mail.gmail.com>
On 11/16/2015 05:19 PM, Alireza Haghdoost wrote:
> On Sun, Nov 15, 2015 at 7:08 AM, Avi Kivity <avi@scylladb.com> wrote:
>> Due to a bug in my program, I initiated a read beyond eof. Specifically, the
>> file size is 13002 bytes and the read offset is 13312 (0x3400).
>>
>> I would expect such a read to return 0 bytes read, but io_getevents returns
>> -310, which is suspiciously equal to (13002 - 13312).
>>
>> I attach a reproducer.
>>
>> 4.2.5-201.fc22.x86_64
>>
>> Are my expectations incorrect, or is this a bug in aio or xfs?
> I think it is not a bug. This post might be helpful:
> http://marc.info/?l=linux-aio&m=142315449930935&w=2
The post indicates that it is a bug. A negative value indicates an
error, but there is no error 310.
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
next prev parent reply other threads:[~2015-11-16 15:32 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-15 13:08 AIO read returns negative number for bytes read Avi Kivity
2015-11-16 15:00 ` Brian Foster
2015-11-16 15:19 ` Alireza Haghdoost
2015-11-16 15:32 ` Avi Kivity [this message]
2015-11-16 19:27 ` Jeff Moyer
2015-11-17 12:52 ` Avi Kivity
2015-11-19 15:30 ` Jan Kara
2015-11-19 15:32 ` Avi Kivity
2015-11-19 15:33 ` Jeff Moyer
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=5649F725.6080508@scylladb.com \
--to=avi@scylladb.com \
--cc=haghdoost@gmail.com \
--cc=linux-aio@kvack.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