Skip to content

btrfs: Delay block group auto removal to avoid interfering qgroups

Qu Wenruo linux-btrfs 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 4 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3btrfs: trace: Add trace points for unused block groupsfs/btrfs/extent-tree.c fs/btrfs/scrub.c include/trace/events/btrfs.h+47 -00 replies
2/3btrfs: Use btrfs_mark_bg_unused() to replace open codefs/btrfs/ctree.h fs/btrfs/extent-tree.c fs/btrfs/scrub.c+19 -271 reply
3/3btrfs: Delayed empty block group auto removal to next transactionfs/btrfs/ctree.h fs/btrfs/extent-tree.c fs/btrfs/scrub.c +2 more+50 -62 replies

Reviews trailers per patch

1 of 3 patches has a Reviewed-by or Acked-by.

PatchNikolay Borisov
1/3
2/3R-b
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: Delay block group auto removal to avoid interfering qgroups

The patchset can be fetched from github:
https://github.com/adam900710/linux/tree/delayed_bg_removal

It's based on v4.17-rc5 branch.

This bug is reported from SUSE openQA, although it's pretty hard to hit in real world (even real world VM), it's believed block group auto removal (anyway, there isn't much thing can remove a chunk mapping in btrfs) could interfere with qgroup's search on commit root.

Full details can be found in the 3rd patch.

The patchset uses 2 submitted cleanup/refactor patches as basis, and the 3rd patch will ensure unused block group will only be deleted after current transaction is done.

Qu Wenruo (3):
btrfs: trace: Add trace points for unused block groups
btrfs: Use btrfs_mark_bg_unused() to replace open code
btrfs: Delayed empty block group auto removal to next transaction

 fs/btrfs/ctree.h             |  2 ++
 fs/btrfs/extent-tree.c       | 62 ++++++++++++++++++++++++++----------
 fs/btrfs/scrub.c             |  8 +----
 fs/btrfs/transaction.c       |  7 ++++
 fs/btrfs/transaction.h       | 10 ++++++
 include/trace/events/btrfs.h | 42 ++++++++++++++++++++++++
 6 files changed, 107 insertions(+), 24 deletions(-)
Signature · 1 line
2.17.0