qemu-block
[Top][All Lists]
Advanced

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

Re: [PATCH v3 6/9] qemu-img: Add bitmap sub-command


From: Eric Blake
Subject: Re: [PATCH v3 6/9] qemu-img: Add bitmap sub-command
Date: Mon, 11 May 2020 13:22:58 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0

On 5/11/20 6:10 AM, Max Reitz wrote:
On 08.05.20 20:03, Eric Blake wrote:
Include actions for --add, --remove, --clear, --enable, --disable, and
--merge (note that --clear is a bit of fluff, because the same can be
accomplished by removing a bitmap and then adding a new one in its
place, but it matches what QMP commands exist).  Listing is omitted,
because it does not require a bitmap name and because it was already
possible with 'qemu-img info'.  A single command line can play one or
more bitmap commands in sequence on the same bitmap name (although all
added bitmaps share the same granularity, and and all merged bitmaps
come from the same source file).  Merge defaults to other bitmaps in
the primary image, but can also be told to merge bitmaps from a
distinct image.

For the record: Yes, my comment was mostly about my confusion around the
{}.  So just replacing them by () would have pacified me.

But this is more fun, of course.


+++ b/docs/tools/qemu-img.rst
@@ -281,6 +281,29 @@ Command description:

[...]

+  Additional options ``-g`` set a non-default *GRANULARITY* for

sets?

Or maybe:

Additional options include ``-g`` which sets a non-default *GRANULARITY* for ``--add``, and ``-b`` and ``-F`` which select an alternative source file for all *SOURCE* bitmaps used by ``--merge``.

And in writing this, I just realized - even though you _can_ use --add more than once in a command line, the command is still limited to operating on a single bitmap name, so unless you write contortions like:

qemu-img bitmap --add --remove --add -g 1024 file.qcow2 bitmapname

there will normally be at most one --add operation for a -g to be used with (because otherwise the second --add will fail when attempting to create an already-existing bitmap name).


With that fixed (or maybe not, you know that better than me):

Reviewed-by: Max Reitz <address@hidden>



--
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3226
Virtualization:  qemu.org | libvirt.org




reply via email to

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