From: Alex Ainscow Date: Mon, 24 Nov 2025 21:08:08 +0000 (+0000) Subject: rgw: migrate to using non-deprecated class call functions X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=4c295ad3a65e16bbe4d754eee26e98eb5da7d0e2;p=ceph.git rgw: migrate to using non-deprecated class call functions Update the Rados Gateway driver to utilize the new trait-based class method interface. This replaces legacy string-based exec() calls with the typesafe template-based alternatives. Key Changes: Updated reset_stats in buckets.cc to use cls::user::method::reset_user_stats2. Updated RGWRadosBILogTrimCR in rgw_cr_rados.cc to use cls::rgw::method::bi_log_trim. This change ensures that RGW operations are correctly categorized as reads or writes at compile-time, aligning with the broader effort to improve RADOS class method safety and OSD routing efficiency. Signed-off-by: Alex Ainscow --- diff --git a/src/rgw/driver/rados/buckets.cc b/src/rgw/driver/rados/buckets.cc index c22f9b30e7a9..ad1ae5a9561c 100644 --- a/src/rgw/driver/rados/buckets.cc +++ b/src/rgw/driver/rados/buckets.cc @@ -242,7 +242,7 @@ int reset_stats(const DoutPrefixProvider* dpp, optional_yield y, ret.update_call(call); encode(call, in); - op.exec("user", "reset_user_stats2", in, &out, &rval); + op.exec(cls::user::method::reset_user_stats2, in, &out, &rval); r = ref.operate(dpp, std::move(op), y, librados::OPERATION_RETURNVEC); if (r < 0) { return r; diff --git a/src/rgw/driver/rados/rgw_cr_rados.cc b/src/rgw/driver/rados/rgw_cr_rados.cc index fe44103a649d..e23a142c2fb9 100644 --- a/src/rgw/driver/rados/rgw_cr_rados.cc +++ b/src/rgw/driver/rados/rgw_cr_rados.cc @@ -722,7 +722,7 @@ int RGWRadosBILogTrimCR::send_request(const DoutPrefixProvider *dpp) librados::ObjectWriteOperation op; op.assert_exists(); - op.exec(RGW_CLASS, RGW_BI_LOG_TRIM, in); + op.exec(cls::rgw::method::bi_log_trim, in); cn = stack->create_completion_notifier(); return bs.bucket_obj.aio_operate(cn->completion(), &op);