Skip to content

ext4: Fix data corruption when extending DIO write races with buffered read

Jan Kara linux-ext4 linux-fsdevel oe-kbuild-all 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 6 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3iomap: Pass original DIO size to completion handlerfs/ext4/file.c fs/iomap/direct-io.c fs/xfs/xfs_file.c +2 more+11 -50 replies
2/3ext4: Fix occasional generic/418 failurefs/ext4/file.c+99 -864 replies
3/3ext4: Fix overflow in ext4_iomap_alloc()fs/ext4/inode.c+1 -12 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/3] ext4: Fix data corruption when extending DIO write races with buffered read

Hello,

This patch series fixes a bug manifesting as occasional generic/418 failure when direct IO write extending a file races with buffered read. Patch 1 extends iomap DIO code to pass original IO size to ->end_dio handler so that ext4 can tell whether everything has succeeded and we don't need expensive DIO cleanup (possible truncate of leftover blocks beyond i_size). Patch 2 fixes the ext4 bug, patch 3 fixes unrelated problem I've found in ext4 DIO code.

Honza