Re: [PATCH 20/43] xfs: disable FITRIM for zoned RT devices

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

 



On Wed, Dec 11, 2024 at 09:54:45AM +0100, Christoph Hellwig wrote:
> 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@xxxxxx>

Makes sense,
Reviewed-by: "Darrick J. Wong" <djwong@xxxxxxxxxx>

--D

> ---
>  fs/xfs/xfs_discard.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/fs/xfs/xfs_discard.c b/fs/xfs/xfs_discard.c
> index c4bd145f5ec1..4447c835a373 100644
> --- a/fs/xfs/xfs_discard.c
> +++ b/fs/xfs/xfs_discard.c
> @@ -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)
> -- 
> 2.45.2
> 
> 




[Index of Archives]     [XFS Filesystem Development (older mail)]     [Linux Filesystem Development]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux RAID]     [Linux SCSI]


  Powered by Linux