From: Josef Bacik <josef@toxicpanda.com>
To: linux-btrfs@vger.kernel.org, kernel-team@fb.com
Subject: [PATCH v2 0/2] btrfs: fix deadlock with fsync and full sync
Date: Mon, 13 Jun 2022 15:09:47 -0400 [thread overview]
Message-ID: <cover.1655147296.git.josef@toxicpanda.com> (raw)
v1->v2:
- Make btrfs_sync_file also use the new BTRFS_LOG_FORCE_COMMIT define.
- Adjust the title of the second patch
--- Original email ---
Hello,
We've hit a pretty convoluted deadlock in production that Omar tracked down with
drgn. I've described the deadlock in the second patch, but generally it's a
lock inversion where we have an existing dependency of extent lock ->
transaction, but in fsync in a few cases we can end up with transaction ->
extent lock, and the expected hilarity ensues. Thanks,
Josef
Josef Bacik (2):
btrfs: make the return value for log syncing consistent
btrfs: fix deadlock with fsync+fiemap+transaction commit
fs/btrfs/file.c | 69 ++++++++++++++++++++++++++++++++++-----------
fs/btrfs/tree-log.c | 18 ++++++------
fs/btrfs/tree-log.h | 3 ++
3 files changed, 65 insertions(+), 25 deletions(-)
--
2.26.3
next reply other threads:[~2022-06-13 20:25 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-13 19:09 Josef Bacik [this message]
2022-06-13 19:09 ` [PATCH v2 1/2] btrfs: make the return value for log syncing consistent Josef Bacik
2022-06-13 19:09 ` [PATCH v2 2/2] btrfs: fix deadlock with fsync+fiemap+transaction commit Josef Bacik
2022-06-14 9:56 ` [PATCH v2 0/2] btrfs: fix deadlock with fsync and full sync Filipe Manana
2022-06-14 13:14 ` 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.1655147296.git.josef@toxicpanda.com \
--to=josef@toxicpanda.com \
--cc=kernel-team@fb.com \
--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