From: Casey Bodley Date: Fri, 19 Apr 2019 22:37:35 +0000 (-0400) Subject: cls/rgw: expose cls_rgw_bucket_list_op for single shard X-Git-Tag: v13.2.6~8^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=5cb96ae96e5d4a1720599dea338cbb435e1f256d;p=ceph.git cls/rgw: expose cls_rgw_bucket_list_op for single shard Signed-off-by: Casey Bodley (cherry picked from commit cd1fc96c5ca5254eb8343509b11a59514d62e532) Conflicts: src/cls/rgw/cls_rgw_client.cc: remove unnessary "struct"s --- diff --git a/src/cls/rgw/cls_rgw_client.cc b/src/cls/rgw/cls_rgw_client.cc index 7342ed96125d..30c40c5d7787 100644 --- a/src/cls/rgw/cls_rgw_client.cc +++ b/src/cls/rgw/cls_rgw_client.cc @@ -207,20 +207,33 @@ void cls_rgw_bucket_complete_op(ObjectWriteOperation& o, RGWModifyOp op, string& o.exec(RGW_CLASS, RGW_BUCKET_COMPLETE_OP, in); } -static bool issue_bucket_list_op(librados::IoCtx& io_ctx, - const string& oid, const cls_rgw_obj_key& start_obj, const string& filter_prefix, - uint32_t num_entries, bool list_versions, BucketIndexAioManager *manager, - struct rgw_cls_list_ret *pdata) { +void cls_rgw_bucket_list_op(librados::ObjectReadOperation& op, + const cls_rgw_obj_key& start_obj, + const std::string& filter_prefix, + uint32_t num_entries, + bool list_versions, + rgw_cls_list_ret* result) +{ bufferlist in; - struct rgw_cls_list_op call; + rgw_cls_list_op call; call.start_obj = start_obj; call.filter_prefix = filter_prefix; call.num_entries = num_entries; call.list_versions = list_versions; encode(call, in); + op.exec(RGW_CLASS, RGW_BUCKET_LIST, in, new ClsBucketIndexOpCtx(result, NULL)); +} + +static bool issue_bucket_list_op(librados::IoCtx& io_ctx, const string& oid, + const cls_rgw_obj_key& start_obj, + const string& filter_prefix, + uint32_t num_entries, bool list_versions, + BucketIndexAioManager *manager, + rgw_cls_list_ret *pdata) { librados::ObjectReadOperation op; - op.exec(RGW_CLASS, RGW_BUCKET_LIST, in, new ClsBucketIndexOpCtx(pdata, NULL)); + cls_rgw_bucket_list_op(op, start_obj, filter_prefix, + num_entries, list_versions, pdata); return manager->aio_operate(io_ctx, oid, &op); } diff --git a/src/cls/rgw/cls_rgw_client.h b/src/cls/rgw/cls_rgw_client.h index dd1e32bd654c..7cc35a118470 100644 --- a/src/cls/rgw/cls_rgw_client.h +++ b/src/cls/rgw/cls_rgw_client.h @@ -419,6 +419,13 @@ public: start_obj(_start_obj), filter_prefix(_filter_prefix), num_entries(_num_entries), list_versions(_list_versions), result(list_results) {} }; +void cls_rgw_bucket_list_op(librados::ObjectReadOperation& op, + const cls_rgw_obj_key& start_obj, + const std::string& filter_prefix, + uint32_t num_entries, + bool list_versions, + rgw_cls_list_ret* result); + class CLSRGWIssueBILogList : public CLSRGWConcurrentIO { map& result; BucketIndexShardsManager& marker_mgr;