Skip to content

btrfs: various qg meta rsv leak fixes

Boris Burkov linux-btrfs 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest7 patches 14 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/7btrfs: correctly model root qgroup rsv in convertfs/btrfs/qgroup.c+2 -03 replies
2/7btrfs: fix qgroup prealloc rsv leak in subvolume operationsfs/btrfs/inode.c fs/btrfs/ioctl.c fs/btrfs/root-tree.c +1 more+40 -221 reply
3/7btrfs: record delayed inode root in transactionfs/btrfs/delayed-inode.c+3 -02 replies
4/7btrfs: convert PREALLOC to PERTRANS after record_root_in_transfs/btrfs/transaction.c+8 -91 reply
5/7btrfs: free pertrans at end of cleanup_transactionfs/btrfs/disk-io.c+1 -23 replies
6/7btrfs: btrfs_clear_delalloc_extent frees rsvfs/btrfs/inode.c+1 -13 replies
7/7btrfs: always clear meta pertrans during commitfs/btrfs/transaction.c+1 -11 reply

Reviews trailers per patch

6 of 7 patches have a Reviewed-by or Acked-by.

PatchQu Wenruo
1/7R-b
2/7R-b
3/7R-b
4/7R-b
5/7
6/7R-b
7/7R-b

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/7] btrfs: various qg meta rsv leak fixes

generic/269 and generic/475 expose a number of reservation accounting issues in the btrfs quotas code that is shared between qgroups and squotas. In particular, error paths for failed transactions and errors in start_transaction and other critical functions for root per-trans accounting.

These semi-related patches fix up a number of such issues. With them, generic/269 with -O squota passed 1000+ times in a row for me and generic/475 has run hundreds of iterations without ever failing on a metadata reservation leak warning. generic/475 does still see issues with qgroup data reservation accounting and only passes ~9/10 times on my system.

Boris Burkov (7):
btrfs: correctly model root qgroup rsv in convert
btrfs: fix qgroup prealloc rsv leak in subvolume operations
btrfs: record delayed inode root in transaction
btrfs: convert PREALLOC to PERTRANS after record_root_in_trans
btrfs: free pertrans at end of cleanup_transaction
btrfs: btrfs_clear_delalloc_extent frees rsv
btrfs: always clear meta pertrans during commit

 fs/btrfs/delayed-inode.c |  3 +++
 fs/btrfs/disk-io.c       |  3 +--
 fs/btrfs/inode.c         | 15 +++++++++++++--
 fs/btrfs/ioctl.c         | 37 ++++++++++++++++++++++++++++---------
 fs/btrfs/qgroup.c        |  2 ++
 fs/btrfs/root-tree.c     | 10 ----------
 fs/btrfs/root-tree.h     |  2 --
 fs/btrfs/transaction.c   | 19 +++++++++----------
 8 files changed, 56 insertions(+), 35 deletions(-)
Signature · 1 line
2.44.0