qemu-block
[Top][All Lists]
Advanced

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

Re: [Qemu-block] [PATCH v10 01/10] allow writing to the backing file


From: Eric Blake
Subject: Re: [Qemu-block] [PATCH v10 01/10] allow writing to the backing file
Date: Fri, 9 Oct 2015 13:07:30 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0

On 09/25/2015 12:17 AM, Wen Congyang wrote:
> For block replication, we have such backing chain:
>     secondary disk <-- hidden disk <-- active disk
> secondary disk is top BDS(use bacing reference), so it can be opened in

s/BDS(use bacing/BDS (use backing/

> read-write mode. But hidden disk is read only, and we need to write to
> hidden disk(backup job will write data to it).

s/disk(/disk (/

> 
> TODO: support opening backing file in read-write mode if the BDS is
> created by QMP command blockdev-add.
> 
> Signed-off-by: Wen Congyang <address@hidden>
> Signed-off-by: zhanghailiang <address@hidden>
> Signed-off-by: Gonglei <address@hidden>
> ---
>  block.c | 41 ++++++++++++++++++++++++++++++++++++++++-
>  1 file changed, 40 insertions(+), 1 deletion(-)
> 

I really don't like this patch.  We are able to automatically (re-)open
backing files for write during block-commit, without having to expose a
knob to the user then, so exposing a knob to the user here feels wrong.

> +#define ALLOW_WRITE_BACKING_FILE    "allow-write-backing-file"
> +static QemuOptsList backing_file_opts = {
> +    .name = "backing_file",
> +    .head = QTAILQ_HEAD_INITIALIZER(backing_file_opts.head),
> +    .desc = {
> +        {
> +            .name = ALLOW_WRITE_BACKING_FILE,
> +            .type = QEMU_OPT_BOOL,
> +            .help = "allow writes to backing file",
> +        },

And even if we DO need this knob (which I doubt), you need corresponding
documentation of the knob in qapi/block-core.json, since we are trying
to keep the command line and QMP in sync when it comes to adding new
options.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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