public inbox for fstests@vger.kernel.org
 help / color / mirror / Atom feed
From: Anand Jain <anand.jain@oracle.com>
To: Filipe Manana <fdmanana@kernel.org>
Cc: fstests@vger.kernel.org, linux-btrfs@vger.kernel.org
Subject: Re: [PATCH 1/6 v3] common/rc: _fs_sysfs_dname fetch fsid using btrfs tool
Date: Tue, 31 Oct 2023 07:48:53 +0800	[thread overview]
Message-ID: <6197ae04-5bfa-44e9-a176-47f1d56d8a87@oracle.com> (raw)
In-Reply-To: <CAL3q7H6ia6vg-MyXgR7zGvUOB-hVbFBJvQJmBxpdzojbcF_X7A@mail.gmail.com>



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
>>

  reply	other threads:[~2023-10-30 23:49 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-30 14:15 [PATCH 0/6 v3] btrfs/219 cloned-device mount capability update Anand Jain
2023-10-30 14:15 ` [PATCH 1/6 v3] common/rc: _fs_sysfs_dname fetch fsid using btrfs tool Anand Jain
2023-10-30 16:16   ` Filipe Manana
2023-10-30 23:48     ` Anand Jain [this message]
2023-10-30 14:15 ` [PATCH 2/6 v3] common/rc: _destroy_loop_device confirm arg1 is set Anand Jain
2023-10-30 16:21   ` Filipe Manana
2023-10-30 23:48     ` Anand Jain
2023-10-30 14:15 ` [PATCH 3/6 v3] common/btrfs: add helper _has_btrfs_sysfs_feature_attr Anand Jain
2023-10-30 16:23   ` Filipe Manana
2023-10-30 23:29     ` Anand Jain
2023-10-31 11:34       ` Filipe Manana
2023-10-30 14:15 ` [PATCH 4/6 v3] btrfs/219: fix _cleanup() to successful release the loop-device Anand Jain
2023-10-30 16:29   ` Filipe Manana
2023-11-02 11:28     ` [PATCH v4 0/5] btrfs/219 cloned-device mount capability update Anand Jain
2023-10-31  0:53       ` [PATCH v4 3/5] btrfs/219: fix _cleanup() to successful release the loop-device Anand Jain
2023-10-31 11:41         ` Filipe Manana
2023-10-31 14:32           ` Anand Jain
2023-11-01 11:20         ` Zorro Lang
2023-11-02 11:37           ` Anand Jain
2023-11-02 11:28         ` Anand Jain
2023-11-02 11:28       ` [PATCH v4 1/5] common/rc: _fs_sysfs_dname fetch fsid using btrfs tool Anand Jain
2023-11-02 20:00         ` David Sterba
2023-11-02 23:01           ` Anand Jain
2023-11-02 11:28       ` [PATCH v4 2/5] common/btrfs: add helper _has_btrfs_sysfs_feature_attr Anand Jain
2023-11-02 11:28       ` [PATCH v4 4/5] btrfs/219: cloned-device mount capability update Anand Jain
2023-11-02 11:28       ` [PATCH v4 5/5] btrfs/219: add to the auto group Anand Jain
2023-10-30 14:15 ` [PATCH 5/6 v3] btrfs/219: cloned-device mount capability update Anand Jain
2023-10-30 16:31   ` Filipe Manana
2023-10-30 14:15 ` [PATCH 6/6 v3] btrfs/219: add to the auto group Anand Jain
2023-10-30 16:32   ` Filipe Manana

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6197ae04-5bfa-44e9-a176-47f1d56d8a87@oracle.com \
    --to=anand.jain@oracle.com \
    --cc=fdmanana@kernel.org \
    --cc=fstests@vger.kernel.org \
    --cc=linux-btrfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox