]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
ceph-objectstore-tool: performance: Add --pgid for faster search for object by name
authorDavid Zafman <dzafman@redhat.com>
Tue, 26 Sep 2017 22:32:24 +0000 (15:32 -0700)
committerDavid Zafman <dzafman@redhat.com>
Wed, 27 Sep 2017 19:35:41 +0000 (12:35 -0700)
Fixes: http://tracker.ceph.com/issues/21327
Signed-off-by: David Zafman <dzafman@redhat.com>
src/tools/ceph_objectstore_tool.cc

index 41fe02905c6b370f8cccf26ee6e79db11057da3f..49cf02c32675a40fedafa2b813a3eafae3d50e4c 100644 (file)
@@ -2921,7 +2921,11 @@ int main(int argc, char **argv)
         if (vm.count("objcmd") && (objcmd == "remove-clone-metadata"))
          head = true;
        lookup_ghobject lookup(object, nspace, head);
-       if (action_on_all_objects(fs, lookup, debug)) {
+       if (pgidstr.length())
+         ret = action_on_all_objects_in_exact_pg(fs, coll_t(pgid), lookup, debug);
+       else
+         ret = action_on_all_objects(fs, lookup, debug);
+       if (ret) {
          throw std::runtime_error("Internal error");
        } else {
          if (lookup.size() != 1) {