]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
xfs: enable realtime rmap btree
authorDarrick J. Wong <djwong@kernel.org>
Thu, 21 Nov 2024 00:20:45 +0000 (16:20 -0800)
committerDarrick J. Wong <djwong@kernel.org>
Mon, 23 Dec 2024 21:06:09 +0000 (13:06 -0800)
Permit mounting filesystems with realtime rmap btrees.

Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
fs/xfs/xfs_rtalloc.c
fs/xfs/xfs_super.c

index 3c1bce5a4855f2118665b5d21cf692dc46bdd895..a69967f9d88ead37e860e01a63b1ee71423f0f72 100644 (file)
@@ -1282,11 +1282,15 @@ xfs_growfs_rt(
            XFS_FSB_TO_B(mp, in->extsize) < XFS_MIN_RTEXTSIZE)
                goto out_unlock;
 
-       /* Unsupported realtime features. */
+       /* Check for features supported only on rtgroups filesystems. */
        error = -EOPNOTSUPP;
-       if (xfs_has_quota(mp) && !xfs_has_rtgroups(mp))
-               goto out_unlock;
-       if (xfs_has_rmapbt(mp) || xfs_has_reflink(mp))
+       if (!xfs_has_rtgroups(mp)) {
+               if (xfs_has_rmapbt(mp))
+                       goto out_unlock;
+               if (xfs_has_quota(mp))
+                       goto out_unlock;
+       }
+       if (xfs_has_reflink(mp))
                goto out_unlock;
 
        error = xfs_sb_validate_fsb_count(&mp->m_sb, in->newblocks);
index 394fdf3bb535311afd99bd191e693e47a72e6742..ecd5a9f444d86228658f4e57df40da353c672b65 100644 (file)
@@ -1767,12 +1767,6 @@ xfs_fs_fill_super(
                }
        }
 
-       if (xfs_has_rmapbt(mp) && mp->m_sb.sb_rblocks) {
-               xfs_alert(mp,
-       "reverse mapping btree not compatible with realtime device!");
-               error = -EINVAL;
-               goto out_filestream_unmount;
-       }
 
        if (xfs_has_exchange_range(mp))
                xfs_warn_experimental(mp, XFS_EXPERIMENTAL_EXCHRANGE);