xfs_admin: get/set label of mounted filesystems
v2 cover xfs_admin: get/set label of mounted filesystems
Hi all,
This series enables xfs_admin to get and set the label of online filesystems.
Comments and feedback appreciated!
Catherine
Catherine Hoang (2):
xfs_admin: correctly parse IO_OPTS parameters
xfs_admin: get/set label of mounted filesystem
db/xfs_admin.sh | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-)
Signature · 1 line
2.34.1
PATCH v2 1/2 xfs_admin: correctly parse IO_OPTS parameters
Change exec to eval so that the IO_OPTS parameters are parsed correctly when the parameters contain quotations.
--- db/xfs_admin.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
db/xfs_admin.sh +2 -1
@@ -69,7 +69,8 @@ case $# in fi if [ -n "$IO_OPTS" ]; then - exec xfs_io -p xfs_admin $IO_OPTS "$mntpt" + eval xfs_io -p xfs_admin $IO_OPTS "$mntpt" + exit $? fi fi
Signature · 1 line
2.34.1
Re: [PATCH v2 1/2] xfs_admin: correctly parse IO_OPTS parameters
Quoted 6 lines · Catherine Hoang
Change exec to eval so that the
IO_OPTSparameters are parsed correctly
when the parameters contain quotations.Fixes e7cd89b2da72 ("xfs_admin: get UUID of mounted filesystem")Signed-off-by Catherine Hoang <[email protected]>
Looks good to me
Quoted 20 lines
---
db/xfs_admin.sh | 3 ++-1 file changed, 2 insertions(+), 1 deletion(-)db/xfs_admin.sh +0
-0@@ -69,7 +69,8 @@ case $# infi
if [ -n "$IO_OPTS" ]; then
- execxfs_io-pxfs_admin$IO_OPTS "$mntpt"
+ evalxfs_io-pxfs_admin$IO_OPTS "$mntpt"
+ exit $?
fi
fi
Re: [PATCH v2 1/2] xfs_admin: correctly parse IO_OPTS parameters
In reply to Catherine HoangQuoted 5 lines · Catherine Hoang
Change exec to eval so that the
IO_OPTSparameters are parsed correctly when the parameters contain quotations.Fixes e7cd89b2da72 ("xfs_admin: get UUID of mounted filesystem")Signed-off-by Catherine Hoang <[email protected]>
Looks good, thanks Catherine..
Quoted 21 lines
--- db/xfs_admin.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)db/xfs_admin.sh +2
-2@@ -69,7 +69,8 @@ case $# in fi if [ -n "$IO_OPTS" ]; then - exec xfs_io -p xfs_admin $IO_OPTS "$mntpt" + eval xfs_io -p xfs_admin $IO_OPTS "$mntpt" + exit $? fi fi --2.34.1
Signature · 1 line
Carlos Maiolino
PATCH v2 2/2 xfs_admin: get/set label of mounted filesystem
In reply to Catherine HoangAdapt this tool to call xfs_io to get/set the label of a mounted filesystem.
--- db/xfs_admin.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
db/xfs_admin.sh +4 -2
@@ -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
Signature · 1 line
2.34.1
Re: [PATCH v2 2/2] xfs_admin: get/set label of mounted filesystem
Quoted 4 lines · Catherine Hoang
Adapt this tool to call
xfs_ioto get/set the label of a mounted filesystem.Signed-off-by Catherine Hoang <[email protected]>
Looks good. Thanks Catherine!
Quoted 22 lines
---
db/xfs_admin.sh | 6 ++++--1 file changed, 4 insertions(+), 2 deletions(-)db/xfs_admin.sh +0
-0@@ -29,9 +29,11 @@ doj) 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
Re: [PATCH v2 2/2] xfs_admin: get/set label of mounted filesystem
In reply to Catherine HoangQuoted 3 lines · Catherine Hoang
Adapt this tool to call
xfs_ioto get/set the label of a mounted filesystem.Signed-off-by Catherine Hoang <[email protected]>
Looks good, thanks!
Quoted 25 lines
--- db/xfs_admin.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)db/xfs_admin.sh +4
-3@@ -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
Signature · 1 line
Carlos Maiolino