Skip to content

btrfs: some fixes related to the extent map shrinker

[email protected] linux-btrfs 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 5 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3btrfs: fix use-after-free on inode when scanning root during em shrinkingfs/btrfs/extent_map.c+1 -21 reply
2/3btrfs: skip inodes without loaded extent maps when shrinking extent mapsfs/btrfs/extent_map.c+56 -212 replies
3/3btrfs: do regular iput instead of delayed iput during extent map shrinkingfs/btrfs/extent_map.c+1 -11 reply

Reviews trailers per patch

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

PatchIvan ShapovalovJohannes ThumshirnQu Wenruo
SeriesR-b
1/3T-b R-b
2/3T-b R-b
3/3T-b R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v1 thread

Cover letter [PATCH 0/3] btrfs: some fixes related to the extent map shrinker

From: Filipe Manana <[email protected]>

A few fixes and improvements for the extent map shrinker. The first is a use-after-free that is likely hard to hit and the other two fixes make things more efficient by avoiding grabbing and dropping (iput) inodes which don't have extent maps loaded as well as eleminating the need to do delayed iputs, as that's not needed anymore.

These are related to a recent report from Ivan Shapovalov where the cleaner kthread was using over 50% of CPU doing a lot of delayed iputs:

https://lore.kernel.org/linux-btrfs/[email protected]/

More details in the change logs.

Filipe Manana (3):
btrfs: fix use-after-free on inode when scanning root during em shrinking
btrfs: skip inodes without loaded extent maps when shrinking extent maps
btrfs: do regular iput instead of delayed iput during extent map shrinking

 fs/btrfs/extent_map.c | 82 ++++++++++++++++++++++++++++++-------------
 1 file changed, 58 insertions(+), 24 deletions(-)
Signature · 1 line
2.45.2