epoch_t get_last_failure() const { return last_failure; }
- int get_max_mds() const { return max_mds; }
+ unsigned get_max_mds() const { return max_mds; }
void set_max_mds(int m) { max_mds = m; }
int get_tableserver() const { return tableserver; }
}
else if (m->cmd[1] == "injectargs" && m->cmd.size() == 4) {
if (m->cmd[2] == "*") {
- for (int i=0; i<mdsmap.get_max_mds(); i++)
+ for (unsigned i=0; i<mdsmap.get_max_mds(); i++)
if (mdsmap.is_active(i))
mon->inject_args(mdsmap.get_inst(i), m->cmd[3]);
r = 0;
if (!mon->is_leader()) return;
// expand mds cluster (add new nodes to @in)?
- int cursize = pending_mdsmap.get_num_mds();
- if (cursize < pending_mdsmap.get_max_mds() &&
- !pending_mdsmap.is_degraded()) {
+ while (pending_mdsmap.get_num_mds() < pending_mdsmap.get_max_mds() &&
+ !pending_mdsmap.is_degraded()) {
int mds = 0;
while (pending_mdsmap.is_in(mds))
mds++;