[prev in list] [next in list] [prev in thread] [next in thread]
List: fstests
Subject: Re: [PATCH 1/6 v3] common/rc: _fs_sysfs_dname fetch fsid using btrfs tool
From: Anand Jain <anand.jain () oracle ! com>
Date: 2023-10-30 23:48:53
Message-ID: 6197ae04-5bfa-44e9-a176-47f1d56d8a87 () oracle ! com
[Download RAW message or body]
On 10/31/23 00:16, Filipe Manana wrote:
> On Mon, Oct 30, 2023 at 2:15 PM Anand Jain <anand.jain@oracle.com> wrote:
>>
>> Currently _fs_sysfs_dname gets fsid from the findmnt command however
>> this command provides the metadata_uuid in the context device is
>
> in -> if
>
>> mounted with temp-fsid. So instead, use btrfs filesystem show command to
>> know the temp-fsid.
>>
>> Signed-off-by: Anand Jain <anand.jain@oracle.com>
>> ---
>>
>> v3: add local variable fsid
>>
>> common/rc | 5 ++++-
>> 1 file changed, 4 insertions(+), 1 deletion(-)
>>
>> diff --git a/common/rc b/common/rc
>> index 259a1ffb09b9..18d2ddcf8e35 100644
>> --- a/common/rc
>> +++ b/common/rc
>> @@ -4721,6 +4721,7 @@ _require_statx()
>> _fs_sysfs_dname()
>> {
>> local dev=$1
>> + local fsid
>>
>> if [ ! -b "$dev" ]; then
>> _fail "Usage: _fs_sysfs_dname <mounted_device>"
>> @@ -4728,7 +4729,9 @@ _fs_sysfs_dname()
>>
>> case "$FSTYP" in
>> btrfs)
>> - findmnt -n -o UUID ${dev} ;;
>> + fsid=$($BTRFS_UTIL_PROG filesystem show ${dev} | grep uuid: | \
>> + awk '{print $NF}')
>
> awk -> $AWK_PROG
>
> Besides that, it looks fine, thanks.
>
> Reviewed-by: Filipe Manana <fdmanana@suse.com>
>
Fixed locally. Thx.
Anand
>> + echo $fsid ;;
>> *)
>> _short_dev $dev ;;
>> esac
>> --
>> 2.39.3
>>
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic