]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
rbd-mirror: straighten ImageReplayer::stop() a bit
authorIlya Dryomov <idryomov@gmail.com>
Sat, 19 Feb 2022 15:43:04 +0000 (16:43 +0100)
committerIlya Dryomov <idryomov@gmail.com>
Mon, 21 Feb 2022 13:57:44 +0000 (14:57 +0100)
commit219c500977bbfbcfe4ccd24beb294edbe0562d35
tree6f707acfab1b2f931401fbe429b634fb325c262b
parentcee3cae9b2d1ea14db0ffaf3984486d278ff8871
rbd-mirror: straighten ImageReplayer::stop() a bit

- don't default on_finish parameter
- m_restart_requested is set in ImageReplayer::restart() which is the
  only restart=true call site, so setting m_restart_requested here is
  redundant
- is_stopped_() can't be true in is_running_() branch
- on_finish->complete(0) in the end is unreachable

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
src/test/rbd_mirror/test_mock_ImageReplayer.cc
src/tools/rbd_mirror/ImageReplayer.cc
src/tools/rbd_mirror/ImageReplayer.h