Received: from eggs.gnu.org ([2001:4830:134:3::10]:55993) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YLmDE-0003MM-8i for qemu-devel@nongnu.org; Thu, 12 Feb 2015 00:21:17 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YLmDA-0008P7-8d for qemu-devel@nongnu.org; Thu, 12 Feb 2015 00:21:16 -0500 Received: from mx1.redhat.com ([209.132.183.28]:56098) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YLmDA-0008Oy-0u for qemu-devel@nongnu.org; Thu, 12 Feb 2015 00:21:12 -0500 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id t1C5L92k028850 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Thu, 12 Feb 2015 00:21:10 -0500 From: Fam Zheng Date: Thu, 12 Feb 2015 13:20:59 +0800 Message-Id: <1423718462-25566-1-git-send-email-famz@redhat.com> Subject: [Qemu-devel] [PATCH 0/3] virtio-scsi: Fix unsafe bdrv_set_aio_context calls List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: kwolf@redhat.com, Paolo Bonzini , stefanha@redhat.com It is not safe to call bdrv_set_aio_context outside BQL (see patch 1), so move the call to main thread (patch 3). And as a bonus, the two loops in virtio-scsi.c and virtio-scsi-dataplane.c for cmd queue handling are converged (patch 2). Fam Zheng (3): block: Forbid bdrv_set_aio_context outside BQL virtio-scsi: Deduplicate cmd queue handling code of dataplane virtio-scsi-dataplane: Use main thread BH to set BDS' aio context hw/scsi/virtio-scsi-dataplane.c | 26 +++---- hw/scsi/virtio-scsi.c | 153 ++++++++++++++++++++++++++++++++++------ include/block/block.h | 3 +- include/hw/virtio/virtio-scsi.h | 11 ++- 4 files changed, 156 insertions(+), 37 deletions(-) -- 1.9.3