]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
client: force a request to update the perms 45792/head
authorXiubo Li <xiubli@redhat.com>
Mon, 20 Dec 2021 02:21:50 +0000 (10:21 +0800)
committerXiubo Li <xiubli@redhat.com>
Wed, 8 Jun 2022 00:45:53 +0000 (08:45 +0800)
If the caller perms is different with the current dirtier's, we
can still cache the attributes locally if possible, but will
mark the ctime needs to be updated forcely and the request will
implicitly flush the dirty caps for us.

Signed-off-by: Xiubo Li <xiubli@redhat.com>
(cherry picked from commit 569770afe52726e1df970c2219b8aa2c080e8a31)

src/client/Client.cc

index 13dc52051b27b106f1f4fe2109d669063784934b..34b19fe4c4789fcb5056a87491b4167d69e95dbf 100644 (file)
@@ -7566,9 +7566,7 @@ int Client::_do_setattr(Inode *in, struct ceph_statx *stx, int mask,
      * case later, we can build a more complex pipelined cap writeback
      * infrastructure...
      */
-    if (!mask)
-      mask |= CEPH_SETATTR_CTIME;
-    goto force_request;
+    mask |= CEPH_SETATTR_CTIME;
   }
 
   if (!mask) {
@@ -7768,7 +7766,6 @@ int Client::_do_setattr(Inode *in, struct ceph_statx *stx, int mask,
     return 0;
   }
 
-force_request:
   MetaRequest *req = new MetaRequest(CEPH_MDS_OP_SETATTR);
 
   filepath path;