Re: Block device direct read EIO handling broken?

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

 



On 2019/08/06 6:26, Jens Axboe wrote:
>> In any case, looking again at this code, it looks like there is a
>> problem with dio->size being incremented early, even for fragments
>> that get BLK_QC_T_EAGAIN, because dio->size is being used in
>> blkdev_bio_end_io(). So an incorrect size can be reported to user
>> space in that case on completion (e.g. large asynchronous no-wait dio
>> that cannot be issued in one go).
>>
>> So maybe something like this ? (completely untested)
> 
> I think that looks pretty good, I like not double accounting with
> this_size and dio->size, and we retain the old style ordering for the
> ret value.

Do you want a proper patch with real testing backup ? I can send that later today.

-- 
Damien Le Moal
Western Digital Research




[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