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 <sage@redhat.com>
This commit is contained in:
Sage Weil 2017-01-16 16:51:13 -05:00
parent faec324f64
commit 2d9cfadf71

View File

@ -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<string> 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;