public inbox for linux-btrfs@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] btrfs: fix deadlock with fsync and full sync
@ 2022-06-01 15:16 Josef Bacik
  2022-06-01 15:16 ` [PATCH 1/2] btrfs: make the return value for log syncing consistent Josef Bacik
  2022-06-01 15:16 ` [PATCH 2/2] btrfs: fix deadlock with fsync+fiemap+full sync Josef Bacik
  0 siblings, 2 replies; 5+ messages in thread
From: Josef Bacik @ 2022-06-01 15:16 UTC (permalink / raw)
  To: linux-btrfs, kernel-team

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+full sync

 fs/btrfs/file.c     | 67 +++++++++++++++++++++++++++++++++++----------
 fs/btrfs/tree-log.c | 18 ++++++------
 fs/btrfs/tree-log.h |  3 ++
 3 files changed, 64 insertions(+), 24 deletions(-)

-- 
2.26.3


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

end of thread, other threads:[~2022-06-01 16:25 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-06-01 15:16 [PATCH 0/2] btrfs: fix deadlock with fsync and full sync Josef Bacik
2022-06-01 15:16 ` [PATCH 1/2] btrfs: make the return value for log syncing consistent Josef Bacik
2022-06-01 16:25   ` Filipe Manana
2022-06-01 15:16 ` [PATCH 2/2] btrfs: fix deadlock with fsync+fiemap+full sync Josef Bacik
2022-06-01 16:20   ` Filipe Manana

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