From a0b453ad335671bd92f165115d6ee984d2412448 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Fri, 28 Jun 2019 10:18:12 -0500 Subject: [PATCH] osd/osd_types: add PG_STATE_WAIT PG is waiting for previous intervals' readable intervals to expire. Signed-off-by: Sage Weil --- src/osd/osd_types.cc | 4 ++++ src/osd/osd_types.h | 1 + 2 files changed, 5 insertions(+) diff --git a/src/osd/osd_types.cc b/src/osd/osd_types.cc index 1eccc0c5332..af432cec3d7 100644 --- a/src/osd/osd_types.cc +++ b/src/osd/osd_types.cc @@ -1161,6 +1161,8 @@ std::string pg_state_string(uint64_t state) oss << "failed_repair+"; if (state & PG_STATE_LAGGY) oss << "laggy+"; + if (state & PG_STATE_WAIT) + oss << "wait+"; string ret(oss.str()); if (ret.length() > 0) ret.resize(ret.length() - 1); @@ -1236,6 +1238,8 @@ std::optional pg_string_state(const std::string& state) type = PG_STATE_FAILED_REPAIR; else if (state == "laggy") type = PG_STATE_LAGGY; + else if (state == "wait") + type = PG_STATE_WAIT; else if (state == "unknown") type = 0; else diff --git a/src/osd/osd_types.h b/src/osd/osd_types.h index 7e4c09b1d20..3f45d84bc00 100644 --- a/src/osd/osd_types.h +++ b/src/osd/osd_types.h @@ -993,6 +993,7 @@ WRITE_CLASS_ENCODER_FEATURES(objectstore_perf_stat_t) #define PG_STATE_FORCED_BACKFILL (1ULL << 31) // force backfill of this pg before any other #define PG_STATE_FAILED_REPAIR (1ULL << 32) // A repair failed to fix all errors #define PG_STATE_LAGGY (1ULL << 33) // PG is laggy/unreabable due to slow/delayed pings +#define PG_STATE_WAIT (1ULL << 34) // PG is waiting for prior intervals' readable period to expire std::string pg_state_string(uint64_t state); std::string pg_vector_string(const std::vector &a); -- 2.39.5