block/replication.c: Ignore requests after failover
commit08ddb4eb6d47d241257027751138001484c594b2
authorLukas Straub <lukasstraub2@web.de>
Thu, 24 Oct 2019 14:25:35 +0000 (24 16:25 +0200)
committerJason Wang <jasowang@redhat.com>
Tue, 3 Mar 2020 10:04:47 +0000 (3 18:04 +0800)
tree4b651d94c636b8ded1c295a45a99a2951fbb6523
parentdda8f1854b8efae1dd30b666e8358f9b2ed8ae48
block/replication.c: Ignore requests after failover

After failover the Secondary side of replication shouldn't change state, because
it now functions as our primary disk.

In replication_start, replication_do_checkpoint, replication_stop, ignore
the request if current state is BLOCK_REPLICATION_DONE (sucessful failover) or
BLOCK_REPLICATION_FAILOVER (failover in progres i.e. currently merging active
and hidden images into the base image).

Signed-off-by: Lukas Straub <lukasstraub2@web.de>
Reviewed-by: Zhang Chen <chen.zhang@intel.com>
Acked-by: Max Reitz <mreitz@redhat.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
block/replication.c