public inbox for linux-btrfs@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] btrfs: fix a rare deadlock case when logging inodes
@ 2022-11-21 10:23 fdmanana
  2022-11-21 10:23 ` [PATCH 1/3] btrfs: do not modify log tree while holding a leaf from fs tree locked fdmanana
                   ` (4 more replies)
  0 siblings, 5 replies; 8+ messages in thread
From: fdmanana @ 2022-11-21 10:23 UTC (permalink / raw)
  To: linux-btrfs

From: Filipe Manana <fdmanana@suse.com>

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(-)

-- 
2.35.1


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2022-11-28 10:04 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-11-21 10:23 [PATCH 0/3] btrfs: fix a rare deadlock case when logging inodes fdmanana
2022-11-21 10:23 ` [PATCH 1/3] btrfs: do not modify log tree while holding a leaf from fs tree locked fdmanana
2022-11-28  5:54   ` Wang Yugui
2022-11-28 10:03     ` Filipe Manana
2022-11-21 10:23 ` [PATCH 2/3] btrfs: unify overwrite_item() and do_overwrite_item() fdmanana
2022-11-21 10:23 ` [PATCH 3/3] btrfs: remove outdated logic from overwrite_item() and add assertion fdmanana
2022-11-21 16:12 ` [PATCH 0/3] btrfs: fix a rare deadlock case when logging inodes Josef Bacik
2022-11-21 19:23 ` David Sterba

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox