return ret;
}
+int pg_string_state(std::string state)
+{
+ int type;
+ if (state == "active")
+ type = PG_STATE_ACTIVE;
+ else if (state == "clean")
+ type = PG_STATE_CLEAN;
+ else if (state == "down")
+ type = PG_STATE_DOWN;
+ else if (state == "replay")
+ type = PG_STATE_REPLAY;
+ else if (state == "splitting")
+ type = PG_STATE_SPLITTING;
+ else if (state == "scrubbing")
+ type = PG_STATE_SCRUBBING;
+ else if (state == "scrubq")
+ type = PG_STATE_SCRUBQ;
+ else if (state == "degraded")
+ type = PG_STATE_DEGRADED;
+ else if (state == "inconsistent")
+ type = PG_STATE_INCONSISTENT;
+ else if (state == "peering")
+ type = PG_STATE_PEERING;
+ else if (state == "recoverying")
+ type = PG_STATE_RECOVERING;
+ else if (state == "backfill_wait")
+ type = PG_STATE_BACKFILL_WAIT;
+ else if (state == "incomplete")
+ type = PG_STATE_INCOMPLETE;
+ else if (state == "remapped")
+ type = PG_STATE_REMAPPED;
+ else if (state == "stale")
+ type = PG_STATE_STALE;
+ else if (state == "deep_scrub")
+ type = PG_STATE_DEEP_SCRUB;
+ else if (state == "backfill")
+ type = PG_STATE_BACKFILL;
+ else if (state == "backfill_toofull")
+ type = PG_STATE_BACKFILL_TOOFULL;
+ else if (state == "recovery_wait")
+ type = PG_STATE_RECOVERY_WAIT;
+ else if (state == "undersized")
+ type = PG_STATE_UNDERSIZED;
+ else
+ type = -1;
+ return type;
+}
// -- eversion_t --
string eversion_t::get_key_name() const