From: Daejun Park <daejun7.park@samsung.com>
To: Jan Kara <jack@suse.cz>
Cc: Theodore Ts'o <tytso@mit.edu>,
"linux-ext4@vger.kernel.org" <linux-ext4@vger.kernel.org>,
Andreas Dilger <adilger.kernel@dilger.ca>,
Baokun Li <libaokun@linux.alibaba.com>,
Ojaswin Mujoo <ojaswin@linux.ibm.com>,
"Ritesh Harjani (IBM)" <ritesh.list@gmail.com>,
Zhang Yi <yi.zhang@huawei.com>,
Zhang Yi <yi.zhang@huaweicloud.com>,
Harshad Shirwadkar <harshadshirwadkar@gmail.com>,
Li Chen <me@linux.beauty>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"stable@vger.kernel.org" <stable@vger.kernel.org>,
Daejun Park <daejun7.park@samsung.com>
Subject: RE:(2) [PATCH 2/2] ext4: track zeroed out blocks of unwritten extents for fast commit
Date: Thu, 08 Oct 2026 10:24:25 +0900 [thread overview]
Message-ID: <20261008012425epcms2p1c4ddc3f2cc72dd30b0f18ee4f2ec9178@epcms2p1> (raw)
In-Reply-To: <vxase3lkctmatpkj3p4vvhgyrvauqyilkfd5dcz47jjtgfdipx@imb4onyzk3bw>
Hi Jan,
On Wed, Oct 07, 2026 at 15:41:17 +0200, Jan Kara wrote:
> Also putting this into ext4_split_extent_zeroout() looks a bit too easy to
> miss. In fact I think placing ext4_fc_track_range() into
> ext4_issue_zeroout() would make sense because that is where the writing of
> "data" really happens. This will fix the use in
> ext4_split_extent_zeroout() as well as ext4_ext_convert_to_initialized().
> And it will also fix the same class of problem which I think we have in
> ext4_alloc_file_blocks()...
Thanks, that makes sense. In v2, ext4_issue_zeroout() and
ext4_ext_zeroout() take the handle, and the range is tracked there once
the zeroout has succeeded.
ext4_alloc_file_blocks() zeroes out without a handle, so it passes NULL.
As far as I can tell there is no gap there:
ext4_convert_unwritten_extents() right after it tracks the blocks it
converts through ext4_map_blocks(), and blocks that were already written
keep their mapping. I also tried FALLOC_FL_WRITE_ZEROES on scsi_debug
(lbpws=1 lbprz=1) over an unwritten extent, over one block in the middle
of one, and over a hole, each followed by an in-place write, fsync and
EXT4_IOC_SHUTDOWN. The written block survives replay on the base kernel
as well, and the tracepoint shows the range tracked twice, at allocation
and at conversion. If you had a different path in mind, please let me
know.
I'll send v2 shortly.
Daejun
prev parent reply other threads:[~2026-10-08 1:24 UTC|newest]
Thread overview: 9+ 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 12:51 ` Jan Kara
2026-10-08 6:19 ` Ojaswin Mujoo
[not found] ` <CGME20261008062023epcas2p17ab2f934eeb6ba157103b01c9cb59f5b@epcms2p2>
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 13:41 ` Jan Kara
[not found] ` <CGME20261007134122epcas2p261c7ea484933b17c10e745ec844b0aff@epcms2p1>
2026-10-08 1:24 ` Daejun Park [this message]
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=20261008012425epcms2p1c4ddc3f2cc72dd30b0f18ee4f2ec9178@epcms2p1 \
--to=daejun7.park@samsung.com \
--cc=adilger.kernel@dilger.ca \
--cc=harshadshirwadkar@gmail.com \
--cc=jack@suse.cz \
--cc=libaokun@linux.alibaba.com \
--cc=linux-ext4@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=me@linux.beauty \
--cc=ojaswin@linux.ibm.com \
--cc=ritesh.list@gmail.com \
--cc=stable@vger.kernel.org \
--cc=tytso@mit.edu \
--cc=yi.zhang@huawei.com \
--cc=yi.zhang@huaweicloud.com \
/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
all inboxes | Powered by JetHome®