On 04.05.2016 11:39, Kevin Wolf wrote:
> This changes the mirror block job to use the job's BlockBackend for
> performing its I/O. job->bs isn't used by the mirroring code any more
> afterwards.
> 
> Signed-off-by: Kevin Wolf <[email protected]>
> ---
>  block/mirror.c | 75 
> +++++++++++++++++++++++++++++++---------------------------
>  blockdev.c     |  4 +---
>  2 files changed, 41 insertions(+), 38 deletions(-)
> 
> diff --git a/block/mirror.c b/block/mirror.c
> index 23aa10e..dc66340 100644
> --- a/block/mirror.c
> +++ b/block/mirror.c

[...]

> @@ -823,10 +826,12 @@ static void mirror_start_job(BlockDriverState *bs, 
> BlockDriverState *target,
>          return;
>      }
>  
> +    s->target = blk_new(&error_abort);

Same as in patch 3.

Rest looks good.

Max

> +    blk_insert_bs(s->target, target);
> +
>      s->replaces = g_strdup(replaces);
>      s->on_source_error = on_source_error;
>      s->on_target_error = on_target_error;
> -    s->target = target;
>      s->is_none_mode = is_none_mode;
>      s->base = base;
>      s->granularity = granularity;


Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to