Re: AIO read returns negative number for bytes read

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





On 11/16/2015 05:19 PM, Alireza Haghdoost wrote:
On Sun, Nov 15, 2015 at 7:08 AM, Avi Kivity <avi@xxxxxxxxxxxx> 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@xxxxxxxxxxx
http://oss.sgi.com/mailman/listinfo/xfs



[Index of Archives]     [Linux XFS Devel]     [Linux Filesystem Development]     [Filesystem Testing]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux