Re: [PATCH V3] block: loop:use kstatfs.f_bsize of backing file to set discard granularity

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

 



On Wed, 26 Jan 2022 11:58:30 +0800, Ming Lei wrote:
> If backing file's filesystem has implemented ->fallocate(), we think the
> loop device can support discard, then pass sb->s_blocksize as
> discard_granularity. However, some underlying FS, such as overlayfs,
> doesn't set sb->s_blocksize, and causes discard_granularity to be set as
> zero, then the warning in __blkdev_issue_discard() is triggered.
> 
> Christoph suggested to pass kstatfs.f_bsize as discard granularity, and
> this way is fine because kstatfs.f_bsize means 'Optimal transfer block
> size', which still matches with definition of discard granularity.
> 
> [...]

Applied, thanks!

[1/1] block: loop:use kstatfs.f_bsize of backing file to set discard granularity
      (no commit info)

Best regards,
-- 
Jens Axboe





[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux