summaryrefslogtreecommitdiff
path: root/fs/afs/write.c
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2020-06-13 19:34:59 +0100
committerDavid Howells <dhowells@redhat.com>2020-06-15 15:41:02 +0100
commitda8d07551275abb3a38fae2d16e02bc9cc7396b2 (patch)
tree0562151ea055f5dade21ce28edf11ddd5b017e04 /fs/afs/write.c
parent3f4aa981816368fe6b1d13c2bfbe76df9687e787 (diff)
afs: Concoct ctimes
The in-kernel afs filesystem ignores ctime because the AFS fileserver protocol doesn't support ctimes. This, however, causes various xfstests to fail. Work around this by: (1) Setting ctime to attr->ia_ctime in afs_setattr(). (2) Not ignoring ATTR_MTIME_SET, ATTR_TIMES_SET and ATTR_TOUCH settings. (3) Setting the ctime from the server mtime when on the target file when creating a hard link to it. (4) Setting the ctime on directories from their revised mtimes when renaming/moving a file. Found by the generic/221 and generic/309 xfstests. Signed-off-by: David Howells <dhowells@redhat.com>
Diffstat (limited to 'fs/afs/write.c')
-rw-r--r--fs/afs/write.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/afs/write.c b/fs/afs/write.c
index a55cb73e0449..2003d7ee9e43 100644
--- a/fs/afs/write.c
+++ b/fs/afs/write.c
@@ -393,6 +393,7 @@ static void afs_store_data_success(struct afs_operation *op)
{
struct afs_vnode *vnode = op->file[0].vnode;
+ op->ctime = op->file[0].scb.status.mtime_client;
afs_vnode_commit_status(op, &op->file[0]);
if (op->error == 0) {
afs_pages_written_back(vnode, op->store.first, op->store.last);