From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58768) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZWVR8-0004LK-KX for qemu-devel@nongnu.org; Mon, 31 Aug 2015 16:12:16 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZWVR7-0007bR-IZ for qemu-devel@nongnu.org; Mon, 31 Aug 2015 16:12:14 -0400 References: <457103c2204e849aea3b83ffd78fad049d8d923d.1441014844.git.berto@igalia.com> <55E4B0CC.6070906@redhat.com> <55E4B374.70800@redhat.com> From: Max Reitz Message-ID: <55E4B513.5040600@redhat.com> Date: Mon, 31 Aug 2015 22:12:03 +0200 MIME-Version: 1.0 In-Reply-To: <55E4B374.70800@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="XsTPKolEI0XhA5817IsaC4Rqps1eW0TTf" Subject: Re: [Qemu-devel] [PATCH 1/1] block: Allow passing BlockdevOptions to blockdev-snapshot-sync List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eric Blake , Alberto Garcia , qemu-devel@nongnu.org Cc: Kevin Wolf , qemu-block@nongnu.org, Stefan Hajnoczi This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --XsTPKolEI0XhA5817IsaC4Rqps1eW0TTf Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 31.08.2015 22:05, Eric Blake wrote: > On 08/31/2015 01:53 PM, Max Reitz wrote: >=20 >> Design question: Would it make sense to instead add a "reference" mode= >> to blockdev-snapshot-sync where you can specify a BDS's node-name >> instead of snapshot-file to use an existing BDS as the new top layer, >> ideally an empty one? >=20 > Indeed - then blockdev-add can be used to create an unattached BDS (wit= h > all appropriate options), and blockdev-snapshot-sync would then attach > that BDS as the snapshot-file that wraps an existing BDS (without > needing to worry about options). >=20 >> >> What we'd then need is a QMP command for creating images. But as far a= s >> I know we'll need that anyway sooner or later... >=20 > Can't blockdev-add already be used for that (at least, for supported > file types)? If not, what would it take to get it there? It would take a blockdev-create-image QMP command. :-) blockdev-add only opens existing images, blockdev-create-image would then create these so they can be opened using blockdev-add. Similar to blockdev-add, it would probably have a single parameter, but it'd be of a different type, called e.g. BlockdevCreateOptions, since it has to reflect the creation options instead of the runtime options for opening existing images. For instance, for qcow2 you could set the refcount-bits value, but not the L2 cache size. Max --XsTPKolEI0XhA5817IsaC4Rqps1eW0TTf 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 iQEcBAEBCAAGBQJV5LUTAAoJEDuxQgLoOKytGQ8IAIqG60NtGk3FzB1sW6emuWkC oheY95Refn8TvxFp+aU6Hc6YecDy3n8NXGsvL5yra9ts78j/H5VtgOgG31L2Lo8A NOaiBNITGPvj2Ki0pGzQTx2It78zUwTNjGC30E/qJWTveR6l11WFAY0Khe4FVAmv j5yTJEd3aHBj/a1VgvPjBkcQsJ+qcv6I1azt58fQ9FQcWlZ2Hxb932Qc8Hd9Vzuw MkfyDS5o55SDyts9ag6qQFTa5IGra1gfY8YLNjLATDUgLtrykgdhSWkGyssUvNJq MEY5BORTsmLKaTPmIxkuWu/laxwXgfhhkCIjXPTqeDlk7xfJ25ZFL/xT1fg9Fmw= =7rxh -----END PGP SIGNATURE----- --XsTPKolEI0XhA5817IsaC4Rqps1eW0TTf--