]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: check mds up before calling MDSMap::get_mds_info 5583/head
authorYan, Zheng <zyan@redhat.com>
Fri, 14 Aug 2015 08:45:33 +0000 (16:45 +0800)
committerYan, Zheng <zyan@redhat.com>
Fri, 14 Aug 2015 08:46:10 +0000 (16:46 +0800)
Fixes: #12676
Signed-off-by: Yan, Zheng <zyan@redhat.com>
src/mds/MDCache.cc

index 0daecbe75de375cc8361d349fd86ca8863b005e2..494fc015a95b6fd2954c40126d21a918e2011d52 100644 (file)
@@ -6290,7 +6290,7 @@ bool MDCache::trim(int max, int count)
     CDir *subtree = *s;
     if (subtree->inode->is_mdsdir()) {
       mds_rank_t owner = mds_rank_t(MDS_INO_MDSDIR_OWNER(subtree->inode->ino()));
-      if (owner == mds->get_nodeid()) {
+      if (owner == mds->get_nodeid() || !mds->mdsmap->is_up(owner)) {
         continue;
       }