Received: from eggs.gnu.org ([2001:4830:134:3::10]:38227) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bGQO2-0005cD-Fz for qemu-devel@nongnu.org; Fri, 24 Jun 2016 08:39:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bGQO0-0003zl-I8 for qemu-devel@nongnu.org; Fri, 24 Jun 2016 08:39:05 -0400 From: Fam Zheng Date: Fri, 24 Jun 2016 20:39:27 +0800 Message-Id: <20160624123934.10821-1-famz@redhat.com> Subject: [Qemu-devel] [PATCH v2 0/7] 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: Jeff Cody , Kevin Wolf , Max Reitz , Stefan Hajnoczi , "Michael S. Tsirkin" , Paolo Bonzini , qemu-block@nongnu.org v2: Only convert virtio-{blk,scsi}. [Paolo] This series is based on top of Cornelia's [PATCH 0/6] virtio: refactor host notifiers The benifit 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 (7): virtio-bus: Drop "set_handler" parameter virtio: Add typedef for handle_output virtio: Introduce virtio_add_queue_aio virtio: Use aio_set_event_notifier for aio vq 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 | 11 +++++------ hw/virtio/virtio.c | 40 ++++++++++++++++++++++++++++++++-------- include/hw/virtio/virtio.h | 8 ++++++-- 6 files changed, 47 insertions(+), 32 deletions(-) -- 2.8.3