From 2d9cfadf710f364ae2ef1c4bafbd17dcfb3c9e4c Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Mon, 16 Jan 2017 16:51:13 -0500 Subject: [PATCH] rados: use bare omap_get_keys op This handles the client-side looping on 'more' if the OSD limits the response size. Signed-off-by: Sage Weil --- src/tools/rados/rados.cc | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/tools/rados/rados.cc b/src/tools/rados/rados.cc index 28b08ba77ca..99efe187de1 100644 --- a/src/tools/rados/rados.cc +++ b/src/tools/rados/rados.cc @@ -3196,10 +3196,8 @@ static int rados_tool_common(const std::map < std::string, std::string > &opts, if (!pool_name || nargs.size() < 2) usage_exit(); - librados::ObjectReadOperation read; set out_keys; - read.omap_get_keys("", LONG_MAX, &out_keys, &ret); - io_ctx.operate(nargs[1], &read, NULL); + ret = io_ctx.omap_get_keys(nargs[1], "", LONG_MAX, &out_keys); if (ret < 0) { cerr << "error getting omap key set " << pool_name << "/" << nargs[1] << ": " << cpp_strerror(ret) << std::endl;