qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] block/replication.c: Fix crash issue after failover
@ 2019-06-14  9:28 Zhang Chen
  2019-06-14 10:17 ` no-reply
  2019-06-14 10:18 ` Kevin Wolf
  0 siblings, 2 replies; 4+ messages in thread
From: Zhang Chen @ 2019-06-14  9:28 UTC (permalink / raw)
  To: Xie Changlong, Kevin Wolf, Max Reitz, qemu-block, qemu-dev
  Cc: Zhang Chen, Zhang Chen

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);
+        }
     }
 
     if (s->mode == REPLICATION_MODE_SECONDARY) {
-- 
2.17.GIT



^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-06-15 19:06 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2019-06-15 19:05   ` Zhang, Chen

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).