Skip to content

Commit

Permalink
rgw: fix the build failure
Browse files Browse the repository at this point in the history
* s/bucket_name_str/bucket_name/
* the member variable name of `req_state` was changed to `bucket_name`
  in f7ca00a. but some commits was still using the old name before the
  commit got merged.
* fixes for the tenant related change
* also fixes a typo

Signed-off-by: Kefu Chai <kchai@redhat.com>
  • Loading branch information
tchaikov committed Dec 15, 2015
1 parent f1c02a3 commit a57784f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
12 changes: 7 additions & 5 deletions src/rgw/rgw_op.cc
Expand Up @@ -1020,7 +1020,8 @@ int RGWGetObj::handle_slo_manifest(bufferlist& bl)
RGWBucketInfo bucket_info;
map<string, bufferlist> bucket_attrs;
RGWObjectCtx obj_ctx(store);
int r = store->get_bucket_info(obj_ctx, bucket_name, bucket_info, NULL, &bucket_attrs);
int r = store->get_bucket_info(obj_ctx, s->user.user_id.tenant,
bucket_name, bucket_info, NULL, &bucket_attrs);
if (r < 0) {
ldout(s->cct, 0) << "could not get bucket info for bucket=" << bucket_name << dendl;
return r;
Expand Down Expand Up @@ -2729,9 +2730,9 @@ int RGWDeleteObj::handle_slo_manifest(bufferlist& bl)
items.push_back(path);
}

/* Request removal of the manifet object itself. */
/* Request removal of the manifest object itself. */
RGWBulkDelete::acct_path_t path;
path.bucket_name = s->bucket_name_str;
path.bucket_name = s->bucket_name;
path.obj_key = s->object;
items.push_back(path);

Expand Down Expand Up @@ -4125,7 +4126,8 @@ bool RGWBulkDelete::Deleter::delete_single(const acct_path_t& path)

RGWBucketInfo binfo;
map<string, bufferlist> battrs;
ret = store->get_bucket_info(obj_ctx, path.bucket_name, binfo, NULL, &battrs);
ret = store->get_bucket_info(obj_ctx, s->user.user_id.tenant,
path.bucket_name, binfo, NULL, &battrs);
if (ret < 0) {
goto binfo_fail;
}
Expand Down Expand Up @@ -4162,7 +4164,7 @@ bool RGWBulkDelete::Deleter::delete_single(const acct_path_t& path)

ret = store->delete_bucket(binfo.bucket, ot);
if (0 == ret) {
ret = rgw_unlink_bucket(store, binfo.owner, binfo.bucket.name, false);
ret = rgw_unlink_bucket(store, binfo.owner, binfo.bucket.tenant, binfo.bucket.name, false);
if (ret < 0) {
ldout(s->cct, 0) << "WARNING: failed to unlink bucket: ret=" << ret << dendl;
}
Expand Down
2 changes: 1 addition & 1 deletion src/rgw/rgw_rest_swift.cc
Expand Up @@ -819,7 +819,7 @@ void RGWDeleteObj_ObjStore_SWIFT::send_response()
bulkdelete_respond(0, 1, {}, s->prot_flags, *s->formatter);
} else {
RGWBulkDelete::acct_path_t path;
path.bucket_name = s->bucket_name_str;
path.bucket_name = s->bucket_name;
path.obj_key = s->object;

RGWBulkDelete::fail_desc_t fail_desc;
Expand Down

0 comments on commit a57784f

Please sign in to comment.