]> www.infradead.org Git - users/hch/xfs.git/commitdiff
xfs: disable reflink for zoned file systems
authorChristoph Hellwig <hch@lst.de>
Sat, 21 Dec 2024 08:41:49 +0000 (08:41 +0000)
committerChristoph Hellwig <hch@lst.de>
Mon, 3 Feb 2025 04:49:14 +0000 (05:49 +0100)
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.

Signed-off-by: Christoph Hellwig <hch@lst.de>
fs/xfs/xfs_super.c

index 34b0f5a80412e212acb404298444f51e8e6e18dd..ceb1a855453e8d78b48b6354430c697a4e8613ef 100644 (file)
@@ -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;