[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-block] [Qemu-devel] [PATCH v3 1/3] block: Disallow snapshots i
From: |
Eric Blake |
Subject: |
Re: [Qemu-block] [Qemu-devel] [PATCH v3 1/3] block: Disallow snapshots if the overlay doesn't support backing files |
Date: |
Tue, 3 Nov 2015 08:14:57 -0700 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 |
On 11/03/2015 03:32 AM, Alberto Garcia wrote:
> This addresses scenarios like this one:
>
> { 'execute': 'blockdev-add', 'arguments':
> { 'options': { 'driver': 'qcow2',
> 'node-name': 'new0',
> 'file': { 'driver': 'file',
> 'filename': 'new.qcow2',
> 'node-name': 'file0' } } } }
>
> { 'execute': 'blockdev-snapshot', 'arguments':
> { 'node': 'virtio0',
> 'overlay': 'file0' } }
>
> Signed-off-by: Alberto Garcia <address@hidden>
> Reviewed-by: Eric Blake <address@hidden>
> Reviewed-by: Max Reitz <address@hidden>
> ---
> blockdev.c | 5 +++++
> 1 file changed, 5 insertions(+)
>
> +++ b/blockdev.c
> @@ -1667,6 +1667,11 @@ static void
> external_snapshot_prepare(BlkTransactionState *common,
>
> if (state->new_bs->backing != NULL) {
> error_setg(errp, "The snapshot already has a backing image");
> + return;
> + }
> +
> + if (!state->new_bs->drv->supports_backing) {
> + error_setg(errp, "The snapshot does not support backing images");
If we do s/snapshot/overlay/ here, the error message will make more
sense (I noticed it in 3/3).
My R-b stands either way, though.
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature