mirror of
https://github.com/ceph/ceph
synced 2025-03-30 23:40:09 +00:00
rbd-mirror: manual stop should take precedence over regular stop
Somewhat similar to commit 0a3794e562
("rbd-mirror: make stop
properly cancel restart"), make it so that a) if a manual stop is
joined to regular stop, the stop becomes manual and b) if a regular
stop is joined to a manual stop, the stop stays manual.
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
This commit is contained in:
parent
219c500977
commit
c5b5787349
@ -528,6 +528,10 @@ void ImageReplayer<I>::stop(Context *on_finish, bool manual, bool restart)
|
||||
|
||||
if (!is_running_()) {
|
||||
running = false;
|
||||
if (manual && !m_manual_stop) {
|
||||
dout(10) << "marking manual" << dendl;
|
||||
m_manual_stop = true;
|
||||
}
|
||||
if (!restart && m_restart_requested) {
|
||||
dout(10) << "canceling restart" << dendl;
|
||||
m_restart_requested = false;
|
||||
|
Loading…
Reference in New Issue
Block a user