qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Fam Zheng <famz@redhat.com>
To: qemu-devel@nongnu.org
Cc: stefanha@redhat.com, mst@redhat.com, kwolf@redhat.com,
	pbonzini@redhat.com
Subject: [Qemu-devel] [PATCH 6/6] Revert "mirror: Workaround for unexpected iohandler events during completion"
Date: Tue, 12 Jul 2016 13:20:00 +0800	[thread overview]
Message-ID: <1468300800-31256-7-git-send-email-famz@redhat.com> (raw)
In-Reply-To: <1468300800-31256-1-git-send-email-famz@redhat.com>

This reverts commit ab27c3b5e7408693dde0b565f050aa55c4a1bcef.

The virtio storage device host notifiers now work with
bdrv_drained_begin/end, so we don't need this hack any more.

Signed-off-by: Fam Zheng <famz@redhat.com>
---
 block/mirror.c | 9 ---------
 1 file changed, 9 deletions(-)

diff --git a/block/mirror.c b/block/mirror.c
index 8d96049..8a452a2 100644
--- a/block/mirror.c
+++ b/block/mirror.c
@@ -506,9 +506,6 @@ static void mirror_exit(BlockJob *job, void *opaque)
     block_job_completed(&s->common, data->ret);
     g_free(data);
     bdrv_drained_end(src);
-    if (qemu_get_aio_context() == bdrv_get_aio_context(src)) {
-        aio_enable_external(iohandler_get_aio_context());
-    }
     bdrv_unref(src);
 }
 
@@ -732,12 +729,6 @@ immediate_exit:
     /* Before we switch to target in mirror_exit, make sure data doesn't
      * change. */
     bdrv_drained_begin(bs);
-    if (qemu_get_aio_context() == bdrv_get_aio_context(bs)) {
-        /* FIXME: virtio host notifiers run on iohandler_ctx, therefore the
-         * above bdrv_drained_end isn't enough to quiesce it. This is ugly, we
-         * need a block layer API change to achieve this. */
-        aio_disable_external(iohandler_get_aio_context());
-    }
     block_job_defer_to_main_loop(&s->common, mirror_exit, data);
 }
 
-- 
2.7.4

      parent reply	other threads:[~2016-07-12  5:20 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-12  5:19 [Qemu-devel] [PATCH 0/6] virtio: Merge virtio-{blk, scsi} host notifier handling paths Fam Zheng
2016-07-12  5:19 ` [Qemu-devel] [PATCH 1/6] virtio-bus: Drop "set_handler" parameter Fam Zheng
2016-07-12  9:09   ` Cornelia Huck
2016-07-12  9:16     ` Fam Zheng
2016-07-12  9:21       ` Cornelia Huck
2016-07-12  5:19 ` [Qemu-devel] [PATCH 2/6] virtio: Add typedef for handle_output Fam Zheng
2016-07-12  5:19 ` [Qemu-devel] [PATCH 3/6] virtio: Introduce virtio_add_queue_aio Fam Zheng
2016-07-12  5:19 ` [Qemu-devel] [PATCH 4/6] virtio-blk: Call virtio_add_queue_aio Fam Zheng
2016-07-12  5:19 ` [Qemu-devel] [PATCH 5/6] virtio-scsi: " Fam Zheng
2016-07-12  5:20 ` Fam Zheng [this message]

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=1468300800-31256-7-git-send-email-famz@redhat.com \
    --to=famz@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=mst@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@redhat.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).