]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: migrate to using non-deprecated class call functions
authorAlex Ainscow <aainscow@uk.ibm.com>
Mon, 24 Nov 2025 21:08:08 +0000 (21:08 +0000)
committerAlex Ainscow <aainscow@uk.ibm.com>
Mon, 13 Apr 2026 09:38:25 +0000 (10:38 +0100)
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 <aainscow@uk.ibm.com>
src/rgw/driver/rados/buckets.cc
src/rgw/driver/rados/rgw_cr_rados.cc

index c22f9b30e7a99ed7b509f73ccd59ee4fa7a7d2e9..ad1ae5a9561c29cf03b00365bdeee130b51e09dc 100644 (file)
@@ -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;
index fe44103a649dc4f7897b00da0f2ad3f088ff86c8..e23a142c2fb9006eba28296b138643ae20831c6a 100644 (file)
@@ -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);