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: v9.0.2~168^2~44 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=565b413df9c562a4071b9372d6362a9105c3538e;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 --- diff --git a/src/tools/ceph_objectstore_tool.cc b/src/tools/ceph_objectstore_tool.cc index fa6843fc122a..4bf9de00ff39 100644 --- a/src/tools/ceph_objectstore_tool.cc +++ b/src/tools/ceph_objectstore_tool.cc @@ -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 {