From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43186) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZPWE2-0002Na-Es for qemu-devel@nongnu.org; Wed, 12 Aug 2015 09:37:54 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZPWDw-0002ia-Nf for qemu-devel@nongnu.org; Wed, 12 Aug 2015 09:37:50 -0400 Received: from mx1.redhat.com ([209.132.183.28]:43186) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZPWDw-0002iR-It for qemu-devel@nongnu.org; Wed, 12 Aug 2015 09:37:44 -0400 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (Postfix) with ESMTPS id 34DF519CB90 for ; Wed, 12 Aug 2015 13:37:44 +0000 (UTC) Received: from donizetti.redhat.com (ovpn-112-82.ams2.redhat.com [10.36.112.82]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t7CDbETn004849 for ; Wed, 12 Aug 2015 09:37:43 -0400 From: Paolo Bonzini Date: Wed, 12 Aug 2015 15:37:09 +0200 Message-Id: <1439386633-18933-17-git-send-email-pbonzini@redhat.com> In-Reply-To: <1439386633-18933-1-git-send-email-pbonzini@redhat.com> References: <1439386633-18933-1-git-send-email-pbonzini@redhat.com> Subject: [Qemu-devel] [PULL 16/20] 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 This matches commit 4407c1c (virtio-blk: Schedule BH in the right context, 2014-06-17), which did the same thing for virtio-blk. Reviewed-by: Fam Zheng 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