Re: [PATCH] ext4: keep ordered data and i_disksize consistent on size changes

From: Theodore Tso

Date: Fri Nov 20 2026 - 11:19:01 EST


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.

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 (which might be someone's PII, love
letters, offers to sell GPU's to export-restricted countries, etc.).
If the application wants data integrity guarantees, it should use
fsync(2).

The only reason why we have data=ordered is because we use the order
of operations from ext2 --- namely, first we allocate the block, then
we insert the block mapping into the inode, and then we write the data
to the newly allocated block. 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; and
then once data=journal gets deprecated, all of the data=xxx mount
options will go away, and there will be only one way that we handle
writeback.

- Ted