From 473d7e446d0c5f86974f279f8bca5815265adf49 Mon Sep 17 00:00:00 2001 From: Casey Bodley Date: Fri, 9 Dec 2022 12:48:23 -0500 Subject: [PATCH] rgw/notify: reservation_t takes optional_yield allows callers to specify something other than s->yield Signed-off-by: Casey Bodley --- src/rgw/driver/rados/rgw_notify.cc | 5 +++-- src/rgw/driver/rados/rgw_notify.h | 3 ++- src/rgw/driver/rados/rgw_sal_rados.h | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/rgw/driver/rados/rgw_notify.cc b/src/rgw/driver/rados/rgw_notify.cc index 253a3bc4035..0ff4a13fba6 100644 --- a/src/rgw/driver/rados/rgw_notify.cc +++ b/src/rgw/driver/rados/rgw_notify.cc @@ -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, diff --git a/src/rgw/driver/rados/rgw_notify.h b/src/rgw/driver/rados/rgw_notify.h index 175dc11463d..dd2d69c5fdb 100644 --- a/src/rgw/driver/rados/rgw_notify.h +++ b/src/rgw/driver/rados/rgw_notify.h @@ -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, diff --git a/src/rgw/driver/rados/rgw_sal_rados.h b/src/rgw/driver/rados/rgw_sal_rados.h index 499e0994807..58b662321fa 100644 --- a/src/rgw/driver/rados/rgw_sal_rados.h +++ b/src/rgw/driver/rados/rgw_sal_rados.h @@ -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) {} -- 2.39.5