From: Qu Wenruo <quwenruo.btrfs@gmx.com>
To: dsterba@suse.cz, Qu Wenruo <wqu@suse.com>
Cc: linux-btrfs@vger.kernel.org, boris@bur.io
Subject: Re: [PATCH v2 2/2] btrfs: automatically remove the subvolume qgroup
Date: Thu, 25 Apr 2024 07:49:12 +0930 [thread overview]
Message-ID: <598907d6-77e0-4134-b709-51106dcfb2f8@gmx.com> (raw)
In-Reply-To: <20240424124156.GO3492@twin.jikos.cz>
在 2024/4/24 22:11, David Sterba 写道:
> On Fri, Apr 19, 2024 at 07:16:53PM +0930, Qu Wenruo wrote:
>> Currently if we fully removed a subvolume (not only unlinked, but fully
>> dropped its root item), its qgroup would not be removed.
>>
>> Thus we have "btrfs qgroup clear-stale" to handle such 0 level qgroups.
>
> There's also an option 'btrfs subvolume delete --delete-qgroup' that
> does that and is going to be default in 6.9. With this kernel change it
> would break the behaviour of the --no-delete-qgroup, which is there for
> the case something depends on that. For now I'd rather postpone
> changing the kernel behaviour.
>
A quick glance of the --delete-qgroup shows it won't work as expected at
all.
Firstly, the qgroup delete requires the qgroup numbers to be 0.
Meanwhile qgroup numbers can only be 0 after 1) the full subvolume has
been dropped 2) a transaction is committed to reflect the qgroup numbers.
Both situation is only handled in my patchset, thus this means for a lot
of cases it won't work at all.
Furthermore, there is the drop_subtree_threshold thing, which can mark
qgroup inconsistent and skip accounting, making the target subvolume's
qgroup numbers never fall back to 0 (until next rescan).
So I'm afraid the --delete-qgroup won't work until the 1/2 patch get
merged (allowing deleting qgroups as long as the target subvolume is gone).
Thanks,
Qu
next prev parent reply other threads:[~2024-04-24 22:19 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-19 9:46 [PATCH v2 0/2] btrfs: qgroup: stale qgroups related impromvents Qu Wenruo
2024-04-19 9:46 ` [PATCH v2 1/2] btrfs: slightly loose the requirement for qgroup removal Qu Wenruo
2024-04-29 12:47 ` Boris Burkov
2024-04-29 22:00 ` Qu Wenruo
2024-04-29 22:19 ` Boris Burkov
2024-04-29 22:29 ` Qu Wenruo
2024-04-29 22:38 ` Boris Burkov
2024-04-19 9:46 ` [PATCH v2 2/2] btrfs: automatically remove the subvolume qgroup Qu Wenruo
2024-04-24 12:41 ` David Sterba
2024-04-24 22:19 ` Qu Wenruo [this message]
2024-04-25 12:34 ` David Sterba
2024-04-25 21:51 ` Qu Wenruo
2024-04-29 13:13 ` Boris Burkov
2024-04-29 16:31 ` David Sterba
2024-04-29 22:05 ` Qu Wenruo
2024-04-30 10:59 ` David Sterba
2024-04-30 22:05 ` Qu Wenruo
2024-04-30 22:18 ` Boris Burkov
2024-04-30 22:27 ` Qu Wenruo
2024-05-02 15:03 ` David Sterba
2024-05-02 21:29 ` Qu Wenruo
2024-05-03 12:46 ` David Sterba
2024-05-03 22:14 ` Qu Wenruo
2024-05-02 15:00 ` David Sterba
2024-05-02 21:27 ` Qu Wenruo
2024-04-29 22:49 ` Qu Wenruo
2024-04-29 16:36 ` David Sterba
2024-04-29 12:57 ` Boris Burkov
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=598907d6-77e0-4134-b709-51106dcfb2f8@gmx.com \
--to=quwenruo.btrfs@gmx.com \
--cc=boris@bur.io \
--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;
as well as URLs for NNTP newsgroup(s).