mirror of
https://github.com/ceph/ceph
synced 2025-01-02 17:12:31 +00:00
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:
parent
faec324f64
commit
2d9cfadf71
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user