From: Radosław Zarzyński Date: Fri, 1 Apr 2022 15:02:08 +0000 (+0200) Subject: crimson/common: abstract from staticness of BlockerT::type_name. X-Git-Tag: v18.0.0~947^2~55 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=d7716d9d4c17dd25263492922e6fdfe90352c729;p=ceph-ci.git crimson/common: abstract from staticness of BlockerT::type_name. Signed-off-by: Radosław Zarzyński --- diff --git a/src/crimson/common/operation.h b/src/crimson/common/operation.h index a992b910349..d6de22393f3 100644 --- a/src/crimson/common/operation.h +++ b/src/crimson/common/operation.h @@ -161,7 +161,7 @@ public: virtual ~BlockerT() = default; private: const char *get_type_name() const final { - return T::type_name; + return static_cast(this)->type_name; } }; diff --git a/src/crimson/osd/osdmap_gate.h b/src/crimson/osd/osdmap_gate.h index 2b73d8959d1..367a7f80dcf 100644 --- a/src/crimson/osd/osdmap_gate.h +++ b/src/crimson/osd/osdmap_gate.h @@ -22,7 +22,7 @@ namespace crimson::osd { class ShardServices; class OSDMapGate { - struct OSDMapBlocker : public Blocker { + struct OSDMapBlocker : public BlockerT { const char * type_name; epoch_t epoch; @@ -37,10 +37,6 @@ class OSDMapGate { seastar::shared_promise 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,