]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
crimson/osd: mark dump_detail() private
authorKefu Chai <kchai@redhat.com>
Sat, 3 Oct 2020 10:53:23 +0000 (18:53 +0800)
committerKefu Chai <kchai@redhat.com>
Sat, 3 Oct 2020 11:07:46 +0000 (19:07 +0800)
Blocker::dump_detail() is called by Blocker::dump(), the latter is a
member of Blocker. so there is no need to mark dump_detail() protected
or public to grant the access Blocker::dump() the access to this method.

Signed-off-by: Kefu Chai <kchai@redhat.com>
src/crimson/osd/osd_operation.h
src/crimson/osd/osdmap_gate.h

index 94a12dc75cdcd6c099062e55d2fd3456133deaaa..35f997ba9faa307c05c3ec655ade59093437f6be 100644 (file)
@@ -118,40 +118,37 @@ make_exception_blocking_future(Exception&& e) {
  * why a particular op is not making progress.
  */
 class Blocker {
-protected:
-  virtual void dump_detail(ceph::Formatter *f) const = 0;
-
 public:
   template <typename... T>
   blocking_future<T...> make_blocking_future(seastar::future<T...> &&f) {
     return blocking_future<T...>(this, std::move(f));
   }
-
   void dump(ceph::Formatter *f) const;
+  virtual ~Blocker() = default;
 
+private:
+  virtual void dump_detail(ceph::Formatter *f) const = 0;
   virtual const char *get_type_name() const = 0;
-
-  virtual ~Blocker() = default;
 };
 
 template <typename T>
 class BlockerT : public Blocker {
 public:
+  virtual ~BlockerT() = default;
+private:
   const char *get_type_name() const final {
     return T::type_name;
   }
-
-  virtual ~BlockerT() = default;
 };
 
 class AggregateBlocker : public BlockerT<AggregateBlocker> {
   vector<Blocker*> parent_blockers;
-protected:
-  void dump_detail(ceph::Formatter *f) const final;
 public:
   AggregateBlocker(vector<Blocker*> &&parent_blockers)
     : parent_blockers(std::move(parent_blockers)) {}
   static constexpr const char *type_name = "AggregateBlocker";
+private:
+  void dump_detail(ceph::Formatter *f) const final;
 };
 
 template <typename T>
@@ -352,11 +349,13 @@ public:
        return seastar::make_ready_future<>();
     });
   }
-protected:
+
+private:
   void dump_detail(Formatter *f) const final;
   const char *get_type_name() const final {
     return "OperationThrottler";
   }
+
 private:
   crimson::osd::scheduler::SchedulerRef scheduler;
 
@@ -381,8 +380,8 @@ private:
  * the op ordering is preserved.
  */
 class OrderedPipelinePhase : public Blocker {
-protected:
-  virtual void dump_detail(ceph::Formatter *f) const final;
+private:
+  void dump_detail(ceph::Formatter *f) const final;
   const char *get_type_name() const final {
     return name;
   }
index 15e3d2057ab246cc6c198426fa4155f2beaf23fe..2b73d8959d1ccc0dc5e7794208c56edc70deaa3c 100644 (file)
@@ -37,6 +37,7 @@ 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;
     }