mirror: Stop active mirroring after force-cancel
commit9b230ef93e406dc46b82eebde996ef6a08b929d6
authorHanna Reitz <hreitz@redhat.com>
Wed, 6 Oct 2021 15:19:38 +0000 (6 17:19 +0200)
committerVladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Thu, 7 Oct 2021 08:42:50 +0000 (7 10:42 +0200)
tree24954b66ddfbee7567bcc0eb3105cab59b275215
parent4feeec7e23b4151c962cb1b9f1a0e403803dfaee
mirror: Stop active mirroring after force-cancel

Once the mirror job is force-cancelled (job_is_cancelled() is true), we
should not generate new I/O requests.  This applies to active mirroring,
too, so stop it once the job is cancelled.

(We must still forward all I/O requests to the source, though, of
course, but those are not really I/O requests generated by the job, so
this is fine.)

Signed-off-by: Hanna Reitz <hreitz@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Message-Id: <20211006151940.214590-12-hreitz@redhat.com>
Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
block/mirror.c