]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
xfs_admin: support adding features to V5 filesystems
authorDarrick J. Wong <djwong@kernel.org>
Wed, 24 Feb 2021 01:20:57 +0000 (20:20 -0500)
committerEric Sandeen <sandeen@sandeen.net>
Wed, 24 Feb 2021 01:20:57 +0000 (20:20 -0500)
Teach the xfs_admin script how to add features to V5 filesystems.
Technically speaking we could add lazycount to the list, but that option
is only useful for the V4 format which is deprecated.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
db/xfs_admin.sh
man/man8/xfs_admin.8

index 430872efa0f1e379021719b4f7bac70ba7479161..7a467dbe8dfeec731e6afaf50424e908a97725ed 100755 (executable)
@@ -8,9 +8,10 @@ status=0
 DB_OPTS=""
 REPAIR_OPTS=""
 REPAIR_DEV_OPTS=""
-USAGE="Usage: xfs_admin [-efjlpuV] [-c 0|1] [-L label] [-r rtdev] [-U uuid] device [logdev]"
+DB_LOG_OPTS=""
+USAGE="Usage: xfs_admin [-efjlpuV] [-c 0|1] [-L label] [-O v5_feature] [-r rtdev] [-U uuid] device [logdev]"
 
-while getopts "c:efjlL:pr:uU:V" c
+while getopts "c:efjlL:O:pr:uU:V" c
 do
        case $c in
        c)      REPAIR_OPTS=$REPAIR_OPTS" -c lazycount="$OPTARG;;
@@ -19,6 +20,7 @@ do
        j)      DB_OPTS=$DB_OPTS" -c 'version log2'";;
        l)      DB_OPTS=$DB_OPTS" -r -c label";;
        L)      DB_OPTS=$DB_OPTS" -c 'label "$OPTARG"'";;
+       O)      REPAIR_OPTS=$REPAIR_OPTS" -c $OPTARG=1";;
        p)      DB_OPTS=$DB_OPTS" -c 'version projid32bit'";;
        r)      REPAIR_DEV_OPTS=" -r '$OPTARG'";;
        u)      DB_OPTS=$DB_OPTS" -r -c uuid";;
index cf5f423cc41b6cfac1c08826a0e2ac4f99259e2b..cdb444b9c866cbff8d426e0817ff0359778969ff 100644 (file)
@@ -6,6 +6,8 @@ xfs_admin \- change parameters of an XFS filesystem
 [
 .B \-eflpu
 ] [
+.BI \-O " featurelist"
+] [
 .BR "\-c 0" | 1
 ] [
 .B \-L
@@ -114,6 +116,26 @@ The filesystem label can be cleared using the special "\c
 " value for
 .IR label .
 .TP
+.BI \-O " feature1" = "status" , "feature2" = "status..."
+Add or remove features on an existing V5 filesystem.
+The features should be specified as a comma-separated list.
+.I status
+should be either 0 to disable the feature or 1 to enable the feature.
+Note, however, that most features cannot be disabled.
+.IP
+.B NOTE:
+Administrators must ensure the filesystem is clean by running
+.B xfs_repair -n
+to inspect the filesystem before performing the upgrade.
+If corruption is found, recovery procedures (e.g. reformat followed by
+restoration from backup; or running
+.B xfs_repair
+without the
+.BR -n )
+must be followed to clean the filesystem.
+.IP
+There are no feature options currently.
+.TP
 .BI \-U " uuid"
 Set the UUID of the filesystem to
 .IR uuid .