Linux EXT4 FS development
 help / color / mirror / Atom feed
* [PATCH 0/6] ext4: fix buffered writeback error handling
@ 2026-10-22 14:52 Julian Sun
  2026-10-22 14:52 ` [PATCH 1/6] ext4: move extent mapping error handling out of the loop Julian Sun
                   ` (5 more replies)
  0 siblings, 6 replies; 16+ messages in thread
From: Julian Sun @ 2026-10-22 14:52 UTC (permalink / raw)
  To: linux-ext4
  Cc: tytso, adilger.kernel, libaokun, jack, ojaswin, ritesh.list,
	yi.zhang, riteshh

This series fixes error handling in ext4 buffered writeback. It prevents
stale data exposure when mapping or io_end_vec allocation fails, reports
unwritten conversion errors to fsync(), and preserves concurrent io_end
flag updates.

The patches are arranged as follows:

1. Move extent mapping error handling out of the loop, without changing
   behavior, so the following fixes can share the partial-folio path.
2. Submit mapped buffers when allocation of the next io_end_vec fails.
   Otherwise, their ranges remain eligible for unwritten conversion even
   though their data was never submitted.
3. Submit mapped buffers when mapping a later extent in the same folio
   fails with a fatal error, and discard buffers still needing mapping.
4. Drop the folio lookup reference if partial-writeback validation fails.
5. Prevent silent data loss by reporting unwritten extent conversion
   failures through fsync(), instead of returning success while direct
   reads still return zeros.
6. Use atomic bitops for io_end flags so failed-bio completion and
   writeback cannot overwrite each other's updates.

Sashiko helped identify these issues.

Julian Sun (6):
  ext4: move extent mapping error handling out of the loop
  ext4: submit mapped buffers when io_end_vec allocation fails
  ext4: prevent stale data exposure after fatal mapping errors
  ext4: put folio on partial writeback validation failure
  ext4: report unwritten extent conversion errors to fsync
  ext4: use atomic bitops for io_end flags

 fs/ext4/ext4.h    |  16 ++--
 fs/ext4/inode.c   | 188 +++++++++++++++++++++++++++++++---------------
 fs/ext4/page-io.c |  24 +++---
 3 files changed, 148 insertions(+), 80 deletions(-)


base-commit: 4403278e4ea2f654f8130a5c03eb8b4516a0f201
-- 
2.39.5


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

end of thread, other threads:[~2026-10-23  3:40 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-22 14:52 [PATCH 0/6] ext4: fix buffered writeback error handling Julian Sun
2026-10-22 14:52 ` [PATCH 1/6] ext4: move extent mapping error handling out of the loop Julian Sun
2026-10-22 15:15   ` sashiko-bot
2026-10-22 14:52 ` [PATCH 2/6] ext4: submit mapped buffers when io_end_vec allocation fails Julian Sun
2026-10-22 15:25   ` sashiko-bot
2026-10-22 14:52 ` [PATCH 3/6] ext4: prevent stale data exposure after fatal mapping errors Julian Sun
2026-10-22 15:40   ` sashiko-bot
2026-10-22 15:02 ` [PATCH 4/6] ext4: put folio on partial writeback validation failure Julian Sun
2026-10-22 15:15   ` sashiko-bot
2026-10-22 15:12 ` [PATCH 5/6] ext4: report unwritten extent conversion errors to fsync Julian Sun
2026-10-22 15:12   ` [PATCH 6/6] ext4: use atomic bitops for io_end flags Julian Sun
2026-10-22 15:17     ` sashiko-bot
2026-10-22 15:19   ` [PATCH 5/6] ext4: report unwritten extent conversion errors to fsync sashiko-bot
2026-10-22 16:05 ` [PATCH 0/6] ext4: fix buffered writeback error handling Theodore Tso
2026-10-23  2:36   ` Zhang Yi
2026-10-23  3:43     ` Ojaswin Mujoo

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