summaryrefslogtreecommitdiffstats
path: root/src/rgw/rgw_cr_rados.h
diff options
context:
space:
mode:
authorYehuda Sadeh <yehuda@redhat.com>2019-11-19 19:59:59 +0100
committerYehuda Sadeh <yehuda@redhat.com>2020-01-28 19:20:39 +0100
commitda6e8632fa4089308834b9b87e07d2236da5f1a2 (patch)
tree3fa5be4a8611e555978d69f8e0e2b1c7c7c213b3 /src/rgw/rgw_cr_rados.h
parentrgw: find pipe rules param for specific obj changes (diff)
downloadceph-da6e8632fa4089308834b9b87e07d2236da5f1a2.tar.xz
ceph-da6e8632fa4089308834b9b87e07d2236da5f1a2.zip
rgw: filter fetch remote obj after reading remote metadata
In the sync case: find the appropriate pipe params that match this remote object (if matches tags / prefix), and adjust fetch if needed -- abort if doesn't match tags. Later will adjust acls as needed (if user sync and not system). Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
Diffstat (limited to 'src/rgw/rgw_cr_rados.h')
-rw-r--r--src/rgw/rgw_cr_rados.h21
1 files changed, 16 insertions, 5 deletions
diff --git a/src/rgw/rgw_cr_rados.h b/src/rgw/rgw_cr_rados.h
index 5b689e6d493..f5c8f67b2b8 100644
--- a/src/rgw/rgw_cr_rados.h
+++ b/src/rgw/rgw_cr_rados.h
@@ -931,6 +931,7 @@ class RGWAsyncFetchRemoteObj : public RGWAsyncRadosRequest {
real_time src_mtime;
bool copy_if_newer;
+ std::shared_ptr<RGWFetchObjFilter> filter;
rgw_zone_set zones_trace;
PerfCounters* counters;
const DoutPrefixProvider *dpp;
@@ -946,7 +947,9 @@ 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,
+ bool _if_newer,
+ std::shared_ptr<RGWFetchObjFilter> _filter,
+ rgw_zone_set *_zones_trace,
PerfCounters* counters, const DoutPrefixProvider *dpp)
: RGWAsyncRadosRequest(caller, cn), store(_store),
source_zone(_source_zone),
@@ -956,7 +959,9 @@ public:
key(_key),
dest_key(_dest_key),
versioned_epoch(_versioned_epoch),
- copy_if_newer(_if_newer), counters(counters),
+ copy_if_newer(_if_newer),
+ filter(_filter),
+ counters(counters),
dpp(dpp)
{
if (_zones_trace) {
@@ -983,6 +988,8 @@ class RGWFetchRemoteObjCR : public RGWSimpleCoroutine {
bool copy_if_newer;
+ std::shared_ptr<RGWFetchObjFilter> filter;
+
RGWAsyncFetchRemoteObj *req;
rgw_zone_set *zones_trace;
PerfCounters* counters;
@@ -997,7 +1004,9 @@ 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,
+ bool _if_newer,
+ std::shared_ptr<RGWFetchObjFilter> _filter,
+ rgw_zone_set *_zones_trace,
PerfCounters* counters, const DoutPrefixProvider *dpp)
: RGWSimpleCoroutine(_store->ctx()), cct(_store->ctx()),
async_rados(_async_rados), store(_store),
@@ -1008,7 +1017,9 @@ public:
key(_key),
dest_key(_dest_key),
versioned_epoch(_versioned_epoch),
- copy_if_newer(_if_newer), req(NULL),
+ copy_if_newer(_if_newer),
+ filter(_filter),
+ req(NULL),
zones_trace(_zones_trace), counters(counters), dpp(dpp) {}
@@ -1026,7 +1037,7 @@ public:
int send_request() override {
req = new RGWAsyncFetchRemoteObj(this, stack->create_completion_notifier(), store,
source_zone, src_bucket, dest_placement_rule, dest_bucket_info,
- key, dest_key, versioned_epoch, copy_if_newer,
+ key, dest_key, versioned_epoch, copy_if_newer, filter,
zones_trace, counters, dpp);
async_rados->queue(req);
return 0;