]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
rgw/notify: reservation_t takes optional_yield
authorCasey Bodley <cbodley@redhat.com>
Fri, 9 Dec 2022 17:48:23 +0000 (12:48 -0500)
committerCasey Bodley <cbodley@redhat.com>
Fri, 9 Dec 2022 18:06:11 +0000 (13:06 -0500)
allows callers to specify something other than s->yield

Signed-off-by: Casey Bodley <cbodley@redhat.com>
src/rgw/driver/rados/rgw_notify.cc
src/rgw/driver/rados/rgw_notify.h
src/rgw/driver/rados/rgw_sal_rados.h

index 253a3bc4035f9f72902bf2f31893fab26abbfe20..0ff4a13fba6a007830550a20e3171942231a2ccc 100644 (file)
@@ -970,7 +970,8 @@ reservation_t::reservation_t(const DoutPrefixProvider* _dpp,
                             const req_state* _s,
                             rgw::sal::Object* _object,
                             rgw::sal::Object* _src_object,
-                            const std::string* _object_name) :
+                            const std::string* _object_name,
+                            optional_yield y) :
   dpp(_s), store(_store), s(_s), size(0) /* XXX */,
   object(_object), src_object(_src_object), bucket(_s->bucket.get()),
   object_name(_object_name),
@@ -980,7 +981,7 @@ reservation_t::reservation_t(const DoutPrefixProvider* _dpp,
   user_id(_s->user->get_id().id),
   user_tenant(_s->user->get_id().tenant),
   req_id(_s->req_id),
-  yield(_s->yield)
+  yield(y)
 {}
 
 reservation_t::reservation_t(const DoutPrefixProvider* _dpp,
index 175dc11463d65c3192c145a61b62af53e17a518d..dd2d69c5fdb19d7292492891b9f6f8e60b936336 100644 (file)
@@ -76,7 +76,8 @@ struct reservation_t {
                const req_state* _s,
                rgw::sal::Object* _object,
                rgw::sal::Object* _src_object,
-               const std::string* _object_name);
+               const std::string* _object_name,
+               optional_yield y);
 
   /* ctor for non-request caller (e.g., lifecycle) */
   reservation_t(const DoutPrefixProvider* _dpp,
index 499e0994807612fd0b2b3e8c57128dc78ffafb44..58b662321fad73653bf4a6f955bb8e621b056823 100644 (file)
@@ -747,7 +747,7 @@ class RadosNotification : public StoreNotification {
 
   public:
     RadosNotification(const DoutPrefixProvider* _dpp, RadosStore* _store, Object* _obj, Object* _src_obj, req_state* _s, rgw::notify::EventType _type, const std::string* object_name=nullptr) :
-      StoreNotification(_obj, _src_obj, _type), store(_store), res(_dpp, _store, _s, _obj, _src_obj, object_name) { }
+      StoreNotification(_obj, _src_obj, _type), store(_store), res(_dpp, _store, _s, _obj, _src_obj, object_name, _s->yield) { }
 
     RadosNotification(const DoutPrefixProvider* _dpp, RadosStore* _store, Object* _obj, Object* _src_obj, rgw::notify::EventType _type, rgw::sal::Bucket* _bucket, std::string& _user_id, std::string& _user_tenant, std::string& _req_id, optional_yield y) :
       StoreNotification(_obj, _src_obj, _type), store(_store), res(_dpp, _store, _obj, _src_obj, _bucket, _user_id, _user_tenant, _req_id, y) {}