]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: optimize MDCache::rejoin_scour_survivor_replicas() 17657/head
authorYan, Zheng <zyan@redhat.com>
Wed, 13 Sep 2017 07:55:46 +0000 (15:55 +0800)
committerYan, Zheng <zyan@redhat.com>
Wed, 13 Sep 2017 07:55:46 +0000 (15:55 +0800)
avoid iterating dentries if dirfrag is non-auth

Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
src/mds/MDCache.cc

index d61c3dc766d9cf0df8a967515d90bd2cff0bb448..c6c1c2c0751c30c96781d8ec861464822985a4be 100644 (file)
@@ -4538,9 +4538,10 @@ void MDCache::rejoin_scour_survivor_replicas(mds_rank_t from, MMDSCacheRejoin *a
         p != dfs.end();
         ++p) {
       CDir *dir = *p;
+      if (!dir->is_auth())
+       continue;
       
-      if (dir->is_auth() &&
-         dir->is_replica(from) &&
+      if (dir->is_replica(from) &&
          (ack == NULL || ack->strong_dirfrags.count(dir->dirfrag()) == 0)) {
        dir->remove_replica(from);
        dout(10) << " rem " << *dir << dendl;