]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd/osd_types: add PG_STATE_LAGGY
authorSage Weil <sage@redhat.com>
Fri, 28 Jun 2019 15:15:20 +0000 (10:15 -0500)
committerSage Weil <sage@redhat.com>
Thu, 26 Sep 2019 17:21:53 +0000 (12:21 -0500)
PG is laggy (unreadable) because ping(s) are delayed.

Signed-off-by: Sage Weil <sage@redhat.com>
src/osd/osd_types.cc
src/osd/osd_types.h

index d2be580f4e9c3eea4d8fca864fc3c2e578fc8a48..1eccc0c53322ddfa6a646503c3f2abb1eba3684b 100644 (file)
@@ -1159,6 +1159,8 @@ std::string pg_state_string(uint64_t state)
     oss << "snaptrim_error+";
   if (state & PG_STATE_FAILED_REPAIR)
     oss << "failed_repair+";
+  if (state & PG_STATE_LAGGY)
+    oss << "laggy+";
   string ret(oss.str());
   if (ret.length() > 0)
     ret.resize(ret.length() - 1);
@@ -1232,6 +1234,8 @@ std::optional<uint64_t> pg_string_state(const std::string& state)
     type = PG_STATE_CREATING;
   else if (state == "failed_repair")
     type = PG_STATE_FAILED_REPAIR;
+  else if (state == "laggy")
+    type = PG_STATE_LAGGY;
   else if (state == "unknown")
     type = 0;
   else
index 52b511549f3f202f2966b4d3a6a460fca854e33c..7e4c09b1d2025c1c48778064f67a7c973afce191 100644 (file)
@@ -992,6 +992,7 @@ WRITE_CLASS_ENCODER_FEATURES(objectstore_perf_stat_t)
 #define PG_STATE_FORCED_RECOVERY    (1ULL << 30) // force recovery of this pg before any other
 #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
 
 std::string pg_state_string(uint64_t state);
 std::string pg_vector_string(const std::vector<int32_t> &a);