Skip to content

Commit

Permalink
Merge pull request ceph#28108 from linuxbox2/wip-rgwfile-reqid
Browse files Browse the repository at this point in the history
Wip rgwfile reqid:  absorbs rgw_file: allocate new id for continued request ceph#25664
  • Loading branch information
mattbenjamin authored May 31, 2019
2 parents 4c5e926 + 5135634 commit 955c832
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
3 changes: 1 addition & 2 deletions src/rgw/librgw.cc
Original file line number Diff line number Diff line change
Expand Up @@ -226,8 +226,7 @@ namespace rgw {
rgw_env.set("HTTP_HOST", "");

/* XXX and -then- bloat up req_state with string copies from it */
const uint64_t reqid = store->get_new_req_id();
struct req_state rstate(req->cct, &rgw_env, req->get_user(), reqid);
struct req_state rstate(req->cct, &rgw_env, req->get_user(), req->id);
struct req_state *s = &rstate;

// XXX fix this
Expand Down
3 changes: 2 additions & 1 deletion src/rgw/rgw_file.h
Original file line number Diff line number Diff line change
Expand Up @@ -2365,7 +2365,8 @@ class RGWWriteRequest : public RGWLibContinuedReq,

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),
bucket_name(_bname), obj_name(_oname),
rgw_fh(_fh), filter(nullptr), real_ofs(0),
bytes_written(0), eio(false) {

Expand Down
3 changes: 2 additions & 1 deletion src/rgw/rgw_lib.h
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,8 @@ namespace rgw {
inline struct req_state* get_state() { return this->RGWRequest::s; }

RGWLibRequest(CephContext* _cct, RGWUserInfo* _user)
: RGWRequest(0), cct(_cct), user(_user)
: RGWRequest(rgwlib.get_store()->get_new_req_id()), cct(_cct),
user(_user)
{}

RGWUserInfo* get_user() { return user; }
Expand Down

0 comments on commit 955c832

Please sign in to comment.