Re: [Qemu-devel] [PATCH] block: early check for blockers on drive-mirror

2018-02-12 Thread Daniel P . Berrangé
On Mon, Feb 12, 2018 at 10:58:31AM +0100, Paolo Bonzini wrote: > On 10/02/2018 00:07, John Snow wrote: > >> +/* Early check to avoid creating target */ > >> +if (bdrv_op_is_blocked(bs, BLOCK_OP_TYPE_MIRROR_SOURCE, errp)) { > >> +return; > >> +} > >> + > >> aio_context =

Re: [Qemu-devel] [PATCH] block: early check for blockers on drive-mirror

2018-02-12 Thread Paolo Bonzini
On 10/02/2018 00:07, John Snow wrote: >> +/* Early check to avoid creating target */ >> +if (bdrv_op_is_blocked(bs, BLOCK_OP_TYPE_MIRROR_SOURCE, errp)) { >> +return; >> +} >> + >> aio_context = bdrv_get_aio_context(bs); >> aio_context_acquire(aio_context); >> >> >

Re: [Qemu-devel] [PATCH] block: early check for blockers on drive-mirror

2018-02-09 Thread John Snow
On 02/07/2018 11:29 AM, Paolo Bonzini wrote: > Even if an op blocker is present for BLOCK_OP_TYPE_MIRROR_SOURCE, > it is checked a bit late and the result is that the target is > created even if drive-mirror subsequently fails. Add an early > check to avoid this. > > Signed-off-by: Paolo

Re: [Qemu-devel] [PATCH] block: early check for blockers on drive-mirror

2018-02-07 Thread Fam Zheng
On Wed, 02/07 17:29, Paolo Bonzini wrote: > Even if an op blocker is present for BLOCK_OP_TYPE_MIRROR_SOURCE, > it is checked a bit late and the result is that the target is > created even if drive-mirror subsequently fails. Add an early > check to avoid this. > > Signed-off-by: Paolo Bonzini