if (pending_inc.crush.length())
bl = pending_inc.crush;
else
- osdmap.crush->encode(bl);
+ osdmap.crush->encode(bl, CEPH_FEATURES_SUPPORTED_DEFAULT);
bufferlist::iterator p = bl.begin();
newcrush.decode(p);
rdata.append(osdmap_bl);
ss << "got osdmap epoch " << p->get_epoch();
} else if (prefix == "osd getcrushmap") {
- p->crush->encode(rdata);
+ p->crush->encode(rdata, mon->quorum_features);
ss << "got crush map from osdmap epoch " << p->get_epoch();
}
if (p != &osdmap)
return ret;
pending_inc.crush.clear();
- newcrush.encode(pending_inc.crush);
+ newcrush.encode(pending_inc.crush, mon->quorum_features);
*ss << "renamed bucket " << srcname << " into " << dstname;
return 0;
}
return err;
*ruleset = err;
pending_inc.crush.clear();
- newcrush.encode(pending_inc.crush);
+ newcrush.encode(pending_inc.crush, mon->quorum_features);
return 0;
}
}
stringstream& ss)
{
OSDMap::Incremental new_pending = pending_inc;
- ::encode(*newcrush, new_pending.crush);
+ ::encode(*newcrush, new_pending.crush, mon->quorum_features);
OSDMap newmap;
newmap.deepish_copy_from(osdmap);
newmap.apply_incremental(new_pending);
}
pending_inc.crush.clear();
- newcrush.encode(pending_inc.crush);
+ newcrush.encode(pending_inc.crush, mon->quorum_features);
ss << "added bucket " << name << " type " << typestr
<< " to crush map";
goto update;
}
pending_inc.crush.clear();
- newcrush.encode(pending_inc.crush);
+ newcrush.encode(pending_inc.crush, mon->quorum_features);
ss << action << " item id " << osdid << " name '" << name << "' weight "
<< weight << " at location " << loc << " to crush map";
getline(ss, rs);
}
if (err > 0) {
pending_inc.crush.clear();
- newcrush.encode(pending_inc.crush);
+ newcrush.encode(pending_inc.crush, mon->quorum_features);
ss << "create-or-move updating item name '" << name << "' weight " << weight
<< " at location " << loc << " to crush map";
getline(ss, rs);
if (err >= 0) {
ss << "moved item id " << id << " name '" << name << "' to location " << loc << " in crush map";
pending_inc.crush.clear();
- newcrush.encode(pending_inc.crush);
+ newcrush.encode(pending_inc.crush, mon->quorum_features);
getline(ss, rs);
wait_for_finished_proposal(op, new Monitor::C_Command(mon, op, 0, rs,
get_last_committed() + 1));
ss << "linked item id " << id << " name '" << name
<< "' to location " << loc << " in crush map";
pending_inc.crush.clear();
- newcrush.encode(pending_inc.crush);
+ newcrush.encode(pending_inc.crush, mon->quorum_features);
} else {
ss << "cannot link item id " << id << " name '" << name
<< "' to location " << loc;
}
if (err == 0) {
pending_inc.crush.clear();
- newcrush.encode(pending_inc.crush);
+ newcrush.encode(pending_inc.crush, mon->quorum_features);
ss << "removed item id " << id << " name '" << name << "' from crush map";
getline(ss, rs);
wait_for_finished_proposal(op, new Monitor::C_Command(mon, op, 0, rs,
newcrush.reweight(g_ceph_context);
pending_inc.crush.clear();
- newcrush.encode(pending_inc.crush);
+ newcrush.encode(pending_inc.crush, mon->quorum_features);
ss << "reweighted crush hierarchy";
getline(ss, rs);
wait_for_finished_proposal(op, new Monitor::C_Command(mon, op, 0, rs,
if (err < 0)
goto reply;
pending_inc.crush.clear();
- newcrush.encode(pending_inc.crush);
+ newcrush.encode(pending_inc.crush, mon->quorum_features);
ss << "reweighted item id " << id << " name '" << name << "' to " << w
<< " in crush map";
getline(ss, rs);
if (err < 0)
goto reply;
pending_inc.crush.clear();
- newcrush.encode(pending_inc.crush);
+ newcrush.encode(pending_inc.crush, mon->quorum_features);
ss << "reweighted subtree id " << id << " name '" << name << "' to " << w
<< " in crush map";
getline(ss, rs);
}
pending_inc.crush.clear();
- newcrush.encode(pending_inc.crush);
+ newcrush.encode(pending_inc.crush, mon->quorum_features);
ss << "adjusted tunables profile to " << profile;
getline(ss, rs);
wait_for_finished_proposal(op, new Monitor::C_Command(mon, op, 0, rs,
}
pending_inc.crush.clear();
- newcrush.encode(pending_inc.crush);
+ newcrush.encode(pending_inc.crush, mon->quorum_features);
ss << "adjusted tunable " << tunable << " to " << value;
getline(ss, rs);
wait_for_finished_proposal(op, new Monitor::C_Command(mon, op, 0, rs,
}
pending_inc.crush.clear();
- newcrush.encode(pending_inc.crush);
+ newcrush.encode(pending_inc.crush, mon->quorum_features);
}
getline(ss, rs);
wait_for_finished_proposal(op, new Monitor::C_Command(mon, op, 0, rs,
}
pending_inc.crush.clear();
- newcrush.encode(pending_inc.crush);
+ newcrush.encode(pending_inc.crush, mon->quorum_features);
}
getline(ss, rs);
wait_for_finished_proposal(op, new Monitor::C_Command(mon, op, 0, rs,