From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56262) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YzpzQ-0000l2-0q for qemu-devel@nongnu.org; Tue, 02 Jun 2015 13:28:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YzpzO-00082j-Ae for qemu-devel@nongnu.org; Tue, 02 Jun 2015 13:28:35 -0400 Message-ID: <556DE7B2.8020405@redhat.com> Date: Tue, 02 Jun 2015 11:28:18 -0600 From: Eric Blake MIME-Version: 1.0 References: <1432790990-25383-1-git-send-email-famz@redhat.com> <1432790990-25383-3-git-send-email-famz@redhat.com> In-Reply-To: <1432790990-25383-3-git-send-email-famz@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="xupJJBbCrgMIiKVVwHH26VTl4Ob4xMX0I" Subject: Re: [Qemu-devel] [PATCH v6 2/8] qmp: Add optional bool "unmap" to drive-mirror List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Fam Zheng , qemu-devel@nongnu.org Cc: Kevin Wolf , qemu-block@nongnu.org, Jeff Cody , qemu-stable@nongnu.org, Stefan Hajnoczi , pbonzini@redhat.com, jsnow@redhat.com, wangxiaolong@ucloud.cn This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --xupJJBbCrgMIiKVVwHH26VTl4Ob4xMX0I Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 05/27/2015 11:29 PM, Fam Zheng wrote: > If specified as "true", it allows discarding on target sectors where so= urce is > not allocated. >=20 > Signed-off-by: Fam Zheng > --- > +++ b/qapi/block-core.json > @@ -954,6 +954,11 @@ > # @on-target-error: #optional the action to take on an error on the ta= rget, > # default 'report' (no limitations, since this appli= es to > # a different block device than @device). > +# @unmap: #optional Whether to try to unmap target sectors where sourc= e has > +# only zero. If true, and target unallocated sectors will read= as zero, > +# target image sectors will be unmapped; otherwise, zeroes wil= l be > +# written. Both will result in identical contents. > +# Default is true. (Since 2.4) Just making sure I understand: The guest sees identical contents, but with "unmap":true, the host file is potentially sparse, while with "unmap":false, the host file is fully-allocated. Also, while the default is now true, this doesn't tell me what the behavior was in 2.3. Is this a new default behavior (where in 2.3 you could not preserve sparseness), or a new knob (previously you always got a sparse copy, and could not request full allocation)? I'm okay either way, but I'm trying to understand whether libvirt should advertise this knob to higher-level apps, and if so, what libvirt should do when it detects qemu 2.3 (that is, should it tell upper-level apps that sparseness cannot be preserved, or that full allocation cannot be guaranteed, when the "unmap" parameter is not detected). --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --xupJJBbCrgMIiKVVwHH26VTl4Ob4xMX0I 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/ iQEcBAEBCAAGBQJVbeeyAAoJEKeha0olJ0NqxTQH/2d+5GeXyqoGkwCrBXYnx/j5 oVpfdtFon7C6oRoxSstepFrfQs7wnow3+q4FTeBeJfNLJgQInscKBjCct9Jy9NH0 0EJWwLCPZTL9j7qp+AmJ5CZLhkj3u2+DIyz+VVPpNkA9SFndyLkpgbb7N1cLYRgq 08kzaGY0mZZ/wAjVPDv8M6Zd5nbaYSRcjGrf2n5izjGZFZoG1PSfZEwcEsgrlEU4 yItygt+bK4hI4mlGHcEsHG/Y14VqaqA/k9NYn8g3an94gY32Rd8TNq/GCVQhM4pU sVj6JBtDD2z93L8IShxyQMtLJQNA1BD8FoPrVTtD6Tg3JVYsnknaibKCKDwE1eI= =peMH -----END PGP SIGNATURE----- --xupJJBbCrgMIiKVVwHH26VTl4Ob4xMX0I--