]> 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>
Thu, 25 Feb 2016 20:50:24 +0000 (12:50 -0800)
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>
(cherry picked from commit fd1772e0ac4cb801d6f3b056645eeb4d3d6ef001)

src/tools/ceph_objectstore_tool.cc

index 9dcc81e2b86c62a3a8e9b7c60af6e30b8e80a4ae..c5e930755a2d8f07d7adafea1e435b13ee16e540 100644 (file)
@@ -3216,6 +3216,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;
@@ -3516,14 +3525,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;