aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDarrick J. Wong <djwong@kernel.org>2024-01-09 09:40:34 -0800
committerDarrick J. Wong <djwong@kernel.org>2024-05-10 17:22:24 -0700
commit92d72ffd12acf49f0740ad060b72c2a18c8ae12d (patch)
tree35e328d86ff39a4640c7d80e2b27b56472833c10
parentb9069b566273c92bd160b7b35becf49622af26fb (diff)
downloadxfsprogs-dev-realtime-reflink-extsize.tar.gz
mkfs: enable reflink with realtime extent sizes > 1realtime-reflink-extsize_2024-05-10realtime-reflink-extsize
Allow creation of filesystems with reflink enabled and realtime extent size larger than 1 block. Signed-off-by: Darrick J. Wong <djwong@kernel.org>
-rw-r--r--libxfs/init.c7
-rw-r--r--mkfs/xfs_mkfs.c37
2 files changed, 0 insertions, 44 deletions
diff --git a/libxfs/init.c b/libxfs/init.c
index e3ba1e789d..7dcb12b15d 100644
--- a/libxfs/init.c
+++ b/libxfs/init.c
@@ -301,13 +301,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);
diff --git a/mkfs/xfs_mkfs.c b/mkfs/xfs_mkfs.c
index 7c8cd04abb..7e30404646 100644
--- a/mkfs/xfs_mkfs.c
+++ b/mkfs/xfs_mkfs.c
@@ -2482,24 +2482,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 (cli->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)) {
@@ -2688,19 +2670,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,
@@ -2732,12 +2701,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. */