Received: from eggs.gnu.org ([2001:4830:134:3::10]:60268) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bMq7A-0002fG-FL for qemu-devel@nongnu.org; Tue, 12 Jul 2016 01:20:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bMq76-0005Nf-8Z for qemu-devel@nongnu.org; Tue, 12 Jul 2016 01:20:11 -0400 Received: from mx1.redhat.com ([209.132.183.28]:57474) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bMq76-0005NN-2f for qemu-devel@nongnu.org; Tue, 12 Jul 2016 01:20:08 -0400 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 7C8FE3B728 for ; Tue, 12 Jul 2016 05:20:07 +0000 (UTC) From: Fam Zheng Date: Tue, 12 Jul 2016 13:19:54 +0800 Message-Id: <1468300800-31256-1-git-send-email-famz@redhat.com> Subject: [Qemu-devel] [PATCH 0/6] virtio: Merge virtio-{blk, scsi} host notifier handling paths List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: stefanha@redhat.com, mst@redhat.com, kwolf@redhat.com, pbonzini@redhat.com v3: Rebase to master. Squash 4 into 3. [Paolo] Add comment and commit message. [Stefan] Add Stefan's r-b in patch 1 and 2. v2: Only convert virtio-{blk,scsi}. [Paolo] The benifit of this is we don't use event_notifier_set_handler even in non-dataplane now, which in turn makes virtio-blk and virtio-scsi follow block layer aio context semantics. Specifically, I/O requests must come from blk_get_aio_context(blk) events, rather than iohandler_get_aio_context(), so that bdrv_drained_begin/end will work as expected. Patch 4 reverts the hack (ab27c3b5e7) we added for 2.6. Lately, commit b880481579 added another pair of bdrv_drained_begin/end so the crash cannot happen even without ab27c3b5e7, but in order to avoid leaking requests, patch two is still a must. Fam Zheng (6): virtio-bus: Drop "set_handler" parameter virtio: Add typedef for handle_output virtio: Introduce virtio_add_queue_aio virtio-blk: Call virtio_add_queue_aio virtio-scsi: Call virtio_add_queue_aio Revert "mirror: Workaround for unexpected iohandler events during completion" block/mirror.c | 9 --------- hw/block/virtio-blk.c | 2 +- hw/scsi/virtio-scsi.c | 9 +++------ hw/virtio/virtio-bus.c | 13 ++++++------- hw/virtio/virtio.c | 45 +++++++++++++++++++++++++++++++++++++-------- include/hw/virtio/virtio.h | 8 ++++++-- 6 files changed, 53 insertions(+), 33 deletions(-) -- 2.7.4