summaryrefslogtreecommitdiffstats
path: root/src/rgw/rgw_multi.cc
diff options
context:
space:
mode:
authorAli Maredia <amaredia@redhat.com>2020-12-11 22:19:39 +0100
committerAli Maredia <amaredia@redhat.com>2021-01-27 18:04:24 +0100
commitdf236920b8f0b20327cc997a6190d88f3e919029 (patch)
tree26a6687d225f2b64f55f790b1628a8e2db7a4ae9 /src/rgw/rgw_multi.cc
parentMerge pull request #39086 from orozery/qa-rbd-delete-passphrase-file (diff)
downloadceph-df236920b8f0b20327cc997a6190d88f3e919029.tar.xz
ceph-df236920b8f0b20327cc997a6190d88f3e919029.zip
rgw: Add DoutPrefixProvider to create_bucket logging
This commit hits all log messages for a create bucket request and ensures each has a DoutPrefixProvider. This commit gets dpp's all the way down to rgw/services up way though to rgw_op.cc, rgw_rest.cc files, rgw_admin.cc, etc. This commit also removes store as dpp in rgw_sal.h Signed-off-by: Ali Maredia <amaredia@redhat.com>
Diffstat (limited to 'src/rgw/rgw_multi.cc')
-rw-r--r--src/rgw/rgw_multi.cc21
1 files changed, 12 insertions, 9 deletions
diff --git a/src/rgw/rgw_multi.cc b/src/rgw/rgw_multi.cc
index 79284591b40..0bbf9ae4e90 100644
--- a/src/rgw/rgw_multi.cc
+++ b/src/rgw/rgw_multi.cc
@@ -200,7 +200,8 @@ int list_multipart_parts(rgw::sal::RGWRadosStore *store, struct req_state *s,
next_marker, truncated, assume_unsorted);
}
-int abort_multipart_upload(rgw::sal::RGWRadosStore *store, CephContext *cct,
+int abort_multipart_upload(const DoutPrefixProvider *dpp,
+ rgw::sal::RGWRadosStore *store, CephContext *cct,
RGWObjectCtx *obj_ctx, RGWBucketInfo& bucket_info,
RGWMPObj& mp_obj)
{
@@ -235,7 +236,7 @@ int abort_multipart_upload(rgw::sal::RGWRadosStore *store, CephContext *cct,
string oid = mp_obj.get_part(obj_iter->second.num);
obj.init_ns(bucket_info.bucket, oid, RGW_OBJ_NS_MULTIPART);
obj.index_hash_source = mp_obj.get_key();
- ret = store->getRados()->delete_obj(*obj_ctx, bucket_info, obj, 0);
+ ret = store->getRados()->delete_obj(dpp, *obj_ctx, bucket_info, obj, 0);
if (ret < 0 && ret != -ENOENT)
return ret;
} else {
@@ -278,7 +279,7 @@ int abort_multipart_upload(rgw::sal::RGWRadosStore *store, CephContext *cct,
del_op.params.parts_accounted_size = parts_accounted_size;
// and also remove the metadata obj
- ret = del_op.delete_obj(null_yield);
+ ret = del_op.delete_obj(null_yield, dpp);
if (ret < 0) {
ldout(cct, 20) << __func__ << ": del_op.delete_obj returned " <<
ret << dendl;
@@ -286,7 +287,8 @@ int abort_multipart_upload(rgw::sal::RGWRadosStore *store, CephContext *cct,
return (ret == -ENOENT) ? -ERR_NO_SUCH_UPLOAD : ret;
}
-int list_bucket_multiparts(rgw::sal::RGWRadosStore *store, RGWBucketInfo& bucket_info,
+int list_bucket_multiparts(const DoutPrefixProvider *dpp,
+ rgw::sal::RGWRadosStore *store, RGWBucketInfo& bucket_info,
const string& prefix, const string& marker,
const string& delim,
const int& max_uploads,
@@ -303,11 +305,12 @@ int list_bucket_multiparts(rgw::sal::RGWRadosStore *store, RGWBucketInfo& bucket
list_op.params.ns = RGW_OBJ_NS_MULTIPART;
list_op.params.filter = &mp_filter;
- return(list_op.list_objects(max_uploads, objs, common_prefixes, is_truncated, null_yield));
+ return(list_op.list_objects(dpp, max_uploads, objs, common_prefixes, is_truncated, null_yield));
}
-int abort_bucket_multiparts(rgw::sal::RGWRadosStore *store, CephContext *cct, RGWBucketInfo& bucket_info,
- string& prefix, string& delim)
+int abort_bucket_multiparts(const DoutPrefixProvider *dpp,
+ rgw::sal::RGWRadosStore *store, CephContext *cct,
+ RGWBucketInfo& bucket_info, string& prefix, string& delim)
{
constexpr int max = 1000;
int ret, num_deleted = 0;
@@ -317,7 +320,7 @@ int abort_bucket_multiparts(rgw::sal::RGWRadosStore *store, CephContext *cct, RG
bool is_truncated;
do {
- ret = list_bucket_multiparts(store, bucket_info, prefix, marker, delim,
+ ret = list_bucket_multiparts(dpp, store, bucket_info, prefix, marker, delim,
max, &objs, nullptr, &is_truncated);
if (ret < 0) {
ldout(store->ctx(), 0) << __func__ <<
@@ -337,7 +340,7 @@ int abort_bucket_multiparts(rgw::sal::RGWRadosStore *store, CephContext *cct, RG
rgw_obj_key key(obj.key);
if (!mp.from_meta(key.name))
continue;
- ret = abort_multipart_upload(store, cct, &obj_ctx, bucket_info, mp);
+ ret = abort_multipart_upload(dpp, store, cct, &obj_ctx, bucket_info, mp);
if (ret < 0) {
// we're doing a best-effort; if something cannot be found,
// log it and keep moving forward