]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/mds/FSMap.cc
update sources to v12.1.2
[ceph.git] / ceph / src / mds / FSMap.cc
index cdce14b60892cbff8e84c7ca09d988a8d0085a01..10abd5d2c0d8f46450d5ea9a052d07fc8bdac4f4 100644 (file)
@@ -295,6 +295,12 @@ void FSMap::reset_filesystem(fs_cluster_id_t fscid)
   new_fs->mds_map.standby_count_wanted = fs->mds_map.standby_count_wanted;
   new_fs->mds_map.enabled = true;
 
+  // Remember mds ranks that have ever started. (They should load old inotable
+  // instead of creating new one if they start again.)
+  new_fs->mds_map.stopped.insert(fs->mds_map.in.begin(), fs->mds_map.in.end());
+  new_fs->mds_map.stopped.insert(fs->mds_map.stopped.begin(), fs->mds_map.stopped.end());
+  new_fs->mds_map.stopped.erase(mds_rank_t(0));
+
   // Persist the new FSMap
   filesystems[new_fs->fscid] = new_fs;
 }