Re: [PATCH 3/3] f2fs: improve discard handling with multi-device volumes

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

 



On 2019/3/16 8:13, Damien Le Moal wrote:
> f2fs_hw_support_discard() only tests if the super block device supports
> discard. However, for a multi-device volume, not all disks used may
> support discard. Improve the check performed to test all devices of
> the volume and report discard as supported if at least one device of
> the volume supports discard. To implement this, introduce the helper
> function f2fs_bdev_support_discard(), which returns true for zoned block
> devices (where discard is processed as a zone reset) and for regular
> disks supporting the discard command.
> 
> f2fs_bdev_support_discard() is also used in __queue_discard_cmd() to
> handle discard command issuing for a particular device of the volume.
> That is, prevent issuing a discard command for block devices that do
> not support it.
> 
> Signed-off-by: Damien Le Moal <damien.lemoal@xxxxxxx>

Reviewed-by: Chao Yu <yuchao0@xxxxxxxxxx>

Thanks,




[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