X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=ceph%2Fsrc%2Frgw%2Frgw_lib.h;h=0c5e9e721685f42755c9dfcc3bb70f386ce0914f;hb=20effc670b57271cb089376d6d0800990e5218d5;hp=9f43593fc720c26d6e18d2689ec2cc079384a001;hpb=b3b6e05ebb17ef6ac03c6f6f46d242185719a08e;p=ceph.git diff --git a/ceph/src/rgw/rgw_lib.h b/ceph/src/rgw/rgw_lib.h index 9f43593fc..0c5e9e721 100644 --- a/ceph/src/rgw/rgw_lib.h +++ b/ceph/src/rgw/rgw_lib.h @@ -20,7 +20,7 @@ #define dout_subsys ceph_subsys_rgw -class OpsLogSocket; +class OpsLogSink; namespace rgw { @@ -29,10 +29,10 @@ namespace rgw { class RGWLib : public DoutPrefixProvider { RGWFrontendConfig* fec; RGWLibFrontend* fe; - OpsLogSocket* olog; + OpsLogSink* olog; rgw::LDAPHelper* ldh{nullptr}; RGWREST rest; // XXX needed for RGWProcessEnv - rgw::sal::RGWRadosStore* store; + rgw::sal::Store* store; boost::intrusive_ptr cct; public: @@ -40,7 +40,7 @@ namespace rgw { {} ~RGWLib() {} - rgw::sal::RGWRadosStore* get_store() { return store; } + rgw::sal::Store* get_store() { return store; } RGWLibFrontend* get_fe() { return fe; } @@ -51,7 +51,7 @@ namespace rgw { std::ostream& gen_prefix(std::ostream& out) const { return out << "lib rgw: "; } int init(); - int init(vector& args); + int init(std::vector& args); int stop(); }; @@ -80,7 +80,7 @@ namespace rgw { return user_info; } - int set_uid(rgw::sal::RGWRadosStore* store, const rgw_user& uid); + int set_uid(rgw::sal::Store* store, const rgw_user& uid); int write_data(const char *buf, int len); int read_data(char *buf, int len); @@ -127,23 +127,22 @@ namespace rgw { RGWHandler_Lib() {} ~RGWHandler_Lib() override {} - static int init_from_header(rgw::sal::RGWRadosStore *store, + static int init_from_header(rgw::sal::Store* store, struct req_state *s); }; /* RGWHandler_Lib */ class RGWLibRequest : public RGWRequest, public RGWHandler_Lib { private: - std::unique_ptr tuser; // Don't use this. It's empty except during init. + std::unique_ptr tuser; // Don't use this. It's empty except during init. public: CephContext* cct; - boost::optional sysobj_ctx; /* unambiguiously return req_state */ inline struct req_state* get_state() { return this->RGWRequest::s; } - RGWLibRequest(CephContext* _cct, std::unique_ptr _user) - : RGWRequest(rgwlib.get_store()->getRados()->get_new_req_id()), + RGWLibRequest(CephContext* _cct, std::unique_ptr _user) + : RGWRequest(rgwlib.get_store()->get_new_req_id()), tuser(std::move(_user)), cct(_cct) {} @@ -167,12 +166,9 @@ namespace rgw { RGWRequest::init_state(_s); RGWHandler::init(rados_ctx->get_store(), _s, io); - sysobj_ctx.emplace(store->svc()->sysobj); - get_state()->obj_ctx = rados_ctx; - get_state()->sysobj_ctx = &(sysobj_ctx.get()); - get_state()->req_id = store->svc()->zone_utils->unique_id(id); - get_state()->trans_id = store->svc()->zone_utils->unique_trans_id(id); + get_state()->req_id = store->zone_unique_id(id); + get_state()->trans_id = store->zone_unique_trans_id(id); get_state()->bucket_tenant = tuser->get_tenant(); get_state()->set_user(tuser); @@ -199,7 +195,7 @@ namespace rgw { public: RGWLibContinuedReq(CephContext* _cct, - std::unique_ptr _user) + std::unique_ptr _user) : RGWLibRequest(_cct, std::move(_user)), io_ctx(), rstate(_cct, &io_ctx.get_env(), id), rados_ctx(rgwlib.get_store(), &rstate) @@ -209,19 +205,15 @@ namespace rgw { RGWRequest::init_state(&rstate); RGWHandler::init(rados_ctx.get_store(), &rstate, &io_ctx); - sysobj_ctx.emplace(store->svc()->sysobj); - - get_state()->cio = &io_ctx; get_state()->obj_ctx = &rados_ctx; - get_state()->sysobj_ctx = &(sysobj_ctx.get()); - get_state()->req_id = store->svc()->zone_utils->unique_id(id); - get_state()->trans_id = store->svc()->zone_utils->unique_trans_id(id); + get_state()->req_id = store->zone_unique_id(id); + get_state()->trans_id = store->zone_unique_trans_id(id); ldpp_dout(get_state(), 2) << "initializing for trans_id = " << get_state()->trans_id.c_str() << dendl; } - inline rgw::sal::RGWRadosStore* get_store() { return store; } + inline rgw::sal::Store* get_store() { return store; } inline RGWLibIO& get_io() { return io_ctx; } inline RGWObjectCtx& get_octx() { return rados_ctx; }