public inbox for linux-btrfs@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] btrfs: fix a regression with concurrent DIO writes and fsync on the same fd
@ 2024-08-29 23:09 fdmanana
  2024-08-29 23:09 ` [PATCH 1/2] btrfs: fix race between direct IO write and fsync when using " fdmanana
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: fdmanana @ 2024-08-29 23:09 UTC (permalink / raw)
  To: linux-btrfs

From: Filipe Manana <fdmanana@suse.com>

Fix a recent regression when doing concurrent direct IO writes and fsync
using the same fd from multiple threads. This was reported recently by a
couple users when using QEMU, as well as syzbot. The fix is the first
patch in the series, the second one is just an improvement for some
assertions. Details in the change logs of each patch.

Filipe Manana (2):
  btrfs: fix race between direct IO write and fsync when using same fd
  btrfs: add and use helper to verify the calling task has locked the inode

 fs/btrfs/btrfs_inode.h  |  8 ++++++++
 fs/btrfs/ctree.h        |  1 -
 fs/btrfs/direct-io.c    | 16 +++-------------
 fs/btrfs/file.c         |  9 +++++++--
 fs/btrfs/ordered-data.c |  2 +-
 fs/btrfs/transaction.h  |  6 ++++++
 fs/btrfs/tree-log.c     |  2 +-
 fs/btrfs/verity.c       |  6 +++---
 fs/btrfs/xattr.c        |  2 +-
 9 files changed, 30 insertions(+), 22 deletions(-)

-- 
2.43.0


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

end of thread, other threads:[~2024-09-03 15:50 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-29 23:09 [PATCH 0/2] btrfs: fix a regression with concurrent DIO writes and fsync on the same fd fdmanana
2024-08-29 23:09 ` [PATCH 1/2] btrfs: fix race between direct IO write and fsync when using " fdmanana
2024-09-02 21:38   ` David Sterba
2024-08-29 23:09 ` [PATCH 2/2] btrfs: add and use helper to verify the calling task has locked the inode fdmanana
2024-09-03 15:50 ` [PATCH 0/2] btrfs: fix a regression with concurrent DIO writes and fsync on the same fd Josef Bacik

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