]> git-server-git.apps.pok.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>
Thu, 25 Feb 2016 20:50:20 +0000 (12:50 -0800)
This code was not doing the umount() even though it was moved after mount()

Signed-off-by: David Zafman <dzafman@redhat.com>
(cherry picked from commit 565b413df9c562a4071b9372d6362a9105c3538e)

src/tools/ceph_objectstore_tool.cc

index 9e6894664ca8c52044b0faba7da280f40552bbd2..e7304ba1ee2cdc552af0fa832f44d57ea78e0d87 100644 (file)
@@ -2516,6 +2516,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;
@@ -2580,11 +2585,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 {