From a4bd854f86fe641207f83ab26a0f1b7fdd3ec4f0 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Mon, 16 May 2011 14:47:29 -0700 Subject: [PATCH] client: update ctime for auth, xattr This mirrors the kclient fix in d8672d64. The client can have a newer ctime due to auth or xattr excl caps. This fixes cases where ctime goes backwards due to the right sequence of local operations and replies from the MDS. Signed-off-by: Sage Weil --- src/client/Client.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/client/Client.cc b/src/client/Client.cc index 0787ce673aa80..e4b400c1970c4 100644 --- a/src/client/Client.cc +++ b/src/client/Client.cc @@ -402,7 +402,9 @@ void Client::update_inode_file_bits(Inode *in, // be careful with size, mtime, atime if (issued & (CEPH_CAP_FILE_EXCL| CEPH_CAP_FILE_WR| - CEPH_CAP_FILE_BUFFER)) { + CEPH_CAP_FILE_BUFFER| + CEPH_CAP_AUTH_EXCL| + CEPH_CAP_XATTR_EXCL)) { dout(30) << "Yay have enough caps to look at our times" << dendl; if (ctime > in->ctime) in->ctime = ctime; -- 2.39.5