summaryrefslogtreecommitdiffstats
path: root/src/rgw/driver
diff options
context:
space:
mode:
Diffstat (limited to 'src/rgw/driver')
-rw-r--r--src/rgw/driver/rados/rgw_service.cc2
-rw-r--r--src/rgw/driver/rados/rgw_tools.h33
2 files changed, 27 insertions, 8 deletions
diff --git a/src/rgw/driver/rados/rgw_service.cc b/src/rgw/driver/rados/rgw_service.cc
index af4043efa7a..ddd4dfdcd74 100644
--- a/src/rgw/driver/rados/rgw_service.cc
+++ b/src/rgw/driver/rados/rgw_service.cc
@@ -106,7 +106,7 @@ int RGWServices_Def::init(CephContext *cct,
meta->init(sysobj.get(), mdlog.get(), meta_bes);
meta_be_sobj->init(sysobj.get(), mdlog.get());
meta_be_otp->init(sysobj.get(), mdlog.get(), cls.get());
- notify->init(zone.get(), rados.get(), finisher.get());
+ notify->init(zone.get(), radoshandle, finisher.get());
otp->init(zone.get(), meta.get(), meta_be_otp.get());
rados->init();
zone->init(sysobj.get(), rados.get(), sync_modules.get(), bucket_sync_sobj.get());
diff --git a/src/rgw/driver/rados/rgw_tools.h b/src/rgw/driver/rados/rgw_tools.h
index 7fdb3ea3eff..a7639acbb24 100644
--- a/src/rgw/driver/rados/rgw_tools.h
+++ b/src/rgw/driver/rados/rgw_tools.h
@@ -108,34 +108,53 @@ struct rgw_rados_ref {
rgw_raw_obj obj;
- int operate(const DoutPrefixProvider *dpp, librados::ObjectReadOperation *op,
- bufferlist *pbl, optional_yield y, int flags = 0) {
+ int operate(const DoutPrefixProvider* dpp, librados::ObjectReadOperation* op,
+ bufferlist* pbl, optional_yield y, int flags = 0) {
return rgw_rados_operate(dpp, ioctx, obj.oid, op, pbl, y, flags);
}
- int operate(const DoutPrefixProvider *dpp, librados::ObjectWriteOperation *op,
+ int operate(const DoutPrefixProvider* dpp, librados::ObjectWriteOperation* op,
optional_yield y, int flags = 0) {
return rgw_rados_operate(dpp, ioctx, obj.oid, op, y, flags);
}
- int aio_operate(librados::AioCompletion *c,
- librados::ObjectWriteOperation *op) {
+ int aio_operate(librados::AioCompletion* c,
+ librados::ObjectWriteOperation* op) {
return ioctx.aio_operate(obj.oid, c, op);
}
- int aio_operate(librados::AioCompletion *c, librados::ObjectReadOperation *op,
+ int aio_operate(librados::AioCompletion* c, librados::ObjectReadOperation* op,
bufferlist *pbl) {
return ioctx.aio_operate(obj.oid, c, op, pbl);
}
- int notify(const DoutPrefixProvider *dpp, bufferlist& bl, uint64_t timeout_ms,
+ int watch(uint64_t* handle, librados::WatchCtx2* ctx) {
+ return ioctx.watch2(obj.oid, handle, ctx);
+ }
+
+ int aio_watch(librados::AioCompletion* c, uint64_t* handle,
+ librados::WatchCtx2 *ctx) {
+ return ioctx.aio_watch(obj.oid, c, handle, ctx);
+ }
+
+ int unwatch(uint64_t handle) {
+ return ioctx.unwatch2(handle);
+ }
+
+ int notify(const DoutPrefixProvider* dpp, bufferlist& bl, uint64_t timeout_ms,
bufferlist* pbl, optional_yield y) {
return rgw_rados_notify(dpp, ioctx, obj.oid, bl, timeout_ms, pbl, y);
}
+
+ void notify_ack(uint64_t notify_id, uint64_t cookie, bufferlist& bl) {
+ ioctx.notify_ack(obj.oid, notify_id, cookie, bl);
+ }
};
+
inline std::ostream& operator <<(std::ostream& m, const rgw_rados_ref& ref) {
return m << ref.obj;
}
+
int rgw_get_rados_ref(const DoutPrefixProvider* dpp, librados::Rados* rados,
rgw_raw_obj obj, rgw_rados_ref* ref);