From 565b413df9c562a4071b9372d6362a9105c3538e Mon Sep 17 00:00:00 2001 From: David Zafman Date: Mon, 9 Feb 2015 15:37:57 -0800 Subject: [PATCH] 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 --- src/tools/ceph_objectstore_tool.cc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/tools/ceph_objectstore_tool.cc b/src/tools/ceph_objectstore_tool.cc index fa6843fc122a9..4bf9de00ff39e 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 { -- 2.39.5