All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] btrfs: small fixes related to qgroup deletion
@ 2026-10-01  5:16 Qu Wenruo
  2026-10-01  5:16 ` [PATCH 1/3] btrfs: qgroup: do not treat "ret > 0" as error when deleting a qgroup Qu Wenruo
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Qu Wenruo @ 2026-10-01  5:16 UTC (permalink / raw)
  To: linux-btrfs

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


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2026-10-01  8:59 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-01  5:16 [PATCH 0/3] btrfs: small fixes related to qgroup deletion Qu Wenruo
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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.