[PATCH v2 0/2] ext4: check return value of blkdev_issue_flush() in unchecked call sites
From: guolingxing
Date: Tue Oct 13 2026 - 04:24:21 EST
This series adds return value checks to the blkdev_issue_flush() call
sites in ext4 which ignore the return value: lazy inode table
initialization and the file system device flush issued before
starting a fast commit. Both call sites also issue the flush without
checking the barrier mount option; the series makes them honor the
option, consistent with the other cache flushes in ext4 and jbd2.
Changes since v1:
- Drop the fast commit replay patch. JBD2 already calls
sync_blockdev() on the file system device, checks the device write
error, and issues a final barrier-gated cache flush after journal
and fast commit replay, and it propagates all of these errors to
the mount. The error check added by that patch was therefore
redundant; the pre-existing per-inode flush in the replay path is
left as is for now.
- Gate the remaining two cache flushes on the barrier mount option
(JBD2_BARRIER for the fast commit path). Checking the return value
makes a cache flush failure fatal for lazy inode table
initialization and fast commits; without the gating, this would
regress file systems mounted with nobarrier on devices with failing
cache flushes.
- Update the patch descriptions to describe the gating.
The patches are otherwise unchanged since v1.
guolingxing (2):
ext4: check return value of blkdev_issue_flush() when initializing
inode tables
ext4: check return value of blkdev_issue_flush() when starting a fast
commit
fs/ext4/fast_commit.c | 8 ++++++--
fs/ext4/ialloc.c | 7 +++++--
fs/ext4/super.c | 3 ++-
3 files changed, 13 insertions(+), 5 deletions(-)
--
2.34.1