]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
osd/OSDMap: add dead_epoch to xinfo
authorSage Weil <sage@redhat.com>
Tue, 18 Jun 2019 16:44:34 +0000 (11:44 -0500)
committerSage Weil <sage@redhat.com>
Thu, 18 Jul 2019 17:20:28 +0000 (12:20 -0500)
Signed-off-by: Sage Weil <sage@redhat.com>
src/osd/OSDMap.cc
src/osd/OSDMap.h

index 788715d6867346c5cb4f6e3af2bc84311cd8be82..6321378ca6d015cf3b053ab75c1392191e7037ed 100644 (file)
@@ -133,6 +133,7 @@ void osd_xinfo_t::dump(Formatter *f) const
   f->dump_int("features", features);
   f->dump_unsigned("old_weight", old_weight);
   f->dump_stream("last_purged_snaps_scrub") << last_purged_snaps_scrub;
+  f->dump_int("dead_epoch", dead_epoch);
 }
 
 void osd_xinfo_t::encode(ceph::buffer::list& bl, uint64_t enc_features) const
@@ -150,6 +151,7 @@ void osd_xinfo_t::encode(ceph::buffer::list& bl, uint64_t enc_features) const
   encode(old_weight, bl);
   if (v >= 4) {
     encode(last_purged_snaps_scrub, bl);
+    encode(dead_epoch, bl);
   }
   ENCODE_FINISH(bl);
 }
@@ -172,6 +174,9 @@ void osd_xinfo_t::decode(ceph::buffer::list::const_iterator& bl)
     old_weight = 0;
   if (struct_v >= 4) {
     decode(last_purged_snaps_scrub, bl);
+    decode(dead_epoch, bl);
+  } else {
+    dead_epoch = 0;
   }
   DECODE_FINISH(bl);
 }
@@ -192,7 +197,8 @@ ostream& operator<<(ostream& out, const osd_xinfo_t& xi)
             << " laggy_probability " << xi.laggy_probability
             << " laggy_interval " << xi.laggy_interval
             << " old_weight " << xi.old_weight
-            << " last_purged_snaps_scrub " << xi.last_purged_snaps_scrub;
+            << " last_purged_snaps_scrub " << xi.last_purged_snaps_scrub
+            << " dead_epoch " << xi.dead_epoch;
 }
 
 // ----------------------------------
index e4bc545e97a5772c05e95f3bc57c4f3c5463a175..08697b21c1371ff9b1aeb18d69448ff4ac6dc3ef 100644 (file)
@@ -93,6 +93,7 @@ struct osd_xinfo_t {
   uint64_t features;       ///< features supported by this osd we should know about
   __u32 old_weight;        ///< weight prior to being auto marked out
   utime_t last_purged_snaps_scrub; ///< last scrub of purged_snaps
+  epoch_t dead_epoch = 0;  ///< last epoch we were confirmed dead (not just down)
 
   osd_xinfo_t() : laggy_probability(0), laggy_interval(0),
                   features(0), old_weight(0) {}