]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
client: force a request to update the perms 43286/head
authorXiubo Li <xiubli@redhat.com>
Mon, 20 Dec 2021 02:21:50 +0000 (10:21 +0800)
committerXiubo Li <xiubli@redhat.com>
Mon, 20 Dec 2021 02:22:42 +0000 (10:22 +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>
src/client/Client.cc

index 89b512303bfe33a48d10da395e9a1bd25a8acc89..463584d1c27bc8cb96a139eab8438d9790353d9d 100644 (file)
@@ -7489,9 +7489,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) {
@@ -7691,7 +7689,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;