From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57727) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZNHzg-0007zt-5Z for qemu-devel@nongnu.org; Thu, 06 Aug 2015 06:01:54 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZNHzd-00078o-0C for qemu-devel@nongnu.org; Thu, 06 Aug 2015 06:01:48 -0400 Received: from mail-wi0-x22d.google.com ([2a00:1450:400c:c05::22d]:36451) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZNHzc-00078g-Od for qemu-devel@nongnu.org; Thu, 06 Aug 2015 06:01:44 -0400 Received: by wicgj17 with SMTP id gj17so15530958wic.1 for ; Thu, 06 Aug 2015 03:01:44 -0700 (PDT) Sender: Paolo Bonzini From: Paolo Bonzini Date: Thu, 6 Aug 2015 12:01:35 +0200 Message-Id: <1438855297-28377-2-git-send-email-pbonzini@redhat.com> In-Reply-To: <1438855297-28377-1-git-send-email-pbonzini@redhat.com> References: <1438855297-28377-1-git-send-email-pbonzini@redhat.com> Subject: [Qemu-devel] [PATCH 1/3] scsi: create restart bottom half in the right AioContext List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: lvivier@redhat.com, famz@redhat.com This matches commit 4407c1c (virtio-blk: Schedule BH in the right context, 2014-06-17), which did the same thing for virtio-blk. Signed-off-by: Paolo Bonzini --- hw/scsi/scsi-bus.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hw/scsi/scsi-bus.c b/hw/scsi/scsi-bus.c index f0ae462..ffac8f4 100644 --- a/hw/scsi/scsi-bus.c +++ b/hw/scsi/scsi-bus.c @@ -136,7 +136,8 @@ static void scsi_dma_restart_cb(void *opaque, int running, RunState state) return; } if (!s->bh) { - s->bh = qemu_bh_new(scsi_dma_restart_bh, s); + AioContext *ctx = blk_get_aio_context(s->conf.blk); + s->bh = aio_bh_new(ctx, scsi_dma_restart_bh, s); qemu_bh_schedule(s->bh); } } -- 2.4.3