]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
Merge pull request #58448 from cbodley/wip-rgw-lc-async
authorCasey Bodley <cbodley@users.noreply.github.com>
Wed, 14 Aug 2024 17:47:54 +0000 (13:47 -0400)
committerGitHub <noreply@github.com>
Wed, 14 Aug 2024 17:47:54 +0000 (13:47 -0400)
cls/rgw: define lc ops in terms of ObjectOperation instead of IoCtx

Reviewed-by: Matt Benjamin <mbenjamin@redhat.com>
1  2 
src/cls/rgw/cls_rgw_client.cc
src/cls/rgw/cls_rgw_client.h
src/rgw/driver/rados/rgw_sal_rados.cc
src/rgw/rgw_op.cc

Simple merge
index b708d5b51b3d70eebfccba61c0e1a4cea0431f59,ab2f4c9ca85113d0f4c7d993b3d22e1c8ff542a1..909e319482a7652761d9ce71a72de24e7027a6da
@@@ -600,26 -600,28 +600,26 @@@ void cls_rgw_usage_log_add(librados::Ob
  void cls_rgw_gc_set_entry(librados::ObjectWriteOperation& op, uint32_t expiration_secs, cls_rgw_gc_obj_info& info);
  void cls_rgw_gc_defer_entry(librados::ObjectWriteOperation& op, uint32_t expiration_secs, const std::string& tag);
  void cls_rgw_gc_remove(librados::ObjectWriteOperation& op, const std::vector<std::string>& tags);
 -
 -// these overloads which call io_ctx.operate() should not be called in the rgw.
 -// rgw_rados_operate() should be called after the overloads w/o calls to io_ctx.operate()
 -#ifndef CLS_CLIENT_HIDE_IOCTX
 -int cls_rgw_gc_list(librados::IoCtx& io_ctx, std::string& oid, std::string& marker, uint32_t max, bool expired_only,
 -                    std::list<cls_rgw_gc_obj_info>& entries, bool *truncated, std::string& next_marker);
 -#endif
 +void cls_rgw_gc_list(librados::ObjectReadOperation& op, const std::string& marker,
 +                     uint32_t max, bool expired_only, bufferlist& bl);
 +int cls_rgw_gc_list_decode(const bufferlist& bl,
 +                           std::list<cls_rgw_gc_obj_info>& entries,
 +                           bool *truncated, std::string& next_marker);
  
  /* lifecycle */
- // these overloads which call io_ctx.operate() should not be called in the rgw.
- // rgw_rados_operate() should be called after the overloads w/o calls to io_ctx.operate()
- #ifndef CLS_CLIENT_HIDE_IOCTX
int cls_rgw_lc_get_head(librados::IoCtx& io_ctx, const std::string& oid, cls_rgw_lc_obj_head& head);
- int cls_rgw_lc_put_head(librados::IoCtx& io_ctx, const std::string& oid, cls_rgw_lc_obj_head& head);
int cls_rgw_lc_get_next_entry(librados::IoCtx& io_ctx, const std::string& oid, const std::string& marker, cls_rgw_lc_entry& entry);
int cls_rgw_lc_rm_entry(librados::IoCtx& io_ctx, const std::string& oid, const cls_rgw_lc_entry& entry);
int cls_rgw_lc_set_entry(librados::IoCtx& io_ctx, const std::string& oid, const cls_rgw_lc_entry& entry);
- int cls_rgw_lc_get_entry(librados::IoCtx& io_ctx, const std::string& oid, const std::string& marker, cls_rgw_lc_entry& entry);
int cls_rgw_lc_list(librados::IoCtx& io_ctx, const std::string& oid,
-                   const std::string& marker, uint32_t max_entries,
-                     std::vector<cls_rgw_lc_entry>& entries);
- #endif
+ void cls_rgw_lc_get_head(librados::ObjectReadOperation& op, bufferlist& bl);
+ int cls_rgw_lc_get_head_decode(const bufferlist& bl, cls_rgw_lc_obj_head& head);
+ void cls_rgw_lc_put_head(librados::ObjectWriteOperation& op, const cls_rgw_lc_obj_head& head);
void cls_rgw_lc_get_next_entry(librados::ObjectReadOperation& op, const std::string& marker, bufferlist& bl);
+ int cls_rgw_lc_get_next_entry_decode(const bufferlist& bl, cls_rgw_lc_entry& entry);
void cls_rgw_lc_rm_entry(librados::ObjectWriteOperation& op, const cls_rgw_lc_entry& entry);
void cls_rgw_lc_set_entry(librados::ObjectWriteOperation& op, const cls_rgw_lc_entry& entry);
void cls_rgw_lc_get_entry(librados::ObjectReadOperation& op, const std::string& marker, bufferlist& bl);
+ int cls_rgw_lc_get_entry_decode(const bufferlist& bl, cls_rgw_lc_entry& entry);
void cls_rgw_lc_list(librados::ObjectReadOperation& op,
+                      const std::string& marker, uint32_t max_entries,
+                      bufferlist& bl);
+ int cls_rgw_lc_list_decode(const bufferlist& bl, std::vector<cls_rgw_lc_entry>& entries);
  
  /* multipart */
  void cls_rgw_mp_upload_part_info_update(librados::ObjectWriteOperation& op, const std::string& part_key, const RGWUploadPartInfo& info);
Simple merge
Simple merge