]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
xfs_admin: get/set label of mounted filesystem origin/for-next_2023-02-14 origin/for-next_2023-02-16 origin/for-next_2023-02-17
authorCatherine Hoang <catherine.hoang@oracle.com>
Thu, 26 Jan 2023 00:33:11 +0000 (16:33 -0800)
committerCarlos Maiolino <cem@kernel.org>
Fri, 3 Feb 2023 12:55:02 +0000 (13:55 +0100)
Adapt this tool to call xfs_io to get/set the label of a mounted filesystem.

Signed-off-by: Catherine Hoang <catherine.hoang@oracle.com>
Reviewed-by: Allison Henderson <allison.henderson@oracle.com>
Reviewed-by: Carlos Maiolino <cmaiolino@redhat.com>
Signed-off-by: Carlos Maiolino <cem@kernel.org>
db/xfs_admin.sh

index 3a7f44ea2519467643e7a5fabc31ca992d88a2d0..cc650c4255036b51d29320edd59af3dee49c0fdf 100755 (executable)
@@ -29,9 +29,11 @@ do
        j)      DB_OPTS=$DB_OPTS" -c 'version log2'"
                require_offline=1
                ;;
-       l)      DB_OPTS=$DB_OPTS" -r -c label";;
+       l)      DB_OPTS=$DB_OPTS" -r -c label"
+               IO_OPTS=$IO_OPTS" -r -c label"
+               ;;
        L)      DB_OPTS=$DB_OPTS" -c 'label "$OPTARG"'"
-               require_offline=1
+               IO_OPTS=$IO_OPTS" -c 'label -s "$OPTARG"'"
                ;;
        O)      REPAIR_OPTS=$REPAIR_OPTS" -c $OPTARG"
                require_offline=1