]> www.infradead.org Git - users/hch/xfsprogs.git/commitdiff
mkfs: enable reflink with realtime extent sizes > 1
authorDarrick J. Wong <djwong@kernel.org>
Wed, 7 Aug 2024 22:54:50 +0000 (15:54 -0700)
committerDarrick J. Wong <djwong@kernel.org>
Wed, 14 Aug 2024 03:08:25 +0000 (20:08 -0700)
Allow creation of filesystems with reflink enabled and realtime extent
size larger than 1 block.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
libxfs/init.c
mkfs/xfs_mkfs.c

index e3e7cd12b8c008e95ed2cdb2e4ffd4a512236f9d..f86e28d4c876fb2f13f9ef8d6ff25a82c201210d 100644 (file)
@@ -300,13 +300,6 @@ rtmount_init(
        if (mp->m_sb.sb_rblocks == 0)
                return 0;
 
-       if (xfs_has_reflink(mp) && mp->m_sb.sb_rextsize > 1) {
-               fprintf(stderr,
-       _("%s: Reflink not compatible with realtime extent size > 1. Please try a newer xfsprogs.\n"),
-                               progname);
-               return -1;
-       }
-
        if (mp->m_rtdev_targp->bt_bdev == 0 && !xfs_is_debugger(mp)) {
                fprintf(stderr, _("%s: filesystem has a realtime subvolume\n"),
                        progname);
index aad44874e094d43743141a9ed3b77ba1526e1612..e9e0c2951ee26a3efd4b26bc1ff8ef90cedd2a5d 100644 (file)
@@ -2553,24 +2553,6 @@ _("inode btree counters not supported without finobt support\n"));
        }
 
        if (cli->xi->rt.name) {
-               if (cli->rtextsize && cli->sb_feat.reflink) {
-                       if (cli_opt_set(&mopts, M_REFLINK)) {
-                               fprintf(stderr,
-_("reflink not supported on realtime devices with rt extent size specified\n"));
-                               usage();
-                       }
-                       cli->sb_feat.reflink = false;
-               }
-               if (cfg->blocksize < XFS_MIN_RTEXTSIZE && cli->sb_feat.reflink) {
-                       if (cli_opt_set(&mopts, M_REFLINK)) {
-                               fprintf(stderr,
-_("reflink not supported on realtime devices with blocksize %d < %d\n"),
-                                               cli->blocksize,
-                                               XFS_MIN_RTEXTSIZE);
-                               usage();
-                       }
-                       cli->sb_feat.reflink = false;
-               }
                if (!cli->sb_feat.rtgroups && cli->sb_feat.reflink) {
                        if (cli_opt_set(&mopts, M_REFLINK) &&
                            cli_opt_set(&ropts, R_RTGROUPS)) {
@@ -2795,19 +2777,6 @@ validate_rtextsize(
                        usage();
                }
                cfg->rtextblocks = (xfs_extlen_t)(rtextbytes >> cfg->blocklog);
-       } else if (cli->sb_feat.reflink && cli->xi->rt.name) {
-               /*
-                * reflink doesn't support rt extent size > 1FSB yet, so set
-                * an extent size of 1FSB.  Make sure we still satisfy the
-                * minimum rt extent size.
-                */
-               if (cfg->blocksize < XFS_MIN_RTEXTSIZE) {
-                       fprintf(stderr,
-               _("reflink not supported on rt volume with blocksize %d\n"),
-                               cfg->blocksize);
-                       usage();
-               }
-               cfg->rtextblocks = 1;
        } else {
                /*
                 * If realtime extsize has not been specified by the user,
@@ -2839,12 +2808,6 @@ validate_rtextsize(
                }
        }
        ASSERT(cfg->rtextblocks);
-
-       if (cli->sb_feat.reflink && cfg->rtblocks > 0 && cfg->rtextblocks > 1) {
-               fprintf(stderr,
-_("reflink not supported on realtime with extent sizes > 1\n"));
-               usage();
-       }
 }
 
 /* Validate the incoming extsize hint. */