qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] virtio-blk: Allow config-wce in dataplane


From: Paolo Bonzini
Subject: Re: [Qemu-devel] [PATCH] virtio-blk: Allow config-wce in dataplane
Date: Tue, 13 May 2014 11:06:51 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.5.0

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 <address@hidden>

---
This applies on top of Stefan's "dataplane: use QEMU block layer"
series.

Signed-off-by: Fam Zheng <address@hidden>
---
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 <scsi/sg.h>
#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?

Paolo




reply via email to

[Prev in Thread] Current Thread [Next in Thread]