block/mirror: utilize job_exit shim
commit7b508f6b7a38a8d9729772fa6e525da883fb120b
authorJohn Snow <jsnow@redhat.com>
Thu, 30 Aug 2018 01:57:30 +0000 (29 21:57 -0400)
committerMax Reitz <mreitz@redhat.com>
Fri, 31 Aug 2018 14:28:33 +0000 (31 16:28 +0200)
treef3398eff8b4567278599c1f8c444ebf5d61769d6
parentf369b48dc4095861223f9bc4329935599e03b1c5
block/mirror: utilize job_exit shim

Change the manual deferment to mirror_exit into the implicit
callback to job_exit and the mirror_exit callback.

This does change the order of some bdrv_unref calls and job_completed,
but thanks to the new context in which we call .exit, this is safe to
defer the possible flushing of any nodes to the job_finalize_single
cleanup stage.

Signed-off-by: John Snow <jsnow@redhat.com>
Message-id: 20180830015734.19765-6-jsnow@redhat.com
Reviewed-by: Max Reitz <mreitz@redhat.com>
Reviewed-by: Jeff Cody <jcody@redhat.com>
Signed-off-by: Max Reitz <mreitz@redhat.com>
block/mirror.c