void get_failed_mds_set(std::set<mds_rank_t>& s) {
s = failed;
}
+
+ /**
+ * Get MDS ranks which are in but not up.
+ */
+ void get_down_mds_set(std::set<mds_rank_t> *s)
+ {
+ assert(s != NULL);
+ s->insert(failed.begin(), failed.end());
+ s->insert(damaged.begin(), damaged.end());
+ }
+
int get_failed() {
if (!failed.empty()) return *failed.begin();
return -1;
return up.empty();
}
- // inst
+ /**
+ * Get whether a rank is 'up', i.e. has
+ * an MDS daemon's entity_inst_t associated
+ * with it.
+ */
bool have_inst(mds_rank_t m) {
return up.count(m);
}
+
+ /**
+ * Get the MDS daemon entity_inst_t for a rank
+ * known to be up.
+ */
const entity_inst_t get_inst(mds_rank_t m) {
assert(up.count(m));
return mds_info[up[m]].get_inst();
assert(up.count(m));
return mds_info[up[m]].addr;
}
+
+ /**
+ * Get the MDS daemon entity_inst_t for a rank,
+ * if it is up.
+ *
+ * @return true if the rank was up and the inst
+ * was populated, else false.
+ */
bool get_inst(mds_rank_t m, entity_inst_t& inst) {
if (up.count(m)) {
inst = get_inst(m);