Re: [PATCH] bdev: Do not return EBUSY if bdev discard races with write

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

 



On 1/26/21 3:02 AM, Jan Kara wrote:
> On Thu 07-01-21 16:40:34, Jan Kara wrote:
>> blkdev_fallocate() tries to detect whether a discard raced with an
>> overlapping write by calling invalidate_inode_pages2_range(). However
>> this check can give both false negatives (when writing using direct IO
>> or when writeback already writes out the written pagecache range) and
>> false positives (when write is not actually overlapping but ends in the
>> same page when blocksize < pagesize). This actually causes issues for
>> qemu which is getting confused by EBUSY errors.
>>
>> Fix the problem by removing this conflicting write detection since it is
>> inherently racy and thus of little use anyway.
>>
>> Reported-by: Maxim Levitsky <mlevitsk@xxxxxxxxxx>
>> CC: "Darrick J. Wong" <darrick.wong@xxxxxxxxxx>
>> Link: https://lore.kernel.org/qemu-devel/20201111153913.41840-1-mlevitsk@xxxxxxxxxx
>> Signed-off-by: Jan Kara <jack@xxxxxxx>
> 
> Jens, can you please pick up this patch? Thanks!

Picked it up for 5.12, hope that works. It looks simple enough but not
really meeting criteria for 5.11 at this point.

-- 
Jens Axboe




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

  Powered by Linux