]> git.baikalelectronics.ru Git - kernel.git/commit
afs: Set mtime from the client for yfs create operations
authorMarc Dionne <marc.dionne@auristor.com>
Wed, 20 Oct 2021 12:51:43 +0000 (09:51 -0300)
committerDavid Howells <dhowells@redhat.com>
Tue, 2 Nov 2021 09:42:26 +0000 (09:42 +0000)
commit44b3b3c74f7a8ac6bc77aff8bdc60d6acbced2b2
tree17495782bce9ef9b880316e3b0cf3bd605a2ed91
parent589c1f995cee0a080589d2a32494debabe38c32f
afs: Set mtime from the client for yfs create operations

For operations that create vnodes on the server such as CreateFile,
MakeDir or Symlink, the server will store its own current time as
the mtime if the client doesn't pass in a time in the accompanying
StoreStatus structure.

If the server and client clocks are not well synchronized, the client
may see timestamps in the future or inconsistent dependency checks
with "make" for files that are not modified after creation:

make[2]: Warning: File 'arch/x86/kernel/apic/modules.order' has
modification time 0.14 s in the future
make[2]: warning:  Clock skew detected.  Your build may be incomplete.

This is already handled correctly for non yfs operations; also
set the mtime for the corresponding yfs operations.

Changes:
v3: Replace S_IRWXUGO with 0777, per checkpatch
v2: [dhowells] Merge the two xdr_encode_YFSStoreStatus*() functions together

Signed-off-by: Marc Dionne <marc.dionne@auristor.com>
Signed-off-by: David Howells <dhowells@redhat.com>
Link: http://lists.infradead.org/pipermail/linux-afs/2021-October/004395.html
fs/afs/yfsclient.c