From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47595) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WkDQ6-00046Q-KW for qemu-devel@nongnu.org; Tue, 13 May 2014 10:11:03 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WkDQ5-0002x8-LV for qemu-devel@nongnu.org; Tue, 13 May 2014 10:11:02 -0400 Received: from mx1.redhat.com ([209.132.183.28]:57306) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WkDQ5-0002wv-Cm for qemu-devel@nongnu.org; Tue, 13 May 2014 10:11:01 -0400 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s4DEB00n022420 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 13 May 2014 10:11:00 -0400 Date: Tue, 13 May 2014 16:10:57 +0200 From: Stefan Hajnoczi Message-ID: <20140513141057.GB30562@stefanha-thinkpad.redhat.com> References: <1399947893-25843-1-git-send-email-famz@redhat.com> <5371C495.7090809@redhat.com> <20140513071314.GB26360@T430.nay.redhat.com> <5371E0AB.9010509@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5371E0AB.9010509@redhat.com> Subject: Re: [Qemu-devel] [PATCH] virtio-blk: Allow config-wce in dataplane List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: Fam Zheng , qemu-devel@nongnu.org On Tue, May 13, 2014 at 11:06:51AM +0200, Paolo Bonzini wrote: > Il 13/05/2014 09:13, Fam Zheng ha scritto: > >On Tue, 05/13 09:07, Paolo Bonzini wrote: > >>Il 13/05/2014 04:24, Fam Zheng ha scritto: > >>>Dataplane now uses block layer. Protect bdrv_set_enable_write_cache with > >>>aio_context_acquire and aio_context_release, so we can enable config-wce > >>>to allow guest to modify the write cache online. > >>> > >>>Signed-off-by: Fam Zheng > >>> > >>>--- > >>>This applies on top of Stefan's "dataplane: use QEMU block layer" > >>>series. > >>> > >>>Signed-off-by: Fam Zheng > >>>--- > >>>hw/block/dataplane/virtio-blk.c | 6 ------ > >>>hw/block/virtio-blk.c | 9 ++++++++- > >>>2 files changed, 8 insertions(+), 7 deletions(-) > >>> > >>>diff --git a/hw/block/dataplane/virtio-blk.c b/hw/block/dataplane/virtio-blk.c > >>>index 79fb612..46a6824 100644 > >>>--- a/hw/block/dataplane/virtio-blk.c > >>>+++ b/hw/block/dataplane/virtio-blk.c > >>>@@ -332,12 +332,6 @@ void virtio_blk_data_plane_create(VirtIODevice *vdev, VirtIOBlkConf *blk, > >>> return; > >>> } > >>> > >>>- if (blk->config_wce) { > >>>- error_setg(errp, "device is incompatible with x-data-plane, " > >>>- "use config-wce=off"); > >>>- return; > >>>- } > >>>- > >>> /* If dataplane is (re-)enabled while the guest is running there could be > >>> * block jobs that can conflict. > >>> */ > >>>diff --git a/hw/block/virtio-blk.c b/hw/block/virtio-blk.c > >>>index 8a568e5..a031e56 100644 > >>>--- a/hw/block/virtio-blk.c > >>>+++ b/hw/block/virtio-blk.c > >>>@@ -26,6 +26,7 @@ > >>># include > >>>#endif > >>>#include "hw/virtio/virtio-bus.h" > >>>+#include "block/block_int.h" > >> > >>You shouldn't need to include this header file. Apart from this, the patch > >>looks good. > > > >It's for bdrv_get_aio_context, otherwise it doesn't compile. > > I think it should be moved to block/block.h then. Stefan? Agreed, I was just about to reply the same thing at the top level of the thread :). block_int.h is for internal block layer functions that are used by the core or block drivers. Emulated devices must not use block_int.h (and we'll fix files that do). Stefan