mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-09-18 22:14:16 +00:00
xfs: disable FITRIM for zoned RT devices
The zoned allocator unconditionally issues zone resets or discards after emptying an entire zone, so supporting FITRIM for a zoned RT device is not useful. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: "Darrick J. Wong" <djwong@kernel.org>
This commit is contained in:
parent
1d319ac6fe
commit
f044dda351
1 changed files with 2 additions and 1 deletions
|
|
@ -844,7 +844,8 @@ xfs_ioc_trim(
|
|||
|
||||
if (!capable(CAP_SYS_ADMIN))
|
||||
return -EPERM;
|
||||
if (mp->m_rtdev_targp &&
|
||||
|
||||
if (mp->m_rtdev_targp && !xfs_has_zoned(mp) &&
|
||||
bdev_max_discard_sectors(mp->m_rtdev_targp->bt_bdev))
|
||||
rt_bdev = mp->m_rtdev_targp->bt_bdev;
|
||||
if (!bdev_max_discard_sectors(mp->m_ddev_targp->bt_bdev) && !rt_bdev)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue