qemu-img: Add convert --bitmaps option
commit1d0dbd1dc0f90a496c77a464374b312440a3b72e
authorEric Blake <eblake@redhat.com>
Wed, 13 May 2020 01:16:47 +0000 (12 20:16 -0500)
committerEric Blake <eblake@redhat.com>
Wed, 20 May 2020 21:48:26 +0000 (20 16:48 -0500)
tree907154333d30580973ba438538fbf14c1609854c
parentd1bed50d40b27690dd0d31076544d053be45df17
qemu-img: Add convert --bitmaps option

Make it easier to copy all the persistent bitmaps of (the top layer
of) a source image along with its guest-visible contents, by adding a
boolean flag for use with qemu-img convert.  This is basically
shorthand, as the same effect could be accomplished with a series of
'qemu-img bitmap --add' and 'qemu-img bitmap --merge -b source'
commands, or by QMP commands.

Note that this command will fail in the same scenarios where 'qemu-img
measure --bitmaps' fails, when either the source or the destanation
lacks persistent bitmap support altogether.

See also https://bugzilla.redhat.com/show_bug.cgi?id=1779893

While touching this, clean up a couple coding issues spotted in the
same function: an extra blank line, and merging back-to-back 'if
(!skip_create)' blocks.

Signed-off-by: Eric Blake <eblake@redhat.com>
Message-Id: <20200513011648.166876-9-eblake@redhat.com>
docs/tools/qemu-img.rst
qemu-img-cmds.hx
qemu-img.c