From: Mykola Golub Date: Thu, 24 Nov 2016 08:11:19 +0000 (+0200) Subject: librbd: pass notifier_id to Watcher handle_notify X-Git-Tag: v12.0.0~38^2~12 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=13496b22ee375118a32954b532caeea549eb2283;p=ceph.git librbd: pass notifier_id to Watcher handle_notify Signed-off-by: Mykola Golub --- diff --git a/src/librbd/ImageWatcher.cc b/src/librbd/ImageWatcher.cc index 55af5bbc55db..27f765095198 100644 --- a/src/librbd/ImageWatcher.cc +++ b/src/librbd/ImageWatcher.cc @@ -891,7 +891,7 @@ void ImageWatcher::process_payload(uint64_t notify_id, uint64_t handle, template void ImageWatcher::handle_notify(uint64_t notify_id, uint64_t handle, - bufferlist &bl) { + uint64_t notifier_id, bufferlist &bl) { NotifyMessage notify_message; if (bl.length() == 0) { // legacy notification for header updates diff --git a/src/librbd/ImageWatcher.h b/src/librbd/ImageWatcher.h index 6ada79831e1d..42d85b32128b 100644 --- a/src/librbd/ImageWatcher.h +++ b/src/librbd/ImageWatcher.h @@ -246,7 +246,7 @@ private: const watch_notify::Payload &payload, int r); virtual void handle_notify(uint64_t notify_id, uint64_t handle, - bufferlist &bl); + uint64_t notifier_id, bufferlist &bl); virtual void handle_error(uint64_t cookie, int err); virtual void handle_rewatch_complete(int r); diff --git a/src/librbd/MirroringWatcher.cc b/src/librbd/MirroringWatcher.cc index d8b829947bda..ef83c21c580c 100644 --- a/src/librbd/MirroringWatcher.cc +++ b/src/librbd/MirroringWatcher.cc @@ -86,7 +86,7 @@ void MirroringWatcher::notify_image_updated( template void MirroringWatcher::handle_notify(uint64_t notify_id, uint64_t handle, - bufferlist &bl) { + uint64_t notifier_id, bufferlist &bl) { CephContext *cct = this->m_cct; ldout(cct, 15) << ": notify_id=" << notify_id << ", " << "handle=" << handle << dendl; diff --git a/src/librbd/MirroringWatcher.h b/src/librbd/MirroringWatcher.h index 1f385c5d10f7..45925b4c7eef 100644 --- a/src/librbd/MirroringWatcher.h +++ b/src/librbd/MirroringWatcher.h @@ -59,7 +59,7 @@ private: Context *on_notify_ack); virtual void handle_notify(uint64_t notify_id, uint64_t handle, - bufferlist &bl); + uint64_t notifier_id, bufferlist &bl); }; } // namespace librbd diff --git a/src/librbd/Watcher.cc b/src/librbd/Watcher.cc index 528a7c22201a..edf15d102d7c 100644 --- a/src/librbd/Watcher.cc +++ b/src/librbd/Watcher.cc @@ -217,7 +217,7 @@ void Watcher::WatchCtx::handle_notify(uint64_t notify_id, uint64_t handle, uint64_t notifier_id, bufferlist& bl) { - watcher.handle_notify(notify_id, handle, bl); + watcher.handle_notify(notify_id, handle, notifier_id, bl); } void Watcher::WatchCtx::handle_error(uint64_t handle, int err) { diff --git a/src/librbd/Watcher.h b/src/librbd/Watcher.h index 04806f2d91cd..bf4b94080dbd 100644 --- a/src/librbd/Watcher.h +++ b/src/librbd/Watcher.h @@ -61,7 +61,7 @@ protected: Context *on_finish = nullptr); virtual void handle_notify(uint64_t notify_id, uint64_t handle, - bufferlist &bl) = 0; + uint64_t notifier_id, bufferlist &bl) = 0; virtual void handle_error(uint64_t cookie, int err); diff --git a/src/tools/rbd_mirror/Replayer.cc b/src/tools/rbd_mirror/Replayer.cc index 346a9c0e277c..5223aa2c29c6 100644 --- a/src/tools/rbd_mirror/Replayer.cc +++ b/src/tools/rbd_mirror/Replayer.cc @@ -220,7 +220,7 @@ private: } virtual void handle_notify(uint64_t notify_id, uint64_t handle, - bufferlist &bl) { + uint64_t notifier_id, bufferlist &bl) { bufferlist out; acknowledge_notify(notify_id, handle, out); }