Skip to content

btrfs: fix a regression with concurrent DIO writes and fsync on the same fd

[email protected] linux-btrfs 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 2 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2btrfs: fix race between direct IO write and fsync when using same fdfs/btrfs/ctree.h fs/btrfs/direct-io.c fs/btrfs/file.c +1 more+16 -161 reply
2/2btrfs: add and use helper to verify the calling task has locked the inodefs/btrfs/btrfs_inode.h fs/btrfs/file.c fs/btrfs/ordered-data.c +3 more+15 -70 replies

Reviews trailers per patch

1 of 2 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchDavid SterbaJosef Bacik
SeriesR-b
1/2R-b
2/2

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/2] btrfs: fix a regression with concurrent DIO writes and fsync on the same fd

From: Filipe Manana <[email protected]>

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(-)
Signature · 1 line
2.43.0