Re: [PATCH] direct-io: Fix negative return from dio read beyond eof

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

 



On Wed, Jan 27, 2016 at 07:16:32PM +0200, Avi Kivity wrote:
> On 01/27/2016 07:13 PM, Greg KH wrote:
> >On Wed, Jan 27, 2016 at 12:38:14PM +0200, Avi Kivity wrote:
> >>On 11/19/2015 10:25 PM, Jan Kara wrote:
> >>>Assume a filesystem with 4KB blocks. When a file has size 1000 bytes and
> >>>we issue direct IO read at offset 1024, blockdev_direct_IO() reads the
> >>>tail of the last block and the logic for handling short DIO reads in
> >>>dio_complete() results in a return value -24 (1000 - 1024) which
> >>>obviously confuses userspace.
> >>>
> >>>Fix the problem by bailing out early once we sample i_size and can
> >>>reliably check that direct IO read starts beyond i_size.
> >>>
> >>>Reported-by: Avi Kivity <avi@xxxxxxxxxxxx>
> >>>Fixes: 9fe55eea7e4b444bafc42fa0000cc2d1d2847275
> >>>CC: stable@xxxxxxxxxxxxxxx
> >>While this patch made it into upstream, it did not appear in 4.3.4. Did it
> >>slip through the proverbial cracks?  Can it be queued for 4.3.5?
> >There are over 400 patches right now in my queue that haven't made it
> >into a 4.3.x kernel.
> 
> Many projects would consider 400 patches a major release, and here they are
> behind two dots...

Look at the percentages, it's just a tiny drop in the bucket compared to
what is hitting Linus's tree :)

thanks,

greg k-h
--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux