From: Josef Bacik <josef@toxicpanda.com>
To: Qu Wenruo <wqu@suse.com>,
fstests@vger.kernel.org, linux-btrfs@vger.kernel.org
Subject: Re: [PATCH 1/3] fstests: btrfs: Use word mathcing for _btrfs_get_subvolid()
Date: Thu, 6 Feb 2020 21:09:34 -0500 [thread overview]
Message-ID: <2b676a46-96b5-c461-667a-d85ae6e8a70d@toxicpanda.com> (raw)
In-Reply-To: <20200207015942.9079-2-wqu@suse.com>
On 2/6/20 8:59 PM, Qu Wenruo wrote:
> Current _btrfs_get_subvolid() can't handle the following case at all:
> # btrfs subvol list $SCRATCH_MNT
> ID 256 gen 9 top level 5 path subv1
> ID 257 gen 7 top level 256 path subv1/subv2
> ID 258 gen 8 top level 256 path subv1/subv3
> ID 259 gen 9 top level 256 path subv1/subv4
>
> If we call "_btrfs_get_subvolid $SCRATCH_MNT subv1" we will get a list
> of all subvolumes, not the subvolid of subv1.
>
> To address this problem, we go egrep to match $name which starts with a
> space, and at the end of a line.
> So that all other subvolumes won't hit.
>
> Suggested-by: Josef Bacik <josef@toxicpanda.com>
> Signed-off-by: Qu Wenruo <wqu@suse.com>
Reviewed-by: Josef Bacik <josef@toxicpanda.com>
Thanks,
Josef
next prev parent reply other threads:[~2020-02-07 2:09 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-07 1:59 [PATCH 0/3] fstests: btrfs/022 fixes Qu Wenruo
2020-02-07 1:59 ` [PATCH 1/3] fstests: btrfs: Use word mathcing for _btrfs_get_subvolid() Qu Wenruo
2020-02-07 2:09 ` Josef Bacik [this message]
2020-02-07 9:41 ` Nikolay Borisov
2020-02-07 10:02 ` Qu Wenruo
2020-02-07 11:07 ` Nikolay Borisov
2020-02-07 1:59 ` [PATCH 2/3] fstests: btrfs/022: Match qgroup id more correctly Qu Wenruo
2020-02-07 2:10 ` Josef Bacik
2020-02-07 9:46 ` Nikolay Borisov
2020-02-07 10:03 ` Qu Wenruo
2020-02-07 1:59 ` [PATCH 3/3] fstests: btrfs/022: Add debug output Qu Wenruo
2020-02-07 2:10 ` Josef Bacik
2020-02-07 9:48 ` Nikolay Borisov
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=2b676a46-96b5-c461-667a-d85ae6e8a70d@toxicpanda.com \
--to=josef@toxicpanda.com \
--cc=fstests@vger.kernel.org \
--cc=linux-btrfs@vger.kernel.org \
--cc=wqu@suse.com \
/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;
as well as URLs for NNTP newsgroup(s).