diff options
Diffstat (limited to 'src/rgw/driver/rados/rgw_service.cc')
-rw-r--r-- | src/rgw/driver/rados/rgw_service.cc | 40 |
1 files changed, 21 insertions, 19 deletions
diff --git a/src/rgw/driver/rados/rgw_service.cc b/src/rgw/driver/rados/rgw_service.cc index 5b78472dfe3..4be0738bae2 100644 --- a/src/rgw/driver/rados/rgw_service.cc +++ b/src/rgw/driver/rados/rgw_service.cc @@ -34,6 +34,7 @@ #include "rgw_datalog.h" #include "rgw_metadata.h" #include "rgw_otp.h" +#include "rgw_sal_rados.h" #include "rgw_user.h" #include "rgw_role.h" @@ -48,10 +49,10 @@ RGWServices_Def::~RGWServices_Def() } int RGWServices_Def::init(CephContext *cct, + rgw::sal::RadosStore* driver, bool have_cache, bool raw, bool run_sync, - librados::Rados* rados, optional_yield y, const DoutPrefixProvider *dpp) { @@ -88,7 +89,8 @@ int RGWServices_Def::init(CephContext *cct, async_processor->start(); finisher->init(); - bi_rados->init(zone.get(), rados, bilog_rados.get(), datalog_rados.get()); + bi_rados->init(zone.get(), driver->getRados()->get_rados_handle(), + bilog_rados.get(), datalog_rados.get()); bilog_rados->init(bi_rados.get()); bucket_sobj->init(zone.get(), sysobj.get(), sysobj_cache.get(), bi_rados.get(), meta.get(), meta_be_sobj.get(), @@ -97,27 +99,29 @@ int RGWServices_Def::init(CephContext *cct, sysobj.get(), sysobj_cache.get(), bucket_sobj.get()); - cls->init(zone.get(), rados); - config_key_rados->init(rados); - mdlog->init(rados, zone.get(), sysobj.get(), cls.get(), - async_processor.get()); + cls->init(zone.get(), driver->getRados()->get_rados_handle()); + config_key_rados->init(driver->getRados()->get_rados_handle()); + mdlog->init(driver->getRados()->get_rados_handle(), zone.get(), sysobj.get(), + cls.get(), async_processor.get()); meta->init(sysobj.get(), mdlog.get(), meta_bes); meta_be_sobj->init(sysobj.get(), mdlog.get()); meta_be_otp->init(sysobj.get(), mdlog.get(), cls.get()); - notify->init(zone.get(), rados, finisher.get()); + notify->init(zone.get(), driver->getRados()->get_rados_handle(), + finisher.get()); otp->init(zone.get(), meta.get(), meta_be_otp.get()); - zone->init(sysobj.get(), rados, sync_modules.get(), bucket_sync_sobj.get()); - zone_utils->init(rados, zone.get()); + zone->init(sysobj.get(), driver->getRados()->get_rados_handle(), + sync_modules.get(), bucket_sync_sobj.get()); + zone_utils->init(driver->getRados()->get_rados_handle(), zone.get()); quota->init(zone.get()); sync_modules->init(zone.get()); - sysobj_core->core_init(rados, zone.get()); + sysobj_core->core_init(driver->getRados()->get_rados_handle(), zone.get()); if (have_cache) { - sysobj_cache->init(rados, zone.get(), notify.get()); - sysobj->init(rados, sysobj_cache.get()); + sysobj_cache->init(driver->getRados()->get_rados_handle(), zone.get(), notify.get()); + sysobj->init(driver->getRados()->get_rados_handle(), sysobj_cache.get()); } else { - sysobj->init(rados, sysobj_core.get()); + sysobj->init(driver->getRados()->get_rados_handle(), sysobj_core.get()); } - user_rados->init(rados, zone.get(), sysobj.get(), sysobj_cache.get(), + user_rados->init(driver->getRados()->get_rados_handle(), zone.get(), sysobj.get(), sysobj_cache.get(), meta.get(), meta_be_sobj.get(), sync_modules.get()); role_rados->init(zone.get(), meta.get(), meta_be_sobj.get(), sysobj.get()); @@ -146,7 +150,7 @@ int RGWServices_Def::init(CephContext *cct, r = datalog_rados->start(dpp, &zone->get_zone(), zone->get_zone_params(), - rados); + driver->getRados()->get_rados_handle()); if (r < 0) { ldpp_dout(dpp, 0) << "ERROR: failed to start datalog_rados service (" << cpp_strerror(-r) << dendl; return r; @@ -301,13 +305,11 @@ void RGWServices_Def::shutdown() has_shutdown = true; } -int RGWServices::do_init(CephContext *_cct, bool have_cache, bool raw, - bool run_sync, librados::Rados* rados, - optional_yield y, const DoutPrefixProvider *dpp) +int RGWServices::do_init(CephContext *_cct, rgw::sal::RadosStore* driver, bool have_cache, bool raw, bool run_sync, optional_yield y, const DoutPrefixProvider *dpp) { cct = _cct; - int r = _svc.init(cct, have_cache, raw, run_sync, rados, y, dpp); + int r = _svc.init(cct, driver, have_cache, raw, run_sync, y, dpp); if (r < 0) { return r; } |