qemu-block
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-block] [PATCH V2] block/replication.c: Fix crash issue after f


From: Zhang, Chen
Subject: Re: [Qemu-block] [PATCH V2] block/replication.c: Fix crash issue after failover
Date: Fri, 21 Jun 2019 06:35:01 +0000

Please redirect to the V2 RESEND patch, this one not rebased on upstream code.

Thanks
Zhang Chen


> -----Original Message-----
> From: Zhang, Chen
> Sent: Friday, June 21, 2019 1:52 PM
> To: Xie Changlong <address@hidden>; Kevin Wolf
> <address@hidden>; Max Reitz <address@hidden>; qemu-block <qemu-
> address@hidden>; qemu-dev <address@hidden>
> Cc: Zhang Chen <address@hidden>; Zhang, Chen <address@hidden>
> Subject: [PATCH V2] block/replication.c: Fix crash issue after failover
> 
> From: Zhang Chen <address@hidden>
> 
> If we try to close replication after failover, it will crash here.
> So we need check the block job on active disk before cancel the job.
> 
> Signed-off-by: Zhang Chen <address@hidden>
> ---
>  block/replication.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/block/replication.c b/block/replication.c index
> 3d4dedddfc..845f796dd4 100644
> --- a/block/replication.c
> +++ b/block/replication.c
> @@ -146,7 +146,9 @@ static void replication_close(BlockDriverState *bs)
>          replication_stop(s->rs, false, NULL);
>      }
>      if (s->stage == BLOCK_REPLICATION_FAILOVER) {
> -        job_cancel_sync(&s->active_disk->bs->job->job);
> +        if (s->active_disk->bs->job) {
> +            job_cancel_sync(&s->active_disk->bs->job->job);
> +        }
>      }
> 
>      if (s->mode == REPLICATION_MODE_SECONDARY) {
> --
> 2.17.GIT




reply via email to

[Prev in Thread] Current Thread [Next in Thread]