From: David Zafman Date: Mon, 9 Feb 2015 23:37:57 +0000 (-0800) Subject: ceph-objectstore-tool: Check pgid validity earlier like we did before X-Git-Tag: v0.94.7~28^2~11^2~40 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=c5ac7ce09bc5b96722738a1884c6046aba6518f2;p=ceph.git ceph-objectstore-tool: Check pgid validity earlier like we did before This code was not doing the umount() even though it was moved after mount() Signed-off-by: David Zafman (cherry picked from commit 565b413df9c562a4071b9372d6362a9105c3538e) --- diff --git a/src/tools/ceph_objectstore_tool.cc b/src/tools/ceph_objectstore_tool.cc index 9e6894664ca..e7304ba1ee2 100644 --- a/src/tools/ceph_objectstore_tool.cc +++ b/src/tools/ceph_objectstore_tool.cc @@ -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 {