]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
crimson/admin: do not construct AdminSocketHook with osd
authorKefu Chai <kchai@redhat.com>
Sat, 15 May 2021 06:00:33 +0000 (14:00 +0800)
committerKefu Chai <kchai@redhat.com>
Tue, 18 May 2021 10:05:33 +0000 (18:05 +0800)
osd is not used at all.

Signed-off-by: Kefu Chai <kchai@redhat.com>
src/crimson/admin/osd_admin.cc
src/crimson/osd/osd.cc

index a1d308351a7ab8c41f1055e58348c97612f36dca..511a62d443176fccf718240ccab16d9d7ebb8c45 100644 (file)
@@ -135,12 +135,11 @@ template std::unique_ptr<AdminSocketHook> make_asok_hook<DumpPGStateHistory>(con
 //dump the contents of perfcounters in osd and store
 class DumpPerfCountersHook final: public AdminSocketHook {
 public:
-  explicit DumpPerfCountersHook(const crimson::osd::OSD &osd) :
+  explicit DumpPerfCountersHook() :
     AdminSocketHook{"perfcounters_dump",
                     "name=logger,type=CephString,req=false "
                     "name=counter,type=CephString,req=false",
-                    "dump perfcounters in osd and store"},
-    osd{osd}
+                    "dump perfcounters in osd and store"}
   {}
   seastar::future<tell_result_t> call(const cmdmap_t& cmdmap,
                                       std::string_view format,
@@ -157,10 +156,8 @@ public:
     crimson::common::local_perf_coll().dump_formatted(f.get(), false, logger, counter);
     return seastar::make_ready_future<tell_result_t>(std::move(f));
   }
-private:
-  const crimson::osd::OSD& osd;
 };
-template std::unique_ptr<AdminSocketHook> make_asok_hook<DumpPerfCountersHook>(const crimson::osd::OSD& osd);
+template std::unique_ptr<AdminSocketHook> make_asok_hook<DumpPerfCountersHook>();
 
 
 
index ab9862ae555658b9bf36dc61ab3a8ac72cb424d6..4a653011396781614cb1722b4db54901f4909f54 100644 (file)
@@ -442,7 +442,7 @@ seastar::future<> OSD::start_asok_admin()
       asok->register_command(make_asok_hook<FlushPgStatsHook>(*this)),
       asok->register_command(make_asok_hook<DumpPGStateHistory>(std::as_const(*this))),
       asok->register_command(make_asok_hook<SeastarMetricsHook>()),
-      asok->register_command(make_asok_hook<DumpPerfCountersHook>(std::as_const(*this))),
+      asok->register_command(make_asok_hook<DumpPerfCountersHook>()),
       // PG commands
       asok->register_command(make_asok_hook<pg::QueryCommand>(*this)),
       asok->register_command(make_asok_hook<pg::MarkUnfoundLostCommand>(*this)));