summaryrefslogtreecommitdiffstats
path: root/src/rgw/services/svc_cls.h
diff options
context:
space:
mode:
authorYehuda Sadeh <yehuda@redhat.com>2019-06-06 02:33:50 +0200
committerCasey Bodley <cbodley@redhat.com>2019-07-29 21:20:48 +0200
commit0b8faf8a5d91b13631e79bc5d948e3a086693cf7 (patch)
treedba761d63ffb5592ff22524b08981119651f5cc4 /src/rgw/services/svc_cls.h
parentrgw: fixes following api changes (diff)
downloadceph-0b8faf8a5d91b13631e79bc5d948e3a086693cf7.tar.xz
ceph-0b8faf8a5d91b13631e79bc5d948e3a086693cf7.zip
rgw: RGWRados::lock_exclusive, ::unlock now being handled at svc.cls
Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
Diffstat (limited to 'src/rgw/services/svc_cls.h')
-rw-r--r--src/rgw/services/svc_cls.h20
1 files changed, 19 insertions, 1 deletions
diff --git a/src/rgw/services/svc_cls.h b/src/rgw/services/svc_cls.h
index e973a59a4bc..9dbff5ce23e 100644
--- a/src/rgw/services/svc_cls.h
+++ b/src/rgw/services/svc_cls.h
@@ -124,7 +124,24 @@ public:
optional_yield y);
} timelog;
- RGWSI_Cls(CephContext *cct): RGWServiceInstance(cct), mfa(cct), timelog(cct) {}
+ class Lock : public ClsSubService {
+ int init_obj(const string& oid, RGWSI_RADOS::Obj& obj);
+ public:
+ Lock(CephContext *cct): ClsSubService(cct) {}
+ int lock_exclusive(const rgw_pool& pool,
+ const string& oid,
+ timespan& duration,
+ string& zone_id,
+ string& owner_id,
+ std::optional<string> lock_name = std::nullopt);
+ int unlock(const rgw_pool& pool,
+ const string& oid,
+ string& zone_id,
+ string& owner_id,
+ std::optional<string> lock_name = std::nullopt);
+ } lock;
+
+ RGWSI_Cls(CephContext *cct): RGWServiceInstance(cct), mfa(cct), timelog(cct), lock(cct) {}
void init(RGWSI_Zone *_zone_svc, RGWSI_RADOS *_rados_svc) {
rados_svc = _rados_svc;
@@ -132,6 +149,7 @@ public:
mfa.init(this, zone_svc, rados_svc);
timelog.init(this, zone_svc, rados_svc);
+ lock.init(this, zone_svc, rados_svc);
}
int do_start() override;