From: sashiko-bot@kernel.org
To: "Daejun Park" <daejun7.park@samsung.com>
Cc: tytso@mit.edu, linux-ext4@vger.kernel.org
Subject: Re: [PATCH v2 1/2] ext4: don't cache unzeroed blocks as written after a failed zeroout
Date: Thu, 08 Oct 2026 01:32:52 +0000 [thread overview]
Message-ID: <sashiko-outbox-163489@kernel.org> (raw)
In-Reply-To: <20261008-ext4-fc-zeroout-v2-1-55cab1e24fa3@samsung.com>
> From: Daejun Park <daejun7.park@samsung.com>
>
> ext4_ext_convert_to_initialized() may zero out the blocks before and
> after the range being written and convert them to written together with
> it, instead of splitting them off the unwritten extent. If
> ext4_ext_zeroout() fails for one side, it falls back to splitting the
> extent, so the blocks on that side stay unwritten in the extent tree.
> But zero_ex1 or zero_ex2 keeps its length, and ext4_zeroout_es() still
> inserts those blocks into the extent status tree as written.
>
> Until that entry goes away, a read of those blocks returns whatever was
> on the disk before the extent was allocated. A write to them is mapped
> from the cache and goes in place without converting the extent, so its
> data would read back as zeroes once the entry is dropped. To reproduce
> on 4 KiB blocks with -o nodelalloc: fallocate 32 KiB, map the last seven
> blocks of that extent to dm-error, write the first block, restore the
> mapping and read the second block. It returns the old disk contents
> instead of zeroes.
>
> Clear the length of an extent that could not be zeroed out, so that
> ext4_zeroout_es() skips it, as the comment at the out label intends.
>
> Fixes: 308c57ccf431 ("ext4: if zeroout fails fall back to splitting the extent node")
> Cc: stable@vger.kernel.org
> Reviewed-by: Jan Kara <jack@suse.cz>
> Signed-off-by: Daejun Park <daejun7.park@samsung.com>
Sashiko has reviewed this patch and found no issues. It looks great!
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261008-ext4-fc-zeroout-v2-0-55cab1e24fa3@samsung.com?part=1
next prev parent reply other threads:[~2026-10-08 1:32 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-08 1:25 [PATCH v2 0/2] ext4: fix fast commit and extent status after unwritten extent zero-out Daejun Park via B4 Relay
2026-10-08 1:25 ` [PATCH v2 1/2] ext4: don't cache unzeroed blocks as written after a failed zeroout Daejun Park via B4 Relay
2026-10-08 1:32 ` sashiko-bot [this message]
2026-10-08 9:30 ` Ojaswin Mujoo
2026-10-08 1:25 ` [PATCH v2 2/2] ext4: track zeroed out blocks of unwritten extents for fast commit Daejun Park via B4 Relay
2026-10-08 1:33 ` sashiko-bot
2026-10-08 9:55 ` Jan Kara
2026-10-08 10:26 ` Daejun Park
2026-10-08 11:12 ` (2) " Jan Kara
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-163489@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=daejun7.park@samsung.com \
--cc=linux-ext4@vger.kernel.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox