From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53059) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZtdIn-0001Fy-H6 for qemu-devel@nongnu.org; Tue, 03 Nov 2015 10:15:18 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZtdIh-0002tv-Th for qemu-devel@nongnu.org; Tue, 03 Nov 2015 10:15:13 -0500 References: <57b814541d2dc6c435680eb119e09cacaa7badbb.1446546057.git.berto@igalia.com> From: Eric Blake Message-ID: <5638CF71.2070405@redhat.com> Date: Tue, 3 Nov 2015 08:14:57 -0700 MIME-Version: 1.0 In-Reply-To: <57b814541d2dc6c435680eb119e09cacaa7badbb.1446546057.git.berto@igalia.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="7PfcbmoR09i5hVbuLs4khq6JmcP9Anthb" Subject: Re: [Qemu-devel] [PATCH v3 1/3] block: Disallow snapshots if the overlay doesn't support backing files List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alberto Garcia , qemu-devel@nongnu.org Cc: Kevin Wolf , qemu-block@nongnu.org, Max Reitz This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --7PfcbmoR09i5hVbuLs4khq6JmcP9Anthb Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 11/03/2015 03:32 AM, Alberto Garcia wrote: > This addresses scenarios like this one: >=20 > { 'execute': 'blockdev-add', 'arguments': > { 'options': { 'driver': 'qcow2', > 'node-name': 'new0', > 'file': { 'driver': 'file', > 'filename': 'new.qcow2', > 'node-name': 'file0' } } } } >=20 > { 'execute': 'blockdev-snapshot', 'arguments': > { 'node': 'virtio0', > 'overlay': 'file0' } } >=20 > Signed-off-by: Alberto Garcia > Reviewed-by: Eric Blake > Reviewed-by: Max Reitz > --- > blockdev.c | 5 +++++ > 1 file changed, 5 insertions(+) >=20 > +++ b/blockdev.c > @@ -1667,6 +1667,11 @@ static void external_snapshot_prepare(BlkTransac= tionState *common, > =20 > if (state->new_bs->backing !=3D 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. --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --7PfcbmoR09i5hVbuLs4khq6JmcP9Anthb Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJWOM9xAAoJEKeha0olJ0NqaRwH/RwitMd7PxX4HQOS4mIchICL 7vCaRcpbpEVEY9DP3pWYC3fMSPDwdlpaNLm+BFUNq9AdPRZGJslcnLd90sz/aOJl m+Z/yV1fSR9UW89QLsHzw9lgMLsGYWLSUKCpWZDTsSsmDXAo10I9c7/VOKCOWwsA Ta9sLGnhQn2iANqEgRF78Wdvp4ZoDJu1zn1D37Fb9nyw79+nZYYZbDhOVe/80bwY m95MeWkJsCDo51AnbQBbRshSxBfues9lLguJXYarLFQ0r5hDmT8n/vDclMGLIkdk SxKuBa24rifOk+gQp+n+30VLOA2cw4jJDwvxNlMyrtpWn/unICB5ZQFWN3MAgPw= =oy1B -----END PGP SIGNATURE----- --7PfcbmoR09i5hVbuLs4khq6JmcP9Anthb--