Re: [PATCH] fs: fix forced iversion increment on lazytime timestamp updates

From: Christian Brauner

Date: Mon May 11 2026 - 09:37:47 EST


On Mon, 11 May 2026 13:19:18 +0200, Pankaj Raghav wrote:
> When updating timestamps with lazytime enabled, if only I_DIRTY_TIME is
> set (pure lazytime update), inode_maybe_inc_iversion() should not be
> forced to increment i_version. The force parameter should only be true
> when actual data or metadata changes require an iversion bump.
>
> The current code uses "!!dirty" which evaluates to true whenever dirty
> has any bits set, including the I_DIRTY_TIME bit alone. This forces an
> iversion increment on every lazytime timestamp update, which then sets
> I_DIRTY_SYNC, triggering expensive log flushes on subsequent fdatasync
> calls. Andres reported this issue when he noticed a perf regression[1].
>
> [...]

Applied to the vfs.fixes branch of the vfs/vfs.git tree.
Patches in the vfs.fixes branch should appear in linux-next soon.

Please report any outstanding bugs that were missed during review in a
new review to the original patch series allowing us to drop it.

It's encouraged to provide Acked-bys and Reviewed-bys even though the
patch has now been applied. If possible patch trailers will be updated.

Note that commit hashes shown below are subject to change due to rebase,
trailer updates or similar. If in doubt, please check the listed branch.

tree: https://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs.git
branch: vfs.fixes

[1/1] fs: fix forced iversion increment on lazytime timestamp updates
https://git.kernel.org/vfs/vfs/c/834e98acb748