From: Xiubo Li Date: Mon, 20 Dec 2021 02:21:50 +0000 (+0800) Subject: client: force a request to update the perms X-Git-Tag: v16.2.11~526^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F45792%2Fhead;p=ceph.git client: force a request to update the perms 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 (cherry picked from commit 569770afe52726e1df970c2219b8aa2c080e8a31) --- diff --git a/src/client/Client.cc b/src/client/Client.cc index 13dc52051b2..34b19fe4c47 100644 --- a/src/client/Client.cc +++ b/src/client/Client.cc @@ -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;