public inbox for linux-btrfs@vger.kernel.org
 help / color / mirror / Atom feed
From: fdmanana@kernel.org
To: linux-btrfs@vger.kernel.org
Subject: [PATCH 0/3] btrfs: fix a rare deadlock case when logging inodes
Date: Mon, 21 Nov 2022 10:23:21 +0000	[thread overview]
Message-ID: <cover.1669025204.git.fdmanana@suse.com> (raw)

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


             reply	other threads:[~2022-11-21 10:23 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-21 10:23 fdmanana [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cover.1669025204.git.fdmanana@suse.com \
    --to=fdmanana@kernel.org \
    --cc=linux-btrfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox