[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v3 3/4] qemu-img: add --shallow option for qemu-img compare
From: |
Eric Blake |
Subject: |
Re: [PATCH v3 3/4] qemu-img: add --shallow option for qemu-img compare |
Date: |
Fri, 29 Oct 2021 15:44:02 -0500 |
User-agent: |
NeoMutt/20211022 |
On Thu, Oct 28, 2021 at 12:24:40PM +0200, Vladimir Sementsov-Ogievskiy wrote:
> Allow compare only top images of backing chains. This is useful to
Allow the comparison of only the top image of backing chains.
> compare images with same backing file or to compare incremental images
> from the chain of incremental backups with "--stat" option.
>
> Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
> Reviewed-by: Hanna Reitz <hreitz@redhat.com>
> ---
> docs/tools/qemu-img.rst | 9 ++++++++-
> qemu-img.c | 8 ++++++--
> qemu-img-cmds.hx | 4 ++--
> 3 files changed, 16 insertions(+), 5 deletions(-)
>
> diff --git a/docs/tools/qemu-img.rst b/docs/tools/qemu-img.rst
> index 9bfdd93d6c..c6e9306c70 100644
> --- a/docs/tools/qemu-img.rst
> +++ b/docs/tools/qemu-img.rst
> @@ -176,6 +176,13 @@ Parameters to compare subcommand:
> - If both files don't specify cluster-size, use default of 64K
> - If only one file specifies cluster-size, just use that.
>
> +.. option:: --shallow
> +
> + This option prevents opening and comparing any backing files.
> + This is useful to compare images with same backing file or to compare
> + incremental images from the chain of incremental backups with
> + ``--stat`` option.
If I understand correctly, your implementation makes --shallow an
all-or-none option (either both images are compared shallow, or
neither is). Does it make sense to make it a per-image option
(--shallow-source, --shallow-dest), where --shallow is a synonym for
the more verbose --shallow-source --shallow-dest?
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3266
Virtualization: qemu.org | libvirt.org