Signed-off-by: Sage Weil <sage@inktank.com>
return features;
}
+uint64_t OSDMap::get_up_osd_features() const
+{
+ bool first = true;
+ uint64_t features = 0;
+ for (int osd = 0; osd < max_osd; ++osd) {
+ if (!is_up(osd))
+ continue;
+ const osd_xinfo_t &xi = get_xinfo(osd);
+ if (first) {
+ features = xi.features;
+ first = false;
+ } else {
+ features &= xi.features;
+ }
+ }
+ return features;
+}
+
void OSDMap::dedup(const OSDMap *o, OSDMap *n)
{
if (o->epoch == n->epoch)
*/
uint64_t get_features(uint64_t *mask) const;
+ /**
+ * get intersection of features supported by up osds
+ */
+ uint64_t get_up_osd_features() const;
+
int apply_incremental(const Incremental &inc);
/// try to re-use/reference addrs in oldmap from newmap