All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 0/4] iomap: fix error handling regressions
@ 2026-09-28  8:48 Andrea Parri
  2026-09-28  8:48 ` [PATCH v3 1/4] iomap: don't resubmit an ioend after ->writeback_submit() failed Andrea Parri
                   ` (4 more replies)
  0 siblings, 5 replies; 7+ messages in thread
From: Andrea Parri @ 2026-09-28  8:48 UTC (permalink / raw)
  To: Christian Brauner, Carlos Maiolino, Darrick J . Wong,
	Joanne Koong, Brian Foster, Christoph Hellwig, Damien Le Moal,
	Hannes Reinecke, Daniel Gomez, Pankaj Raghav, Dave Chinner
  Cc: Andrea Parri, linux-xfs, linux-fsdevel, linux-kernel, stable

Fix three independent error handling regressions in iomap:

 - clear the writeback context after a failed ->writeback_submit() call,
   preventing an already completed ioend from being submitted again;
 - preserve an iomap iteration error when iomap_fiemap() has a pending
   extent to emit; and
 - preserve a direct I/O data path error when sub-block tail zeroing
   succeeds.

The three fixes have no ordering dependencies and can be applied or
backported independently.  Each issue was reproduced before and after
its respective fix.

Patch 2 is not a fix and carries no stable tag: it adds an XFS error
tag (requested by Christoph) that lets patch 1's ->writeback_submit()
failure be injected without the boot-param hack used for the original
reproduction.  The corresponding xfstest (list corruption caught via
CONFIG_LIST_HARDENED on an unfixed kernel, clean writeback failure on a
fixed one) was posted to fstests@vger.kernel.org:

  https://lore.kernel.org/all/20260924091338.198407-1-parri.andrea@gmail.com/

Changes since v2:
 - Patch 1: no code change; picked up Christoph's Reviewed-by.
 - Patch 2: fixed the alignment of the new XFS_ERRTAG_WB_COW_CONVERT_ERROR
   define; picked up Reviewed-by tags from Darrick and Christoph.
 - Patch 3: no change.
 - Patch 4: dropped the reformatting of the iomap_dio_zero() prototype,
   keeping the iomap two-tab indent style (Christoph); added the
   "# v6.12" stable version tag (Darrick); picked up Reviewed-by tags
   from Darrick and Pankaj.

Changes since v1:
 - Patch 1: reworded the added comment to fit 80 columns (Christoph);
   described the reproducer in the commit message (fault-injected
   ->writeback_submit() failure on a reflinked XFS file, reliably hits
   list_add double add on the unfixed kernel); documented why the final
   ->writeback_submit() call in iomap_writepages() needs no equivalent
   fix, since wpc is never reused after it; picked up the version-scoped
   stable tag Darrick suggested; picked up Brian's Reviewed-by.
 - Patch 2: new, added per Christoph's request.
 - Patch 3 (was 2/3): no code change; picked up the version-scoped
   stable tag Darrick suggested; picked up Reviewed-by tags from Brian,
   Darrick, and Christoph.
 - Patch 4 (was 3/3): reworked per Christoph's suggestion to make
   iomap_dio_zero() return void and drop the handling of its return
   value, since it can only fail via a can't-happen WARN_ON_ONCE()
   assert; this also resolves Darrick's question about the local
   variable's type.  Brian's v1 Reviewed-by was dropped due to the
   rework.

v2: https://lore.kernel.org/all/20260924091203.198225-1-parri.andrea@gmail.com/
v1: https://lore.kernel.org/all/20260921083133.2960-1-parri.andrea@gmail.com/

Andrea Parri (4):
  iomap: don't resubmit an ioend after ->writeback_submit() failed
  xfs: add an error tag to inject a ->writeback_submit() failure
  iomap: don't lose a fiemap iteration error when emitting the last
    extent
  iomap: don't lose a failed direct I/O bio's error when zeroing the
    tail

 fs/iomap/direct-io.c         | 16 +++++-----------
 fs/iomap/fiemap.c            |  8 ++++----
 fs/iomap/ioend.c             | 10 +++++++++-
 fs/xfs/libxfs/xfs_errortag.h |  6 ++++--
 fs/xfs/xfs_reflink.c         |  5 +++++
 5 files changed, 27 insertions(+), 18 deletions(-)


base-commit: 93f51579e7df248780214094418f205253383cc5
-- 
2.53.0


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

end of thread, other threads:[~2026-10-12 14:25 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-28  8:48 [PATCH v3 0/4] iomap: fix error handling regressions Andrea Parri
2026-09-28  8:48 ` [PATCH v3 1/4] iomap: don't resubmit an ioend after ->writeback_submit() failed Andrea Parri
2026-09-28  8:48 ` [PATCH v3 2/4] xfs: add an error tag to inject a ->writeback_submit() failure Andrea Parri
2026-09-28  8:48 ` [PATCH v3 3/4] iomap: don't lose a fiemap iteration error when emitting the last extent Andrea Parri
2026-09-28  8:48 ` [PATCH v3 4/4] iomap: don't lose a failed direct I/O bio's error when zeroing the tail Andrea Parri
2026-09-28  8:51   ` Christoph Hellwig
2026-10-12 14:25 ` [PATCH v3 0/4] iomap: fix error handling regressions Christian Brauner

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.