From: Xiubo Li Date: Mon, 10 Jan 2022 02:44:12 +0000 (+0800) Subject: mds: fix a typo of inode version related comment X-Git-Tag: v18.0.0~1434^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=7d41cce919e1b2802580301f304017850bfafecc;p=ceph.git mds: fix a typo of inode version related comment The odd version means stable, or means projected. The typo of 'old' is so confusing. Signed-off-by: Xiubo Li --- diff --git a/src/mds/CInode.cc b/src/mds/CInode.cc index 370fdfbd47f..afe8da83d09 100644 --- a/src/mds/CInode.cc +++ b/src/mds/CInode.cc @@ -3769,8 +3769,8 @@ int CInode::encode_inodestat(bufferlist& bl, Session *session, << (state_test(CInode::STATE_EXPORTINGCAPS)?", exporting caps":"") << dendl; - - // "fake" a version that is old (stable) version, +1 if projected. + + // "fake" a version that is odd (stable) version, +1 if projected. version_t version = (oi->version * 2) + is_projected(); Capability *cap = get_client_cap(client); @@ -3782,9 +3782,9 @@ int CInode::encode_inodestat(bufferlist& bl, Session *session, bool plocal = versionlock.get_last_wrlock_client() == client; bool ppolicy = policylock.is_xlocked_by_client(client) || get_loner()==client; - + const mempool_inode *any_i = (pfile|pauth|plink|pxattr|plocal) ? pi : oi; - + dout(20) << " pfile " << pfile << " pauth " << pauth << " plink " << plink << " pxattr " << pxattr << " plocal " << plocal