mirror: Double-check immediately before replacing
authorMax Reitz <mreitz@redhat.com>
Tue, 18 Feb 2020 10:34:46 +0000 (11:34 +0100)
committerKevin Wolf <kwolf@redhat.com>
Tue, 18 Feb 2020 10:55:40 +0000 (11:55 +0100)
commit6e9cc0518113da423252a1fea328f27dc7bcf997
tree5f9615f2bf0ecd1ca1771eb9a8bba3c7bbfd1588
parent6b4907cf4279e55207fc3fede5686324464ee413
mirror: Double-check immediately before replacing

There is no guarantee that we can still replace the node we want to
replace at the end of the mirror job.  Double-check by calling
bdrv_recurse_can_replace().

Signed-off-by: Max Reitz <mreitz@redhat.com>
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Message-Id: <20200218103454.296704-12-mreitz@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
block/mirror.c