]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
crimson/common: abstract from staticness of BlockerT::type_name.
authorRadosław Zarzyński <rzarzyns@redhat.com>
Fri, 1 Apr 2022 15:02:08 +0000 (17:02 +0200)
committerRadosław Zarzyński <rzarzyns@redhat.com>
Wed, 4 May 2022 09:38:25 +0000 (11:38 +0200)
Signed-off-by: Radosław Zarzyński <rzarzyns@redhat.com>
src/crimson/common/operation.h
src/crimson/osd/osdmap_gate.h

index a992b910349f0f65c787d4ff1b0740f240103afd..d6de22393f3be4f2a2822d97aa2c50e654b1e502 100644 (file)
@@ -161,7 +161,7 @@ public:
   virtual ~BlockerT() = default;
 private:
   const char *get_type_name() const final {
-    return T::type_name;
+    return static_cast<const T*>(this)->type_name;
   }
 };
 
index 2b73d8959d1ccc0dc5e7794208c56edc70deaa3c..367a7f80dcf578fc68777819c650a20726efe565 100644 (file)
@@ -22,7 +22,7 @@ namespace crimson::osd {
 class ShardServices;
 
 class OSDMapGate {
-  struct OSDMapBlocker : public Blocker {
+  struct OSDMapBlocker : public BlockerT<OSDMapBlocker> {
     const char * type_name;
     epoch_t epoch;
 
@@ -37,10 +37,6 @@ class OSDMapGate {
     seastar::shared_promise<epoch_t> promise;
 
     void dump_detail(Formatter *f) const final;
-  private:
-    const char *get_type_name() const final {
-      return type_name;
-    }
   };
 
   // order the promises in ascending order of the waited osdmap epoch,