]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.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)
committerCory Snyder <csnyder@1111systems.com>
Fri, 24 Feb 2023 09:09:29 +0000 (04:09 -0500)
allows callers to specify something other than s->yield

Signed-off-by: Casey Bodley <cbodley@redhat.com>
(cherry picked from commit 473d7e446d0c5f86974f279f8bca5815265adf49)

Conflicts:
src/rgw/rgw_notify.cc
src/rgw/rgw_sal_rados.h

Cherry-pick notes:
- Conflicts due to rename of Notification to StoreNotification
- Conflicts due to obj_ctx initialization change in rgw_notify.cc

src/rgw/rgw_notify.cc
src/rgw/rgw_notify.h
src/rgw/rgw_sal_rados.h

index 57c028479b4b7383f5858cd172371f31776aec34..cc4367feafc58de3742437c95835f324682383fd 100644 (file)
@@ -965,7 +965,8 @@ reservation_t::reservation_t(const DoutPrefixProvider* _dpp,
                             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 */, obj_ctx(_s->obj_ctx),
   object(_object), src_object(_src_object), bucket(_s->bucket.get()),
   object_name(_object_name),
@@ -974,7 +975,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 44e16f751efbf69a294fd513574c17e98870cb93..94d4b52ecd270a5815de877dfa1ef88642de3f37 100644 (file)
@@ -76,7 +76,8 @@ struct reservation_t {
                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 4e4673c032806dce1026a9e29af5287defe541e5..3c97e18016bcbef1cb991b33196dccad44d50701 100644 (file)
@@ -624,7 +624,7 @@ class RadosNotification : public Notification {
 
   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) :
-      Notification(_obj, _src_obj, _type), store(_store), res(_dpp, _store, _s, _obj, _src_obj, object_name) { }
+      Notification(_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, RGWObjectCtx* rctx, rgw::notify::EventType _type, rgw::sal::Bucket* _bucket, std::string& _user_id, std::string& _user_tenant, std::string& _req_id, optional_yield y) :
       Notification(_obj, _src_obj, _type), store(_store), res(_dpp, _store, rctx, _obj, _src_obj, _bucket, _user_id, _user_tenant, _req_id, y) {}