The filesystem cannot be downgraded after this feature is enabled.
Once enabled, the filesystem will not be mountable by older kernels.
This feature was added to Linux 5.10.
+.TP 0.4i
+.B nrext64
+Upgrade a filesystem to support large per-inode extent counters. The maximum
+data fork extent count will be 2^48 - 1, while the maximum attribute fork
+extent count will be 2^32 - 1. The filesystem cannot be downgraded after this
+feature is enabled. Once enabled, the filesystem will not be mountable by
+older kernels. This feature was added to Linux 5.19.
.RE
.TP
.BI \-U " uuid"
bool features_changed; /* did we change superblock feature bits? */
bool add_inobtcount; /* add inode btree counts to AGI */
bool add_bigtime; /* add support for timestamps up to 2486 */
+bool add_nrext64;
/* misc status variables */
extern bool features_changed; /* did we change superblock feature bits? */
extern bool add_inobtcount; /* add inode btree counts to AGI */
extern bool add_bigtime; /* add support for timestamps up to 2486 */
+extern bool add_nrext64;
/* misc status variables */
return true;
}
+static bool
+set_nrext64(
+ struct xfs_mount *mp,
+ struct xfs_sb *new_sb)
+{
+ if (!xfs_has_crc(mp)) {
+ printf(
+ _("Nrext64 only supported on V5 filesystems.\n"));
+ exit(0);
+ }
+
+ if (xfs_has_large_extent_counts(mp)) {
+ printf(_("Filesystem already supports nrext64.\n"));
+ exit(0);
+ }
+
+ printf(_("Adding nrext64 to filesystem.\n"));
+ new_sb->sb_features_incompat |= XFS_SB_FEAT_INCOMPAT_NREXT64;
+ new_sb->sb_features_incompat |= XFS_SB_FEAT_INCOMPAT_NEEDSREPAIR;
+ return true;
+}
+
struct check_state {
struct xfs_sb sb;
uint64_t features;
dirty |= set_inobtcount(mp, &new_sb);
if (add_bigtime)
dirty |= set_bigtime(mp, &new_sb);
+ if (add_nrext64)
+ dirty |= set_nrext64(mp, &new_sb);
if (!dirty)
return;
CONVERT_LAZY_COUNT = 0,
CONVERT_INOBTCOUNT,
CONVERT_BIGTIME,
+ CONVERT_NREXT64,
C_MAX_OPTS,
};
[CONVERT_LAZY_COUNT] = "lazycount",
[CONVERT_INOBTCOUNT] = "inobtcount",
[CONVERT_BIGTIME] = "bigtime",
+ [CONVERT_NREXT64] = "nrext64",
[C_MAX_OPTS] = NULL,
};
_("-c bigtime only supports upgrades\n"));
add_bigtime = true;
break;
+ case CONVERT_NREXT64:
+ if (!val)
+ do_abort(
+ _("-c nrext64 requires a parameter\n"));
+ if (strtol(val, NULL, 0) != 1)
+ do_abort(
+ _("-c nrext64 only supports upgrades\n"));
+ add_nrext64 = true;
+ break;
default:
unknown('c', val);
break;