From 7d41cce919e1b2802580301f304017850bfafecc Mon Sep 17 00:00:00 2001 From: Xiubo Li Date: Mon, 10 Jan 2022 10:44:12 +0800 Subject: [PATCH] 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 --- src/mds/CInode.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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 -- 2.47.3