ceph-objectstore-tool: performance: Add --pgid for faster search for object by name

Fixes: http://tracker.ceph.com/issues/21327

Signed-off-by: David Zafman <dzafman@redhat.com>
This commit is contained in:
David Zafman 2017-09-26 15:32:24 -07:00
parent e643d5c0fe
commit 14c5c834b9

View 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) {