]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
tools: Fix dump-super which doesn't require pgid
authorDavid Zafman <dzafman@redhat.com>
Tue, 23 Jun 2015 01:38:01 +0000 (18:38 -0700)
committerDavid Zafman <dzafman@redhat.com>
Fri, 10 Jul 2015 17:10:43 +0000 (10:10 -0700)
A valid pgid had to be specified in order for superblock to be displayed,
but it was otherwise ignored.
Fix message that didn't include dump-super

Signed-off-by: David Zafman <dzafman@redhat.com>
src/tools/ceph_objectstore_tool.cc

index 954af594e6cd09b5fd663ba96ac2e1a5da494781..bc031b68d78909476b6579120b3b41f47c1f2e50 100644 (file)
@@ -2351,6 +2351,15 @@ int main(int argc, char **argv)
     goto out;
   }
 
+  if (op == "dump-super") {
+    formatter->open_object_section("superblock");
+    superblock.dump(formatter);
+    formatter->close_section();
+    formatter->flush(cout);
+    cout << std::endl;
+    goto out;
+  }
+
   ret = fs->list_collections(ls);
   if (ret < 0) {
     cerr << "failed to list pgs: " << cpp_strerror(ret) << std::endl;
@@ -2640,14 +2649,8 @@ int main(int argc, char **argv)
         fs->apply_transaction(*t);
         cout << "Removal succeeded" << std::endl;
       }
-    } else if (op == "dump-super") {
-      formatter->open_object_section("superblock");
-      superblock.dump(formatter);
-      formatter->close_section();
-      formatter->flush(cout);
-      cout << std::endl;
     } else {
-      cerr << "Must provide --op (info, log, remove, export, import, list, fix-lost, list-pgs, rm-past-intervals)"
+      cerr << "Must provide --op (info, log, remove, export, import, list, fix-lost, list-pgs, rm-past-intervals, set-allow-sharded-objects, dump-journal, dump-super)"
        << std::endl;
       usage(desc);
       ret = 1;