#include "common/Formatter.h"
#include "common/ceph_json.h"
#include "common/RWLock.h"
+#include "common/backport14.h"
#include "rgw_rados.h"
#include "rgw_acl.h"
pool = store->get_zone_params().user_uid_pool;
}
- int list_keys_init(RGWRados *store, void **phandle) override
+ int list_keys_init(RGWRados *store, const string& marker, void **phandle) override
{
- list_keys_info *info = new list_keys_info;
+ auto info = ceph::make_unique<list_keys_info>();
info->store = store;
- *phandle = (void *)info;
+ int ret = store->list_raw_objects_init(store->get_zone_params().user_uid_pool, marker,
+ &info->ctx);
+ if (ret < 0) {
+ return ret;
+ }
+
+ *phandle = (void *)info.release();
return 0;
}
list<string> unfiltered_keys;
- int ret = store->list_raw_objects(store->get_zone_params().user_uid_pool, no_filter,
- max, info->ctx, unfiltered_keys, truncated);
+ int ret = store->list_raw_objects_next(no_filter, max, info->ctx,
+ unfiltered_keys, truncated);
if (ret < 0 && ret != -ENOENT)
return ret;
if (ret == -ENOENT) {
list_keys_info *info = static_cast<list_keys_info *>(handle);
delete info;
}
+
+ string get_marker(void *handle) {
+ list_keys_info *info = static_cast<list_keys_info *>(handle);
+ return info->store->list_raw_objs_get_cursor(info->ctx);
+ }
};
void rgw_user_init(RGWRados *store)