From: taoCH Date: Fri, 21 Dec 2018 08:26:41 +0000 (+0800) Subject: rgw_file: allocate new id for continued request X-Git-Tag: v15.1.0~2594^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=e2cdb04ba6202a7e45299427f3cbc654853bbd7f;p=ceph.git rgw_file: allocate new id for continued request Fixed: http://tracker.ceph.com/issues/37734 Signed-off-by: Tao Chen --- diff --git a/src/rgw/rgw_file.h b/src/rgw/rgw_file.h index 2da5187deb2b..bbf7d3e2f7ac 100644 --- a/src/rgw/rgw_file.h +++ b/src/rgw/rgw_file.h @@ -2365,7 +2365,8 @@ public: RGWWriteRequest(CephContext* _cct, RGWUserInfo *_user, RGWFileHandle* _fh, const std::string& _bname, const std::string& _oname) - : RGWLibContinuedReq(_cct, _user), bucket_name(_bname), obj_name(_oname), + : RGWLibContinuedReq(_cct, _user, rgwlib.get_store()->get_new_req_id()), + bucket_name(_bname), obj_name(_oname), rgw_fh(_fh), filter(nullptr), real_ofs(0), bytes_written(0), eio(false) { diff --git a/src/rgw/rgw_lib.h b/src/rgw/rgw_lib.h index 357133b0a6af..962e84cbc4c7 100644 --- a/src/rgw/rgw_lib.h +++ b/src/rgw/rgw_lib.h @@ -134,8 +134,8 @@ namespace rgw { /* unambiguiously return req_state */ inline struct req_state* get_state() { return this->RGWRequest::s; } - RGWLibRequest(CephContext* _cct, RGWUserInfo* _user) - : RGWRequest(0), cct(_cct), user(_user) + RGWLibRequest(CephContext* _cct, RGWUserInfo* _user, uint64_t id = 0) + : RGWRequest(id), cct(_cct), user(_user) {} RGWUserInfo* get_user() { return user; } @@ -189,8 +189,8 @@ namespace rgw { RGWObjectCtx rados_ctx; public: - RGWLibContinuedReq(CephContext* _cct, RGWUserInfo* _user) - : RGWLibRequest(_cct, _user), io_ctx(), + RGWLibContinuedReq(CephContext* _cct, RGWUserInfo* _user, uint64_t id = 0) + : RGWLibRequest(_cct, _user, id), io_ctx(), rstate(_cct, &io_ctx.get_env(), _user, id), rados_ctx(rgwlib.get_store(), &rstate) {