]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
ceph-osdomap-tool: Add compact comand option 20982/head
authorDavid Zafman <dzafman@redhat.com>
Thu, 19 Oct 2017 19:56:58 +0000 (12:56 -0700)
committerDavid Zafman <dzafman@redhat.com>
Mon, 19 Mar 2018 20:53:29 +0000 (13:53 -0700)
Signed-off-by: David Zafman <dzafman@redhat.com>
(cherry picked from commit b1f397f4fc3313ee0325722156759bfe32286c6b)

src/tools/ceph_osdomap_tool.cc

index 9a06e3ce43d66156df2e75a4a73c07f40373e734..be43a9c0ae4e788d2815db92f84c390d8af2e635 100644 (file)
@@ -37,7 +37,7 @@ int main(int argc, char **argv) {
     ("debug", "Additional debug output from DBObjectMap")
     ("oid", po::value<string>(&oid), "Restrict to this object id when dumping objects")
     ("command", po::value<string>(&cmd),
-     "command arg is one of [dump-raw-keys, dump-raw-key-vals, dump-objects, dump-objects-with-keys, check, dump-headers, repair], mandatory")
+     "command arg is one of [dump-raw-keys, dump-raw-key-vals, dump-objects, dump-objects-with-keys, check, dump-headers, repair, compact], mandatory")
     ("backend", po::value<string>(&backend),
      "DB backend (default rocksdb)")
     ;
@@ -202,6 +202,9 @@ int main(int argc, char **argv) {
     omap.state.v = 2;
     omap.state.legacy = false;
     omap.set_state();
+  } else if (cmd == "compact") {
+    omap.compact();
+    return 0;
   } else {
     std::cerr << "Did not recognize command " << cmd << std::endl;
     r = 1;