#include "include/rbd_types.h"
#include "include/rados/librados.hpp"
#include "common/errno.h"
+#include "common/Cond.h"
#include "librbd/Utils.h"
#include "librbd/watcher/Utils.h"
ldout(cct, 20) << dendl;
bufferlist bl;
- ::encode(NotifyMessage{ModeUpdatedPayload{mirror_mode}}, bl);
+ encode(NotifyMessage{ModeUpdatedPayload{mirror_mode}}, bl);
librados::AioCompletion *comp = create_rados_callback(on_finish);
int r = io_ctx.aio_notify(RBD_MIRRORING, comp, bl, NOTIFY_TIMEOUT_MS,
nullptr);
- assert(r == 0);
+ ceph_assert(r == 0);
comp->release();
}
ldout(cct, 20) << dendl;
bufferlist bl;
- ::encode(NotifyMessage{ImageUpdatedPayload{
+ encode(NotifyMessage{ImageUpdatedPayload{
mirror_image_state, image_id, global_image_id}}, bl);
librados::AioCompletion *comp = create_rados_callback(on_finish);
int r = io_ctx.aio_notify(RBD_MIRRORING, comp, bl, NOTIFY_TIMEOUT_MS,
nullptr);
- assert(r == 0);
+ ceph_assert(r == 0);
comp->release();
}
NotifyMessage notify_message;
try {
- bufferlist::iterator iter = bl.begin();
- ::decode(notify_message, iter);
+ auto iter = bl.cbegin();
+ decode(notify_message, iter);
} catch (const buffer::error &err) {
lderr(cct) << ": error decoding image notification: " << err.what()
<< dendl;