diff options
author | Jeff Layton <jlayton@kernel.org> | 2024-10-02 17:27:20 -0400 |
---|---|---|
committer | Christian Brauner <brauner@kernel.org> | 2024-10-10 10:20:51 +0200 |
commit | 7f2c86cba3c584c7227cddaabdf0ab54c8151e60 (patch) | |
tree | 5c103c27044de0ed4231b961bd405aeef1448005 /tools/perf/scripts/python/task-analyzer.py | |
parent | b82f92d5dd1a365ab1e13518c8bf799f6fec4518 (diff) |
fs: handle delegated timestamps in setattr_copy_mgtime
An update to the inode ctime typically requires the latest clock
value possible. The exception to this rule is when there is a nfsd write
delegation and the server is proxying timestamps from the client.
When nfsd gets a CB_GETATTR response, update the timestamp value in the
inode to the values that the client is tracking. The client doesn't send
a ctime value (since that's always determined by the exported
filesystem), but it can send a mtime value. In the case where it does,
update the ctime to a value commensurate with that instead of the
current time.
If ATTR_DELEG is set, then use ia_ctime value instead of setting the
timestamp to the current time.
With the addition of delegated timestamps, the server may receive a
request to update only the atime, which doesn't involve a ctime update.
Trust the ATTR_CTIME flag in the update and only update the ctime when
it's set.
Tested-by: Randy Dunlap <rdunlap@infradead.org> # documentation bits
Reviewed-by: Jan Kara <jack@suse.cz>
Signed-off-by: Jeff Layton <jlayton@kernel.org>
Link: https://lore.kernel.org/r/20241002-mgtime-v10-5-d1c4717f5284@kernel.org
Signed-off-by: Christian Brauner <brauner@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/task-analyzer.py')
0 files changed, 0 insertions, 0 deletions