]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
cls/rgw: expose cls_rgw_bucket_list_op for single shard
authorCasey Bodley <cbodley@redhat.com>
Fri, 19 Apr 2019 22:37:35 +0000 (18:37 -0400)
committerNathan Cutler <ncutler@suse.com>
Fri, 31 May 2019 12:52:16 +0000 (14:52 +0200)
Signed-off-by: Casey Bodley <cbodley@redhat.com>
(cherry picked from commit cd1fc96c5ca5254eb8343509b11a59514d62e532)

Conflicts:
src/cls/rgw/cls_rgw_client.cc: remove unnessary "struct"s

src/cls/rgw/cls_rgw_client.cc
src/cls/rgw/cls_rgw_client.h

index 93ef2b522d16d66ea8ebeb5094a8a038d62ae6cb..c1c20b54633b578e1cc1d8d8d8b9a1e62682ca95 100644 (file)
@@ -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<rgw_cls_list_ret>(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<struct rgw_cls_list_ret>(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);
 }
 
index 97a950cf0242ca30dd5817b60d2a489f038e643c..ab9f53cf1d6282228f19e5e232cf593512a165ff 100644 (file)
@@ -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<int, struct cls_rgw_bi_log_list_ret>& result;
   BucketIndexShardsManager& marker_mgr;