qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Kevin Wolf <kwolf@redhat.com>
To: Zhang Chen <chen.zhang@intel.com>
Cc: vsementsov@virtuozzo.com, qemu-block <qemu-block@nongnu.org>,
	Xie Changlong <xiechanglong.d@gmail.com>,
	qemu-dev <qemu-devel@nongnu.org>, Max Reitz <mreitz@redhat.com>,
	Zhang Chen <zhangckid@gmail.com>
Subject: Re: [Qemu-devel] [PATCH] block/replication.c: Fix crash issue after failover
Date: Fri, 14 Jun 2019 12:18:03 +0200	[thread overview]
Message-ID: <20190614101803.GG6042@dhcp-200-226.str.redhat.com> (raw)
In-Reply-To: <20190614092853.26551-1-chen.zhang@intel.com>

Am 14.06.2019 um 11:28 hat Zhang Chen geschrieben:
> From: Zhang Chen <chen.zhang@intel.com>
> 
> No block job on active disk after failover.
> In the replication_stop() function have canceled the block job,
> we check it again here.
> 
> Signed-off-by: Zhang Chen <chen.zhang@intel.com>
> ---
>  block/replication.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/block/replication.c b/block/replication.c
> index 3d4dedddfc..bdf2bf4bbc 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->secondary_disk->bs->job) {
> +            job_cancel_sync(&s->secondary_disk->bs->job->job);
> +        }

Why are you changing the code from active_disk to secondary_disk?

Also, please rebase on top of Vladimir's '[PATCH 0/4] block: drop
bs->job'.

Kevin


  parent reply	other threads:[~2019-06-14 10:28 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-14  9:28 [Qemu-devel] [PATCH] block/replication.c: Fix crash issue after failover Zhang Chen
2019-06-14 10:17 ` no-reply
2019-06-14 10:18 ` Kevin Wolf [this message]
2019-06-15 19:05   ` Zhang, Chen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190614101803.GG6042@dhcp-200-226.str.redhat.com \
    --to=kwolf@redhat.com \
    --cc=chen.zhang@intel.com \
    --cc=mreitz@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=vsementsov@virtuozzo.com \
    --cc=xiechanglong.d@gmail.com \
    --cc=zhangckid@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).