]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
ceph-objectstore-tool: Check pgid validity earlier like we did before
authorDavid Zafman <dzafman@redhat.com>
Mon, 9 Feb 2015 23:37:57 +0000 (15:37 -0800)
committerDavid Zafman <dzafman@redhat.com>
Wed, 13 May 2015 20:09:11 +0000 (13:09 -0700)
This code was not doing the umount() even though it was moved after mount()

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

index fa6843fc122a904731813d9db0216693af07d8f4..4bf9de00ff39e1cb6684b601d3c956b492625f2a 100644 (file)
@@ -2517,6 +2517,11 @@ int main(int argc, char **argv)
     return 1;
   }
 
+  if (pgidstr.length() && !pgid.parse(pgidstr.c_str())) {
+    cerr << "Invalid pgid '" << pgidstr << "' specified" << std::endl;
+    return 1;
+  }
+
   ObjectStore *fs = ObjectStore::create(g_ceph_context, type, dpath, jpath, flags);
   if (fs == NULL) {
     cerr << "Must provide --type (filestore, memstore, keyvaluestore)" << std::endl;
@@ -2581,11 +2586,6 @@ int main(int argc, char **argv)
     goto out;
   }
 
-  if (pgidstr.length() && !pgid.parse(pgidstr.c_str())) {
-    cerr << "Invalid pgid '" << pgidstr << "' specified" << std::endl;
-    return 1;
-  }
-
   if (op != "list" && vm.count("object")) {
     json_spirit::Value v;
     try {