Re: [PATCH] vfs: preserve subsecond timestamps at filesystem time limits
From: Christian Brauner
Date: Thu Nov 05 2026 - 11:49:56 EST
On Sun, 01 Nov 2026 11:38:15 +0000, Hungyu Lin wrote:
> timestamp_truncate() clears tv_nsec whenever the clamped seconds equal
> either filesystem time limit. This also drops the fractional part of
> timestamps whose seconds were already within the supported range.
>
> For example, setting a JFS mtime to 0.123456789 produces 0.000000000,
> although the filesystem can store the requested value. Utilities such
> as touch and cp -p consequently lose valid subsecond timestamps when
> preserving these endpoint values. Timestamps strictly between the
> filesystem limits are unaffected.
>
> [...]
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] vfs: preserve subsecond timestamps at filesystem time limits
https://git.kernel.org/vfs/vfs/c/4b18ced0bcd5