]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
SQUASH: client: request all shared caps if ctime was requested 10922/head
authorJeff Layton <jlayton@redhat.com>
Fri, 2 Sep 2016 18:27:08 +0000 (14:27 -0400)
committerJeff Layton <jlayton@redhat.com>
Fri, 2 Sep 2016 18:27:08 +0000 (14:27 -0400)
Much like the change_attr, ctime changes can potentially be cached on
clients. Request all shared caps if the want mask specifies the ctime.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
src/client/Client.cc

index 39e6760f5c28ede73365cc1d69d089c3aa7d3766..d27dec188966f7c74da4a45664d207dc60b2a6af 100644 (file)
@@ -6724,13 +6724,13 @@ unsigned Client::statx_to_mask(unsigned int flags, unsigned int want)
 
   /* Always set PIN to distinguish from AT_NO_ATTR_SYNC case */
   mask |= CEPH_CAP_PIN;
-  if (want & (CEPH_STATX_MODE|CEPH_STATX_UID|CEPH_STATX_GID|CEPH_STATX_BTIME|CEPH_STATX_VERSION))
+  if (want & (CEPH_STATX_MODE|CEPH_STATX_UID|CEPH_STATX_GID|CEPH_STATX_BTIME|CEPH_STATX_CTIME|CEPH_STATX_VERSION))
     mask |= CEPH_CAP_AUTH_SHARED;
-  if (want & CEPH_STATX_NLINK|CEPH_STATX_VERSION)
+  if (want & (CEPH_STATX_NLINK|CEPH_STATX_CTIME|CEPH_STATX_VERSION))
     mask |= CEPH_CAP_LINK_SHARED;
   if (want & (CEPH_STATX_ATIME|CEPH_STATX_MTIME|CEPH_STATX_CTIME|CEPH_STATX_SIZE|CEPH_STATX_BLOCKS|CEPH_STATX_VERSION))
     mask |= CEPH_CAP_FILE_SHARED;
-  if (want & CEPH_STATX_VERSION)
+  if (want & (CEPH_STATX_VERSION|CEPH_STATX_CTIME))
     mask |= CEPH_CAP_XATTR_SHARED;
 out:
   return mask;