return ret;
}
+extern "C" int rados_aio_watch(rados_ioctx_t io, const char *o,
+ rados_completion_t completion,
+ uint64_t *handle,
+ rados_watchcb2_t watchcb,
+ rados_watcherrcb_t watcherrcb, void *arg)
+{
+ tracepoint(librados, rados_aio_watch_enter, io, o, completion, handle, watchcb, arg);
+ int ret;
+ if (!completion || !watchcb || !o || !handle) {
+ ret = -EINVAL;
+ } else {
+ uint64_t *cookie = handle;
+ librados::IoCtxImpl *ctx = (librados::IoCtxImpl *)io;
+ object_t oid(o);
+ librados::AioCompletionImpl *c =
+ reinterpret_cast<librados::AioCompletionImpl*>(completion);
+ C_WatchCB2 *wc = new C_WatchCB2(watchcb, watcherrcb, arg);
+ ret = ctx->aio_watch(oid, c, cookie, NULL, wc);
+ }
+ tracepoint(librados, rados_watch_exit, ret, handle ? *handle : 0);
+ return ret;
+}
+
+
extern "C" int rados_unwatch(rados_ioctx_t io, const char *o, uint64_t handle)
{
tracepoint(librados, rados_unwatch_enter, io, o, handle);
return retval;
}
+extern "C" int rados_aio_unwatch(rados_ioctx_t io, uint64_t handle,
+ rados_completion_t completion)
+{
+ tracepoint(librados, rados_aio_unwatch_enter, io, handle, completion);
+ uint64_t cookie = handle;
+ librados::IoCtxImpl *ctx = (librados::IoCtxImpl *)io;
+ librados::AioCompletionImpl *c =
+ reinterpret_cast<librados::AioCompletionImpl*>(completion);
+ int retval = ctx->aio_unwatch(cookie, c);
+ tracepoint(librados, rados_aio_unwatch_exit, retval);
+ return retval;
+}
+
extern "C" int rados_watch_check(rados_ioctx_t io, uint64_t handle)
{
tracepoint(librados, rados_watch_check_enter, io, handle);
)
)
+TRACEPOINT_EVENT(librados, rados_aio_watch_enter,
+ TP_ARGS(
+ rados_ioctx_t, ioctx,
+ const char*, oid,
+ rados_completion_t, completion,
+ uint64_t*, phandle,
+ rados_watchcb2_t, callback,
+ void*, arg),
+ TP_FIELDS(
+ ctf_integer_hex(rados_ioctx_t, ioctx, ioctx)
+ ctf_string(oid, oid)
+ ctf_integer_hex(rados_completion_t, completion, completion)
+ ctf_integer_hex(uint64_t, phandle, phandle)
+ ctf_integer_hex(rados_watchcb2_t, callback, callback)
+ ctf_integer_hex(void*, arg, arg)
+ )
+)
+
+TRACEPOINT_EVENT(librados, rados_aio_watch_exit,
+ TP_ARGS(
+ int, retval,
+ uint64_t, handle),
+ TP_FIELDS(
+ ctf_integer(int, retval, retval)
+ ctf_integer(uint64_t, handle, handle)
+ )
+)
+
TRACEPOINT_EVENT(librados, rados_unwatch_enter,
TP_ARGS(
rados_ioctx_t, ioctx,
)
)
+TRACEPOINT_EVENT(librados, rados_aio_unwatch_enter,
+ TP_ARGS(
+ rados_ioctx_t, ioctx,
+ uint64_t, handle,
+ rados_completion_t, completion),
+ TP_FIELDS(
+ ctf_integer_hex(rados_ioctx_t, ioctx, ioctx)
+ ctf_integer(uint64_t, handle, handle)
+ ctf_integer_hex(rados_completion_t, completion, completion)
+ )
+)
+
+TRACEPOINT_EVENT(librados, rados_aio_unwatch_exit,
+ TP_ARGS(
+ int, retval),
+ TP_FIELDS(
+ ctf_integer(int, retval, retval)
+ )
+)
+
TRACEPOINT_EVENT(librados, rados_watch_check_enter,
TP_ARGS(
rados_ioctx_t, ioctx,