Now we can send messages to standbys via broadcast, even if we
can't yet single them out.
Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
if (m->cmd[0] == "*") {
m->cmd.erase(m->cmd.begin()); //and now we're done with the target num
r = -ENOENT;
- for (unsigned i = 0; i < mdsmap.get_max_mds(); ++i) {
- if (mdsmap.is_active(i)) {
- mon->send_command(mdsmap.get_inst(i), m->cmd, paxos->get_version());
- r = 0;
- }
+ const map<uint64_t, MDSMap::mds_info_t> mds_info = mdsmap.get_mds_info();
+ for (map<uint64_t, MDSMap::mds_info_t>::const_iterator i = mds_info.begin();
+ i != mds_info.end();
+ ++i) {
+ mon->send_command(i->second.get_inst(), m->cmd, paxos->get_version());
+ r = 0;
}
if (r == -ENOENT) {
ss << "no mds active";