From: Casey Bodley Date: Fri, 9 Dec 2022 17:48:23 +0000 (-0500) Subject: rgw/notify: reservation_t takes optional_yield X-Git-Tag: v17.2.7~391^2~3 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=24a0cbe0fff9274919d3cf05c766e58864b6add0;p=ceph.git rgw/notify: reservation_t takes optional_yield allows callers to specify something other than s->yield Signed-off-by: Casey Bodley (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 --- diff --git a/src/rgw/rgw_notify.cc b/src/rgw/rgw_notify.cc index 57c028479b4b..cc4367feafc5 100644 --- a/src/rgw/rgw_notify.cc +++ b/src/rgw/rgw_notify.cc @@ -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, diff --git a/src/rgw/rgw_notify.h b/src/rgw/rgw_notify.h index 44e16f751efb..94d4b52ecd27 100644 --- a/src/rgw/rgw_notify.h +++ b/src/rgw/rgw_notify.h @@ -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, diff --git a/src/rgw/rgw_sal_rados.h b/src/rgw/rgw_sal_rados.h index 4e4673c03280..3c97e18016bc 100644 --- a/src/rgw/rgw_sal_rados.h +++ b/src/rgw/rgw_sal_rados.h @@ -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) {}