since = p->second.last_undegraded;
whatname = "degraded";
break;
+ case PGMap::STUCK_UNDERSIZED:
+ since = p->second.last_fullsized;
+ whatname = "undersized";
+ break;
case PGMap::STUCK_STALE:
since = p->second.last_unstale;
whatname = "stale";
note["stale"] += p->second;
if (p->first & PG_STATE_DOWN)
note["down"] += p->second;
+ if (p->first & PG_STATE_UNDERSIZED)
+ note["undersized"] += p->second;
if (p->first & PG_STATE_DEGRADED)
note["degraded"] += p->second;
if (p->first & PG_STATE_INCONSISTENT)
}
stuck_pgs.clear();
+ pg_map.get_stuck_stats(PGMap::STUCK_UNDERSIZED, cutoff, stuck_pgs);
+ if (!stuck_pgs.empty()) {
+ note["stuck undersized"] = stuck_pgs.size();
+ if (detail)
+ note_stuck_detail(PGMap::STUCK_UNDERSIZED, stuck_pgs, detail);
+ }
+ stuck_pgs.clear();
+
pg_map.get_stuck_stats(PGMap::STUCK_DEGRADED, cutoff, stuck_pgs);
if (!stuck_pgs.empty()) {
note["stuck degraded"] = stuck_pgs.size();
++p) {
if ((p->second.state & (PG_STATE_STALE |
PG_STATE_DOWN |
+ PG_STATE_UNDERSIZED |
PG_STATE_DEGRADED |
PG_STATE_INCONSISTENT |
PG_STATE_PEERING |
stuck_type = PGMap::STUCK_INACTIVE;
else if (type == "unclean")
stuck_type = PGMap::STUCK_UNCLEAN;
+ else if (type == "undersized")
+ stuck_type = PGMap::STUCK_UNDERSIZED;
else if (type == "degraded")
stuck_type = PGMap::STUCK_DEGRADED;
else if (type == "stale")