diff mbox series

[v2,2/2] xfs_admin: get/set label of mounted filesystem

Message ID 20230126003311.7736-3-catherine.hoang@oracle.com (mailing list archive)
State Accepted
Headers show
Series xfs_admin: get/set label of mounted filesystems | expand

Commit Message

Catherine Hoang Jan. 26, 2023, 12:33 a.m. UTC
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>
---
 db/xfs_admin.sh | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

Comments

Allison Henderson Jan. 26, 2023, 6:03 p.m. UTC | #1
On Wed, 2023-01-25 at 16:33 -0800, Catherine Hoang wrote:
> 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>
Looks good.  Thanks Catherine!
Reviewed-by: Allison Henderson <allison.henderson@oracle.com>

> ---
>  db/xfs_admin.sh | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/db/xfs_admin.sh b/db/xfs_admin.sh
> index 3a7f44ea..cc650c42 100755
> --- a/db/xfs_admin.sh
> +++ b/db/xfs_admin.sh
> @@ -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
Carlos Maiolino Feb. 3, 2023, 12:48 p.m. UTC | #2
On Wed, Jan 25, 2023 at 04:33:11PM -0800, Catherine Hoang wrote:
> 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>

Looks good, thanks!
Reviewed-by: Carlos Maiolino <cmaiolino@redhat.com>

> ---
>  db/xfs_admin.sh | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/db/xfs_admin.sh b/db/xfs_admin.sh
> index 3a7f44ea..cc650c42 100755
> --- a/db/xfs_admin.sh
> +++ b/db/xfs_admin.sh
> @@ -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
> --
> 2.34.1
>
diff mbox series

Patch

diff --git a/db/xfs_admin.sh b/db/xfs_admin.sh
index 3a7f44ea..cc650c42 100755
--- a/db/xfs_admin.sh
+++ b/db/xfs_admin.sh
@@ -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