Skip to content

btrfs: small fixes related to qgroup deletion

Qu Wenruo linux-btrfs 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 1 replyIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3btrfs: qgroup: do not treat "ret > 0" as error when deleting a qgroupfs/btrfs/qgroup.c+1 -10 replies
2/3btrfs: qgroup: use qgroup_mark_inconsistent() in quick_update_accounting()fs/btrfs/qgroup.c+4 -10 replies
3/3btrfs: qgroup: do not leak -ENOENT from btrfs_remove_qgroup()fs/btrfs/qgroup.c+1 -00 replies

Reviews trailers per patch

None of the 3 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchFilipe Manana
SeriesR-b
1/3
2/3
3/3

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/3] btrfs: small fixes related to qgroup deletion

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(-)
Signature · 1 line
2.55.0