diff options
| author | Jeff Layton <jlayton@kernel.org> | 2026-11-09 15:44:47 -0500 |
|---|---|---|
| committer | Anna Schumaker <anna.schumaker@hammerspace.com> | 2026-11-10 14:34:31 -0500 |
| commit | 427d4cd8048c8e18e7d0c7d0637e7fbec9fba078 (patch) | |
| tree | 0e5275abf86edfa0b5eb1701edf7cec4c5d7cd2a /rust/kernel/alloc | |
| parent | 5e810a57a1cf2fc785d89e711ff40f1112f6404c (diff) | |
NFS: don't let delegated c/mtime stamps go backward
With a timestamp delegation the client stamps c/mtime from its own
coarse clock. That can land before the server's fine-grained ctime the
client cached from the OPEN or SETATTR reply, e.g. on a WRITE right
after an exclusive create. The server then either rejects the times
(they don't pass dl_ctime) or can't apply the ctime, since
inode_set_ctime_deleg() never moves ctime backward. Either way the
c/mtime the client reported while holding the delegation changes
after DELEGRETURN; git t1092 over NFSv4.2 sees a stat-dirty file.
When a delegated stamp isn't after the cached ctime, use the cached
ctime + 1ns instead. Compute the stamp before storing it, so lockless
readers (getattr, CB_GETATTR) never see the trailing coarse time.
Fixes: e12912d94137 ("NFSv4: Add support for delegated atime and mtime attributes")
Signed-off-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Anna Schumaker <anna.schumaker@hammerspace.com>
Diffstat (limited to 'rust/kernel/alloc')
0 files changed, 0 insertions, 0 deletions
