From: Jason Dillaman Date: Thu, 8 Mar 2018 21:28:11 +0000 (-0500) Subject: rbd_mirror: document the basic state flow for pool watcher X-Git-Tag: v13.1.0~312^2~16 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=8a902f78573f07f01eaeb51e22d7f1bf58eb6869;p=ceph.git rbd_mirror: document the basic state flow for pool watcher Signed-off-by: Jason Dillaman --- diff --git a/src/tools/rbd_mirror/PoolReplayer.h b/src/tools/rbd_mirror/PoolReplayer.h index c9967700d9d1..f17bd9eb878c 100644 --- a/src/tools/rbd_mirror/PoolReplayer.h +++ b/src/tools/rbd_mirror/PoolReplayer.h @@ -65,6 +65,39 @@ public: void release_leader(); private: + /** + * @verbatim + * + * + * | + * v + * INIT + * | + * v + * <-------------------------\ + * . | + * . | + * v (leader acquired) | + * INIT_LOCAL_POOL_WATCHER WAIT_FOR_NOTIFICATIONS + * | ^ + * v | + * INIT_REMOTE_POOL_WATCHER SHUT_DOWN_POOL_WATCHERS + * | ^ + * v | + * INIT_IMAGE_DELETER SHUT_DOWN_IMAGE_DELETER + * | ^ + * v . + * <-----------\ . + * . | . + * . (image update) | . + * . . > NOTIFY_INSTANCE_WATCHER . + * . . + * . (leader lost / shut down) . + * . . . . . . . . . . . . . . . . . . + * + * @endverbatim + */ + struct PoolWatcherListener : public PoolWatcher<>::Listener { PoolReplayer *pool_replayer; bool local;