]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: remove get_mapped_pools command
authorSage Weil <sage@redhat.com>
Tue, 6 Feb 2018 14:48:24 +0000 (08:48 -0600)
committerSage Weil <sage@redhat.com>
Wed, 4 Apr 2018 13:26:52 +0000 (08:26 -0500)
No in-tree users.

Signed-off-by: Sage Weil <sage@redhat.com>
src/osd/OSD.cc
src/osd/OSD.h

index e8a4b301df1e5b10b4227c28241f9a13c2769231..d969801d9b21138b30a06e8b34f25e2bb1a96f34 100644 (file)
@@ -2138,14 +2138,6 @@ public:
   }
 };
 
-std::set<int> OSD::get_mapped_pools() {
-    std::set<int> pools;
-    RWLock::RLocker l(pg_map_lock);
-    for (const auto &i : pg_map)
-      pools.insert(i.first.pool());
-    return pools;
-}
-
 bool OSD::asok_command(std::string_view admin_command, const cmdmap_t& cmdmap,
                       std::string_view format, ostream& ss)
 {
@@ -2363,11 +2355,6 @@ will start to track new ops received afterwards.";
     f->open_object_section("compact_result");
     f->dump_float("elapsed_time", duration);
     f->close_section();
-  } else if (admin_command == "get_mapped_pools") {
-    f->open_object_section("mapped_pools");
-    set<int> poollist = get_mapped_pools();
-    f->dump_stream("pool_list") << poollist;
-    f->close_section();
   } else if (admin_command == "smart") {
     probe_smart(ss);
   } else if (admin_command == "list_devices") {
@@ -2930,12 +2917,6 @@ void OSD::final_init()
                                      " WARNING: Compaction probably slows your requests");
   assert(r == 0);
 
-  r = admin_socket->register_command("get_mapped_pools", "get_mapped_pools",
-                                     asok_hook,
-                                     "dump pools whose PG(s) are mapped to this OSD.");
-
-  assert(r == 0);
-
   r = admin_socket->register_command("smart", "smart",
                                      asok_hook,
                                      "probe OSD devices for SMART data.");
@@ -3437,7 +3418,6 @@ int OSD::shutdown()
   cct->get_admin_socket()->unregister_command("flush_store_cache");
   cct->get_admin_socket()->unregister_command("dump_pgstate_history");
   cct->get_admin_socket()->unregister_command("compact");
-  cct->get_admin_socket()->unregister_command("get_mapped_pools");
   cct->get_admin_socket()->unregister_command("smart");
   cct->get_admin_socket()->unregister_command("list_devices");
   delete asok_hook;
index 6568edaba61dae17332c5b57e9abbc95f1b064fd..e59fec0fddb1ffe260dbbf40aff08babd4d343e9 100644 (file)
@@ -1861,8 +1861,6 @@ public:
     return pg_map.size();
   }
 
-  std::set<int> get_mapped_pools();
-
 protected:
   PGRef _open_pg(
     OSDMapRef createmap,   ///< map pg is created in