summaryrefslogtreecommitdiffstats
path: root/src/rgw/rgw_cr_rados.h
diff options
context:
space:
mode:
authorCasey Bodley <cbodley@redhat.com>2019-02-28 23:02:17 +0100
committerCasey Bodley <cbodley@redhat.com>2019-03-01 18:54:21 +0100
commit5fcb59060bb03c532e0cf03b32352b046c3f9543 (patch)
tree0a11a05219d90f95007e07c96f0518f268c678f1 /src/rgw/rgw_cr_rados.h
parentrgw: add sync perf counters to each RGWDataSyncProcessorThread (diff)
downloadceph-5fcb59060bb03c532e0cf03b32352b046c3f9543.tar.xz
ceph-5fcb59060bb03c532e0cf03b32352b046c3f9543.zip
rgw: add perf counters to fetch_remote_obj()
Signed-off-by: Casey Bodley <cbodley@redhat.com>
Diffstat (limited to 'src/rgw/rgw_cr_rados.h')
-rw-r--r--src/rgw/rgw_cr_rados.h44
1 files changed, 26 insertions, 18 deletions
diff --git a/src/rgw/rgw_cr_rados.h b/src/rgw/rgw_cr_rados.h
index 4480c5e8e05..e919217cbaa 100644
--- a/src/rgw/rgw_cr_rados.h
+++ b/src/rgw/rgw_cr_rados.h
@@ -861,6 +861,7 @@ class RGWAsyncFetchRemoteObj : public RGWAsyncRadosRequest {
bool copy_if_newer;
rgw_zone_set zones_trace;
+ PerfCounters* counters;
protected:
int _send_request() override;
@@ -872,14 +873,16 @@ public:
const rgw_obj_key& _key,
const std::optional<rgw_obj_key>& _dest_key,
std::optional<uint64_t> _versioned_epoch,
- bool _if_newer, rgw_zone_set *_zones_trace) : RGWAsyncRadosRequest(caller, cn), store(_store),
- source_zone(_source_zone),
- bucket_info(_bucket_info),
- dest_placement_rule(_dest_placement_rule),
- key(_key),
- dest_key(_dest_key),
- versioned_epoch(_versioned_epoch),
- copy_if_newer(_if_newer)
+ bool _if_newer, rgw_zone_set *_zones_trace,
+ PerfCounters* counters)
+ : RGWAsyncRadosRequest(caller, cn), store(_store),
+ source_zone(_source_zone),
+ bucket_info(_bucket_info),
+ dest_placement_rule(_dest_placement_rule),
+ key(_key),
+ dest_key(_dest_key),
+ versioned_epoch(_versioned_epoch),
+ copy_if_newer(_if_newer), counters(counters)
{
if (_zones_trace) {
zones_trace = *_zones_trace;
@@ -906,6 +909,7 @@ class RGWFetchRemoteObjCR : public RGWSimpleCoroutine {
RGWAsyncFetchRemoteObj *req;
rgw_zone_set *zones_trace;
+ PerfCounters* counters;
public:
RGWFetchRemoteObjCR(RGWAsyncRadosProcessor *_async_rados, RGWRados *_store,
@@ -915,15 +919,18 @@ public:
const rgw_obj_key& _key,
const std::optional<rgw_obj_key>& _dest_key,
std::optional<uint64_t> _versioned_epoch,
- bool _if_newer, rgw_zone_set *_zones_trace) : RGWSimpleCoroutine(_store->ctx()), cct(_store->ctx()),
- async_rados(_async_rados), store(_store),
- source_zone(_source_zone),
- bucket_info(_bucket_info),
- dest_placement_rule(_dest_placement_rule),
- key(_key),
- dest_key(_dest_key),
- versioned_epoch(_versioned_epoch),
- copy_if_newer(_if_newer), req(NULL), zones_trace(_zones_trace) {}
+ bool _if_newer, rgw_zone_set *_zones_trace,
+ PerfCounters* counters)
+ : RGWSimpleCoroutine(_store->ctx()), cct(_store->ctx()),
+ async_rados(_async_rados), store(_store),
+ source_zone(_source_zone),
+ bucket_info(_bucket_info),
+ dest_placement_rule(_dest_placement_rule),
+ key(_key),
+ dest_key(_dest_key),
+ versioned_epoch(_versioned_epoch),
+ copy_if_newer(_if_newer), req(NULL),
+ zones_trace(_zones_trace), counters(counters) {}
~RGWFetchRemoteObjCR() override {
@@ -940,7 +947,8 @@ public:
int send_request() override {
req = new RGWAsyncFetchRemoteObj(this, stack->create_completion_notifier(), store,
source_zone, bucket_info, dest_placement_rule,
- key, dest_key, versioned_epoch, copy_if_newer, zones_trace);
+ key, dest_key, versioned_epoch, copy_if_newer,
+ zones_trace, counters);
async_rados->queue(req);
return 0;
}