]> www.infradead.org Git - users/hch/xfs.git/commitdiff
xfs: check for incompatible features xfs-zoned-2024-08-22
authorChristoph Hellwig <hch@lst.de>
Sun, 28 Jul 2024 13:50:24 +0000 (06:50 -0700)
committerChristoph Hellwig <hch@lst.de>
Sun, 28 Jul 2024 13:57:45 +0000 (06:57 -0700)
We don't currenty support the rtsb or reflink features with zoned
devices.

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

index de2365069b2ddad894a78f0f8745cc4cd5bafd07..4c97bb56443aab7e7cbc675bccbd14440050d9d4 100644 (file)
@@ -1780,9 +1780,16 @@ xfs_fs_fill_super(
                xfs_warn(mp,
 "EXPERIMENTAL realtime allocation group feature in use. Use at your own risk!");
 
-       if (xfs_has_rtsb(mp))
+       if (xfs_has_rtsb(mp)) {
+               if (xfs_has_zoned(mp)) {
+                       xfs_alert(mp,
+       "realtime superblock feature not supported on zoned devices.");
+                       error = -EINVAL;
+                       goto out_filestream_unmount;
+               }
                xfs_warn(mp,
 "EXPERIMENTAL realtime superblock feature in use. Use at your own risk!");
+       }
 
        if (xfs_has_reflink(mp)) {
                /*
@@ -1798,6 +1805,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;
+               }
+
                /*
                 * always-cow mode is not supported on filesystems with rt
                 * extent sizes larger than a single block because we'd have