From: Eric Blake <eblake@redhat.com>
To: Max Reitz <mreitz@redhat.com>
Cc: Kevin Wolf <kwolf@redhat.com>,
qemu-devel@nongnu.org, Stefan Hajnoczi <stefanha@redhat.com>
Subject: Re: [Qemu-devel] [PATCH v2 2/3] qcow2: Implement bdrv_amend_options
Date: Thu, 29 Aug 2013 06:45:17 -0600 [thread overview]
Message-ID: <521F425D.5030400@redhat.com> (raw)
In-Reply-To: <1377775241-26278-3-git-send-email-mreitz@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 1688 bytes --]
On 08/29/2013 05:20 AM, Max Reitz wrote:
> Implement bdrv_amend_options for compat, size, backing_file, backing_fmt
> and lazy_refcounts.
>
> Downgrading images from compat=1.1 to compat=0.10 is achieved through
> handling all incompatible flags accordingly, clearing all compatible and
> autoclear flags and expanding all zero clusters.
>
> Signed-off-by: Max Reitz <mreitz@redhat.com>
> ---
> +/*
> + * Expands all zero clusters on the image; important for downgrading to a qcow2
> + * version which doesn't yet support metadata zero clusters.
Do we have to fully write 0 blocks into the image no matter what, or are
there cases where, when the file has a backing image and we know the
backing image has 0 bytes at the same offset, where we could flatten by
removing the cluster and letting the reference defer to the backing
file? It's always safer to write 0 blocks into this image, but it may
be worth considering whether we need the (ability) to try the alternate
method as it results in a smaller file and potentially faster conversion.
> +
> + /* the refcount order might be different in newer images - however, qemu
> + * doesn't support anything different than 4 anyway, so nothing to fix
> + * there */
This sounds risky. Wouldn't it be safer to error out if the image
didn't have a refcount order of 4, than to just ignore it; on the
grounds that if qemu DOES add support for non-4 refcount order, an error
will at least alert someone to the fact that they need to add some
(potentially complicated) code here?
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 621 bytes --]
next prev parent reply other threads:[~2013-08-29 12:45 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-29 11:20 [Qemu-devel] [PATCH v2 0/3] block/qcow2: Image file option amendment Max Reitz
2013-08-29 11:20 ` [Qemu-devel] [PATCH v2 1/3] block: " Max Reitz
2013-08-29 12:38 ` Eric Blake
2013-08-29 12:40 ` Max Reitz
2013-08-29 11:20 ` [Qemu-devel] [PATCH v2 2/3] qcow2: Implement bdrv_amend_options Max Reitz
2013-08-29 12:45 ` Eric Blake [this message]
2013-08-29 12:52 ` Max Reitz
2013-08-29 13:00 ` Kevin Wolf
2013-08-29 11:20 ` [Qemu-devel] [PATCH v2 3/3] qemu-iotest: qcow2 image option amendment Max Reitz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=521F425D.5030400@redhat.com \
--to=eblake@redhat.com \
--cc=kwolf@redhat.com \
--cc=mreitz@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).