qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v4 3/4] block: add a 'blockdev-snapshot' QMP com


From: Alberto Garcia
Subject: Re: [Qemu-devel] [PATCH v4 3/4] block: add a 'blockdev-snapshot' QMP command
Date: Tue, 22 Sep 2015 11:21:28 +0200
User-agent: Notmuch/0.13.2 (http://notmuchmail.org) Emacs/23.2.1 (i486-pc-linux-gnu)

On Fri 18 Sep 2015 04:49:06 PM CEST, Eric Blake <address@hidden> wrote:

>> +# @BlockdevSnapshot
>> +#
>> +# @device: device or node name to generate the snapshot from.
>
> I'm still wondering if 'node' is a better name than 'device' here.

I don't have a strong preference. Kevin, Max, ... any opinions?

>> +#
>> +# @snapshot: reference to the existing block device that will be used
>> +#            for the snapshot. It must not have a current backing file
>> +#            (this can be achieved by passing "backing": "" to
>> +#            blockdev-add).
>
> Possibly confusing terminology.
>
> Let's consider: the act of creating a snapshot says to go from:
>
> image1 [read-write]
>
> to
>
> image1 [read-only] <- image2 [read-write]
>
> that is, image1 is now the snapshot of the state in time we executed the
> command, and image2 is the delta from what happened since the snapshot.
>  Therefore, image2 is NOT the snapshot.  Naming the command
> 'blockdev-snapshot' is fine, but I think we can have better names for
> the arguments.
>
> Better wording might be:
>
> @device: device or node that will have a snapshot created
>
> @overlay: reference to existing block device that will become the
> overlay of device, as part of creating the snapshot. It must not have
> a current backing file...

I think you are right. I'll update the descriptions as you suggest.

The problem is that, incorrectly or not, we are already using 'snapshot'
to refer to the overlays, e.g in BlockdevSnapshotSync:

# @device: #optional the name of the device to generate the snapshot
#                    from.
# @node-name: #optional graph node name to generate the snapshot from
#                       (Since 2.0)
# @snapshot-file: the target of the new image. A new file will be
#                 created.
# @snapshot-node-name: #optional the graph node name of the new image
#                                (Since 2.0)

I'll wait a bit in case someone wants to say something about the names
of the parameters.

Berto



reply via email to

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