From: sashiko-bot@kernel.org
To: "Daejun Park" <daejun7.park@samsung.com>
Cc: tytso@mit.edu, linux-ext4@vger.kernel.org
Subject: Re: [PATCH 1/2] ext4: don't cache unzeroed blocks as written after a failed zeroout
Date: Wed, 07 Oct 2026 00:50:37 +0000 [thread overview]
Message-ID: <sashiko-outbox-162554@kernel.org> (raw)
In-Reply-To: <20261007-ext4-fc-zeroout-v1-1-b86de6439431@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
> 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/20261007-ext4-fc-zeroout-v1-0-b86de6439431@samsung.com?part=1
next prev parent reply other threads:[~2026-10-07 0:50 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-07 0:41 [PATCH 0/2] ext4: fix fast commit and extent status after unwritten extent zero-out Daejun Park via B4 Relay
2026-10-07 0:41 ` [PATCH 1/2] ext4: don't cache unzeroed blocks as written after a failed zeroout Daejun Park via B4 Relay
2026-10-07 0:50 ` sashiko-bot [this message]
2026-10-07 12:51 ` Jan Kara
2026-10-08 6:19 ` Ojaswin Mujoo
2026-10-08 7:47 ` Daejun Park
2026-10-08 9:29 ` (2) " Ojaswin Mujoo
2026-10-07 0:41 ` [PATCH 2/2] ext4: track zeroed out blocks of unwritten extents for fast commit Daejun Park via B4 Relay
2026-10-07 0:55 ` sashiko-bot
2026-10-07 1:09 ` Daejun Park
2026-10-07 13:41 ` Jan Kara
2026-10-08 1:24 ` Daejun Park
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-162554@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