All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Ojaswin Mujoo" <ojaswin@linux.ibm.com>
Cc: linux-ext4@vger.kernel.org, tytso@mit.edu
Subject: Re: [PATCH 4/8] ext4: don't zeroout if we have inflight unwritten IOs in non buffered-iomap path
Date: Mon, 02 Nov 2026 18:38:47 +0000	[thread overview]
Message-ID: <sashiko-outbox-193955@kernel.org> (raw)
In-Reply-To: <20261102-ext4-endio-zero-bug-v1-4-266d2bb9e6dc@linux.ibm.com>

> When endio conversion of an unwritten extent fails (e.g. ENOSPC while
> trying to split the extent), ext4 falls back to zeroing out the unwritten
> portions of the extent and marking it as written. This is safe only when no
> other in-flight writes have valid data underneath other parts of the same
> unwritten extent, otherwise the zeroout would silently corrupt that data.
> 
> Commit ea96cb5c4ae3 ("ext4: don't split extent before submitting I/O")
> changed the dioread_nolock writeback (non buffered iomap) and dio path to
> submit I/O without pre-splitting extents, deferring the split to endio.
> This means multiple concurrent writes can share a single unwritten extent,
> and a failed split on one of them could zeroout data belonging to another.
> 
> Fix this for dioread_nolock non buffered iomap writeback by making sure the
> writeback path increments the i_conv_pending_ios counter when it encounters
> an unwritten io_end, and decrements it after all the io_end_vecs have been
> converted. The existing checks in zeroout paths then use this counter to
> suppress the zeroout fallback whenever there are other unwritten IOs
> pending conversion, preventing silent data corruption.
> 
> Fixes: ea96cb5c4ae3 ("ext4: don't split extent before submitting I/O")
> Signed-off-by: Ojaswin Mujoo <ojaswin@linux.ibm.com>

Sashiko has reviewed this patch and found no issues.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261102-ext4-endio-zero-bug-v1-0-266d2bb9e6dc@linux.ibm.com?part=4


  reply	other threads:[~2026-11-02 18:38 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-02 18:26 [PATCH 0/8] ext4: fix endio zeroout corruption by tracking to-be-converted unwritten IOs Ojaswin Mujoo
2026-11-02 18:26 ` [PATCH 1/8] ext4: add extra_flags param to ext4_convert_unwritten_extents() Ojaswin Mujoo
2026-11-02 18:30   ` sashiko-bot
2026-11-02 18:26 ` [PATCH 2/8] ext4: fix endio zeroout corruption by tracking unwritten to-be-converted IOs Ojaswin Mujoo
2026-11-02 18:44   ` sashiko-bot
2026-11-02 18:26 ` [PATCH 3/8] ext4: add tracing for i_conv_pending_ios tracking Ojaswin Mujoo
2026-11-02 18:30   ` sashiko-bot
2026-11-02 18:26 ` [PATCH 4/8] ext4: don't zeroout if we have inflight unwritten IOs in non buffered-iomap path Ojaswin Mujoo
2026-11-02 18:38   ` sashiko-bot [this message]
2026-11-02 18:26 ` [PATCH 5/8] ext4: don't zeroout if we have inflight direct IOs Ojaswin Mujoo
2026-11-02 18:47   ` sashiko-bot
2026-11-02 18:26 ` [PATCH 6/8] ext4: make sure zero range WRITE_ZEROES uses NO_CONV_ACC flag Ojaswin Mujoo
2026-11-02 18:47   ` sashiko-bot
2026-11-02 18:26 ` [PATCH 7/8] ext4: don't zeroout if we have inflight unwritten IOs in buffered iomap path Ojaswin Mujoo
2026-11-02 18:38   ` sashiko-bot
2026-11-02 18:26 ` [PATCH 8/8] ext4: optimize inflight dio tracking for zeroout Ojaswin Mujoo
2026-11-02 18:43   ` sashiko-bot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=sashiko-outbox-193955@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=linux-ext4@vger.kernel.org \
    --cc=ojaswin@linux.ibm.com \
    --cc=sashiko-reviews@lists.linux.dev \
    --cc=tytso@mit.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.