From: Yichong Chen <chenyichong@uniontech.com>
To: tytso@mit.edu
Cc: adilger.kernel@dilger.ca, chenyichong@uniontech.com,
guanwentao@uniontech.com, jack@suse.cz,
libaokun@linux.alibaba.com, linux-ext4@vger.kernel.org,
linux-kernel@vger.kernel.org, niecheng1@uniontech.com,
ojaswin@linux.ibm.com, ritesh.list@gmail.com,
yi.zhang@huawei.com, zhangdandan@uniontech.com
Subject: Re: [PATCH] ext4: keep ordered data and i_disksize consistent on size changes
Date: Tue, 24 Nov 2026 12:03:38 +0800 [thread overview]
Message-ID: <20261124040338.1627891-1-chenyichong@uniontech.com> (raw)
In-Reply-To: <awBwutTXygOERsY-@mit.edu>
Hi Ted, Honza,
Apologies first: when I set up the test configuration here I missed the
ext4 expunge rule for these three tests, and reported them as new
failures. That was my mistake - the rule has been in xfstests-bld since
2017.
On Fri, Nov 20, 2026 at 01:02:24PM -0500, Jan Kara wrote:
> Yes, and as the LLM probably told you these checks are failing on ext4 for
> ages and no real user complained. Ted may have a different opinion but I
> don't think we care about fixing them, in particular given the costs in
> complexity of i_size updates and also performance of appending writes /
> truncate.
Honza - on the cost concern. My benchmarks confirmed your point. What
the series touches is only ftruncate() with delalloc data, and the
overhead is mostly negligible. For example, shrink after fsync only adds
+2.8us (172.72us -> 175.53us). The worst case is an immediate shrink
after a dirty write (+30us), which confirms the complexity/performance
trade-off you raised.
On Sat, Nov 21, 2026 00:18 AM -0500, Theodore Ts'o wrote:
> Yes. In addition, there was never any data integrity guarantees of
> data=ordered. The main reason why this exists is to avoid any stale
> data belonging a deleted file...
> The only reason why we have data=ordered is because we use the order
> of operations from ext2... Once we change things so that we write the
> data block to the newly allocated block, and *then* we make the
> metadata change, we can unify data=ordered and data=writeback...
Ted - thanks for the detailed explanation on the ordered-mode history
and the long-term unification plan.
For context on why I was digging into this: I have been following Zhang
Yi's iomap buffered I/O series targeting ext4 dev. While running
xfstests to validate those interactions, I triggered the NULL file
scenarios. I initially suspected an inconsistency between the 2015 and
2021 commits, but I realize now they are dependent, and this is expected
data=writeback semantics (zeros instead of data), not a metadata
consistency break.
Given your explanation, the acceptable writeback semantics, and the fact
that this code is being rewritten by the iomap series
(EXT4_STATE_DISKSIZE_GROW_PENDING), I will drop my patch series without
pushback.
Thanks for the guidance, and I look forward to the iomap unification.
Best,
Morduan
prev parent reply other threads:[~2026-11-24 4:04 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-18 7:50 Yichong Chen
2026-11-20 12:02 ` Jan Kara
2026-11-20 16:17 ` Theodore Tso
2026-11-24 4:03 ` Yichong Chen [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=20261124040338.1627891-1-chenyichong@uniontech.com \
--to=chenyichong@uniontech.com \
--cc=adilger.kernel@dilger.ca \
--cc=guanwentao@uniontech.com \
--cc=jack@suse.cz \
--cc=libaokun@linux.alibaba.com \
--cc=linux-ext4@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=niecheng1@uniontech.com \
--cc=ojaswin@linux.ibm.com \
--cc=ritesh.list@gmail.com \
--cc=tytso@mit.edu \
--cc=yi.zhang@huawei.com \
--cc=zhangdandan@uniontech.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®