Skip to content

btrfs: fix a bug in the direct IO write path for COW writes

[email protected] linux-btrfs 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest2 patches 4 repliesIn review
  2. v12 patches 3 repliesSuperseded

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2btrfs: immediately drop extent maps after failed COW writefs/btrfs/ordered-data.c+27 -01 reply
2/2btrfs: make btrfs_finish_ordered_extent() return voidfs/btrfs/ordered-data.c fs/btrfs/ordered-data.h+2 -31 reply

Reviews trailers per patch

All 2 patches have a Reviewed-by or Acked-by.

PatchQu Wenruo
1/2R-b
2/2R-b

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

Read the v2 thread

Cover letter [PATCH v2 0/2] btrfs: fix a bug in the direct IO write path for COW writes

From: Filipe Manana <[email protected]>

Fix a bug in an error path for direct IO writes in COW mode, which can make a subsequent fsync log invalid extent items (pointing to unwritten data). The second patch is just a cleanup. Details in the change logs.

V2: Rework solution since other error paths caused the same problem, make
it more generic.
Added more details to change log and comment about what's going on, and why reads aren't affected.

Filipe Manana (2):
btrfs: immediately drop extent maps after failed COW write
btrfs: make btrfs_finish_ordered_extent() return void

 fs/btrfs/ordered-data.c | 30 ++++++++++++++++++++++++++++--
 fs/btrfs/ordered-data.h |  2 +-
 2 files changed, 29 insertions(+), 3 deletions(-)
Signature · 1 line
2.43.0