]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
ceph-osdomap-tool: Add compact comand option
authorDavid Zafman <dzafman@redhat.com>
Thu, 19 Oct 2017 19:56:58 +0000 (12:56 -0700)
committerDavid Zafman <dzafman@redhat.com>
Fri, 20 Oct 2017 15:05:20 +0000 (08:05 -0700)
Signed-off-by: David Zafman <dzafman@redhat.com>
src/tools/ceph_osdomap_tool.cc

index 4232ab40b41081e908e6e8244ef5a0130d072fae..936d1dc8fa45042de82652d8f50be98c297e082b 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)")
     ;
@@ -203,6 +203,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;
     return 1;