Re: [PATCH 34/43] xfs: disable reflink for zoned file systems

Darrick J. Wong
2025-02-07T04:31:23Z

On Thu, Feb 06, 2025 at 07:44:50AM +0100, Christoph Hellwig wrote:
> While the zoned on-disk format supports reflinks, the GC code currently
> always unshares reflinks when moving blocks to new zones, thus making the
> feature unusuable. Disable reflinks until the GC code is refcount aware.

It might be worth mentioning that I've been working on a refcount-aware
free space defragmenter that could be used for this kind of thing,
albeit with the usual problems of userspace can't really stop the
kernel from filling its brains and starving our defragc process.

It would be interesting to load up that adversarial thread timing
sched_ext thing that I hear was talked about at fosdem.

> Signed-off-by: Christoph Hellwig <hch@lst.de>

Reluctantly,
Reviewed-by: "Darrick J. Wong" <djwong@kernel.org>

--D

> ---
> fs/xfs/xfs_super.c | 7 +++++++
> 1 file changed, 7 insertions(+)
>
> diff --git a/fs/xfs/xfs_super.c b/fs/xfs/xfs_super.c
> index 34b0f5a80412..ceb1a855453e 100644
> --- a/fs/xfs/xfs_super.c
> +++ b/fs/xfs/xfs_super.c
> @@ -1824,6 +1824,13 @@ xfs_fs_fill_super(
> goto out_filestream_unmount;
> }
>
> + if (xfs_has_zoned(mp)) {
> + xfs_alert(mp,
> + "reflink not compatible with zoned RT device!");
> + error = -EINVAL;
> + goto out_filestream_unmount;
> + }
> +
> if (xfs_globals.always_cow) {
> xfs_info(mp, "using DEBUG-only always_cow mode.");
> mp->m_always_cow = true;
> --
> 2.45.2
>
>