From: Casey Bodley Date: Wed, 14 Aug 2024 17:47:54 +0000 (-0400) Subject: Merge pull request #58448 from cbodley/wip-rgw-lc-async X-Git-Tag: v20.0.0~1268 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=52d63b5f3b229e526feb276eea04a595e2ae7247;p=ceph.git Merge pull request #58448 from cbodley/wip-rgw-lc-async cls/rgw: define lc ops in terms of ObjectOperation instead of IoCtx Reviewed-by: Matt Benjamin --- 52d63b5f3b229e526feb276eea04a595e2ae7247 diff --cc src/cls/rgw/cls_rgw_client.h index b708d5b51b3d,ab2f4c9ca851..909e319482a7 --- a/src/cls/rgw/cls_rgw_client.h +++ b/src/cls/rgw/cls_rgw_client.h @@@ -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& 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& 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& 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& 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& entries); /* multipart */ void cls_rgw_mp_upload_part_info_update(librados::ObjectWriteOperation& op, const std::string& part_key, const RGWUploadPartInfo& info);