Signed-off-by: Sage Weil <sage@inktank.com>
out << " nearfull";
}
+bool OSDMap::crush_ruleset_in_use(int ruleset) const
+{
+ for (map<int64_t,pg_pool_t>::const_iterator p = pools.begin(); p != pools.end(); ++p) {
+ if (p->second.crush_ruleset == ruleset)
+ return true;
+ }
+ return false;
+}
+
void OSDMap::build_simple(CephContext *cct, epoch_t e, uuid_d &fsid,
int nosd, int pg_bits, int pgp_bits)
{
static void build_simple_crush_map_from_conf(CephContext *cct, CrushWrapper& crush,
map<int, const char*>& rulesets);
+ bool crush_ruleset_in_use(int ruleset) const;
private:
void print_osd_line(int cur, ostream *out, Formatter *f) const;