[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v2 2/3] block: resize backing image during activ
From: |
Eric Blake |
Subject: |
Re: [Qemu-devel] [PATCH v2 2/3] block: resize backing image during active layer commit, if needed |
Date: |
Tue, 21 Jan 2014 10:00:53 -0700 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 |
On 01/21/2014 09:31 AM, Jeff Cody wrote:
> If the top image to commit is the active layer, and also larger than
> the base image, then an I/O error will likely be returned during
> block-commit.
>
> For instance, if we have a base image with a virtual size 10G, and a
> active layer image of size 20G, then committing the snapshot via
> 'block-commit' will likely fail.
>
> This will automatically attempt to resize the base image, if the
> active layer image to be committed is larger.
>
> Signed-off-by: Jeff Cody <address@hidden>
> ---
> block/mirror.c | 36 ++++++++++++++++++++++++++++++++++++
> 1 file changed, 36 insertions(+)
>
> + if (length > base_length) {
> + if (bdrv_truncate(base, length) < 0) {
> + error_setg(errp, "Top image %s is larger than base image %s, and
> "
> + "resize of base image failed.",
We typically don't use trailing '.' in error messages.
But that's small enough that I'm okay adding:
Reviewed-by: Eric Blake <address@hidden>
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature