From: Qu Wenruo <wqu@suse.com>
To: linux-btrfs@vger.kernel.org
Subject: [PATCH 0/3] btrfs: small fixes related to qgroup deletion
Date: Thu, 1 Oct 2026 14:46:14 +0930 [thread overview]
Message-ID: <cover.1790831600.git.wqu@suse.com> (raw)
There is a recent bug report that when deleting a qgroup that is not
fully exclusively owned, it can make all future qgroup operations to
fail.
It turns out to be a problem handling "ret > 0" cases when deleting a
qgroup.
The first patch is the root fix.
The seconds patch is to improve the error reporting of
quick_update_accounting().
Finally there is a pre-existing problem exposed by that "ret > 0"
handling, that if we use btrfs_remove_qgroup() on a qgroup that only
exists in the rb-tree, it will return -ENOENT meanwhile still deletes
the in-memory qgroup.
Fix that -ENOENT leak in the last patch.
Qu Wenruo (3):
btrfs: qgroup: do not treat "ret > 0" as error when deleting a qgroup
btrfs: qgroup: use qgroup_mark_inconsistent() in
quick_update_accounting()
btrfs: qgroup: do not leak -ENOENT from btrfs_remove_qgroup()
fs/btrfs/qgroup.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
--
2.55.0
next reply other threads:[~2026-10-01 5:16 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-01 5:16 Qu Wenruo [this message]
2026-10-01 5:16 ` [PATCH 1/3] btrfs: qgroup: do not treat "ret > 0" as error when deleting a qgroup Qu Wenruo
2026-10-01 5:16 ` [PATCH 2/3] btrfs: qgroup: use qgroup_mark_inconsistent() in quick_update_accounting() Qu Wenruo
2026-10-01 5:16 ` [PATCH 3/3] btrfs: qgroup: do not leak -ENOENT from btrfs_remove_qgroup() Qu Wenruo
2026-10-01 8:59 ` [PATCH 0/3] btrfs: small fixes related to qgroup deletion 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=cover.1790831600.git.wqu@suse.com \
--to=wqu@suse.com \
--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