From: Christoph Hellwig Date: Sun, 28 Jul 2024 13:50:24 +0000 (-0700) Subject: xfs: check for incompatible features X-Git-Tag: xfs-zoned-2024-08-22 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=75437bcbb5cd8c5bcf8719fcc587c6e4dc016df2;p=users%2Fhch%2Fxfs.git xfs: check for incompatible features We don't currenty support the rtsb or reflink features with zoned devices. Signed-off-by: Christoph Hellwig --- diff --git a/fs/xfs/xfs_super.c b/fs/xfs/xfs_super.c index de2365069b2d..4c97bb56443a 100644 --- a/fs/xfs/xfs_super.c +++ b/fs/xfs/xfs_super.c @@ -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