Linux Btrfs filesystem development
 help / color / mirror / Atom feed
From: Qu Wenruo <quwenruo.btrfs@gmx.com>
To: dsterba@suse.cz, Qu Wenruo <wqu@suse.com>, linux-btrfs@vger.kernel.org
Subject: Re: [PATCH] btrfs-progs: parse-utils: allow single number qgroup id
Date: Tue, 12 Oct 2021 18:59:30 +0800	[thread overview]
Message-ID: <bf23e581-e03a-7254-b6d7-b9d67efaadc0@gmx.com> (raw)
In-Reply-To: <20211011132132.GH9286@twin.jikos.cz>



On 2021/10/11 21:21, David Sterba wrote:
> On Mon, Oct 11, 2021 at 03:09:37PM +0800, Qu Wenruo wrote:
>> [BUG]
>> Since btrfs-progs v5.14, fstests/btrfs/099 always fail with the
>> following output in 099.full:
>>
>>    ...
>>    # /usr/bin/btrfs quota enable /mnt/scratch
>>    # /usr/bin/btrfs qgroup limit 134217728 5 /mnt/scratch
>>    ERROR: invalid qgroupid or subvolume path: 5
>>    failed: '/usr/bin/btrfs qgroup limit 134217728 5 /mnt/scratch'
>>
>> [CAUSE]
>> Since commit cb5a542871f9 ("btrfs-progs: factor out plain qgroupid
>> parsing"), btrfs qgroup parser no longer accepts single number qgroup id
>> like "5" used in that test case.
>>
>> That commit is not a plain refactor without functional change, but
>> removed a simple feature.
>>
>> [FIX]
>> Add back the handling for single number qgroupid.
>
> This unfortunately breaks something else, as it's changing the whole
> parse_qgroupid helper to accept single value id, which is also used for
> 'qgroup create'.

For 'qgroup create' I think it's OK to accept single value id.

It's a handy shortcut for '0/<subvolid>'.

And for higher level qgroup, we need the level anyway.

>
> There's another combined helper for parsing qgroup id and path, so we
> may need to add another one that also accepts the subvolid, in commands
> where this makes sense. The helper parse_qgroupid should really remain
> as it is and parse the 'number/number' format.
>
Then I'm completely fine to update the test case to go "0/5".

But I'm not sure if this change would affect the existing user scripts.

(Considering there is no report yet I guess it's not that widely used
anyway?)

Thanks,
Qu

  reply	other threads:[~2021-10-12 10:59 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-11  7:09 [PATCH] btrfs-progs: parse-utils: allow single number qgroup id Qu Wenruo
2021-10-11  7:32 ` Nikolay Borisov
2021-10-11 13:21 ` David Sterba
2021-10-12 10:59   ` Qu Wenruo [this message]
2021-10-13 12:42     ` David Sterba
2021-10-13 12:55       ` Qu Wenruo

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=bf23e581-e03a-7254-b6d7-b9d67efaadc0@gmx.com \
    --to=quwenruo.btrfs@gmx.com \
    --cc=dsterba@suse.cz \
    --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