qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Fam Zheng <famz@redhat.com>
Cc: qemu-devel@nongnu.org, Stefan Hajnoczi <stefanha@redhat.com>
Subject: Re: [Qemu-devel] [PATCH] virtio-blk: Allow config-wce in dataplane
Date: Tue, 13 May 2014 11:06:51 +0200	[thread overview]
Message-ID: <5371E0AB.9010509@redhat.com> (raw)
In-Reply-To: <20140513071314.GB26360@T430.nay.redhat.com>

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 <famz@redhat.com>
>>>
>>> ---
>>> This applies on top of Stefan's "dataplane: use QEMU block layer"
>>> series.
>>>
>>> Signed-off-by: Fam Zheng <famz@redhat.com>
>>> ---
>>> 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	other threads:[~2014-05-13  9:07 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-13  2:24 [Qemu-devel] [PATCH] virtio-blk: Allow config-wce in dataplane Fam Zheng
2014-05-13  7:07 ` Paolo Bonzini
2014-05-13  7:13   ` Fam Zheng
2014-05-13  9:06     ` Paolo Bonzini [this message]
2014-05-13 14:10       ` Stefan Hajnoczi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5371E0AB.9010509@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=famz@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).