]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
btrfs: relax squota parent qgroup deletion rule
authorBoris Burkov <boris@bur.io>
Mon, 1 Dec 2025 23:35:02 +0000 (15:35 -0800)
committerDavid Sterba <dsterba@suse.com>
Tue, 3 Feb 2026 05:38:31 +0000 (06:38 +0100)
commitadb0af40fe89fd42f1ef277bf60d9cfa7c2ae472
treea855042ca56c52adebc4bc256e6803b916bd73b9
parent9c46bcda5f347febdbb4d117fb21a37ffcec5fa4
btrfs: relax squota parent qgroup deletion rule

Currently, with squotas, we do not allow removing a parent qgroup with
no members if it still has usage accounted to it. This makes it really
difficult to recover from accounting bugs, as we have no good way of
getting back to 0 usage.

Instead, allow deletion (it's safe at 0 members..) while still warning
about the inconsistency by adding a squota parent check.

Reviewed-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: Boris Burkov <boris@bur.io>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/qgroup.c