Skip to content

btrfs: fix a rare deadlock case when logging inodes

[email protected] 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: do not modify log tree while holding a leaf from fs tree lockedfs/btrfs/tree-log.c+55 -42 replies
2/3btrfs: unify overwrite_item() and do_overwrite_item()fs/btrfs/tree-log.c+24 -520 replies
3/3btrfs: remove outdated logic from overwrite_item() and add assertionfs/btrfs/tree-log.c+9 -50 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.

PatchJosef Bacik
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: fix a rare deadlock case when logging inodes

From: Filipe Manana <[email protected]>

Syzbot recently reported a lockdep splat about a potential deadlock case. It should be a rare case, but it is indeed possible to happen. The first patch in the series fixes that deadlock, the second one unifies back two functions that used to be the same, and finally the last one removes some outdated logic and adds an assertion (and documentation) to make sure we don't forget about that type of deadlock in case overwrite_item() gets used in the future for updating items in a log tree. More details in the changelogs of each patch.

Filipe Manana (3):
btrfs: do not modify log tree while holding a leaf from fs tree locked
btrfs: unify overwrite_item() and do_overwrite_item()
btrfs: remove outdated logic from overwrite_item() and add assertion

 fs/btrfs/tree-log.c | 149 ++++++++++++++++++++++++++------------------
 1 file changed, 88 insertions(+), 61 deletions(-)
Signature · 1 line
2.35.1