From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42665) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VKY4D-0006pT-6J for qemu-devel@nongnu.org; Fri, 13 Sep 2013 14:26:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VKY47-000890-Mu for qemu-devel@nongnu.org; Fri, 13 Sep 2013 14:26:05 -0400 Received: from mx1.redhat.com ([209.132.183.28]:42231) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VKY47-00088t-Da for qemu-devel@nongnu.org; Fri, 13 Sep 2013 14:25:59 -0400 Message-ID: <523358AF.9000504@redhat.com> Date: Fri, 13 Sep 2013 12:25:51 -0600 From: Eric Blake MIME-Version: 1.0 References: <1379067909-22984-1-git-send-email-pl@kamp.de> <1379067909-22984-9-git-send-email-pl@kamp.de> <5232EA90.7030903@redhat.com> In-Reply-To: <5232EA90.7030903@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="F8UVI5lPHBbExxUEd9u26b1clvVhFlsEg" Subject: Re: [Qemu-devel] [PATCH 08/12] qemu-img: conditionally zero out target on convert List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: kwolf@redhat.com, anthony@codemonkey.ws, Peter Lieven , qemu-devel@nongnu.org, ronniesahlberg@gmail.com, stefanha@redhat.com This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --F8UVI5lPHBbExxUEd9u26b1clvVhFlsEg Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 09/13/2013 04:36 AM, Paolo Bonzini wrote: > Il 13/09/2013 12:25, Peter Lieven ha scritto: >> if the target has_zero_init =3D 0, but supports efficiently >> writing zeroes by unmapping we call bdrv_zeroize to >> avoid fully allocating the target. this currently >> is designed especially for iscsi. >> >> Signed-off-by: Peter Lieven >> --- >> qemu-img.c | 22 ++++++++++++++++------ >> 1 file changed, 16 insertions(+), 6 deletions(-) >> >> diff --git a/qemu-img.c b/qemu-img.c >> index 3e5e388..6eaddc6 100644 >> --- a/qemu-img.c >> +++ b/qemu-img.c >> @@ -1354,7 +1354,8 @@ static int img_convert(int argc, char **argv) >> } >> } >> =20 >> - flags =3D BDRV_O_RDWR; >> + flags =3D BDRV_O_RDWR | BDRV_O_UNMAP; >=20 > I think this should be a new command-line flag. I agree - while 'sparse by default' may be reasonable, it is also feasible to want a mode that guarantees expansion rather than unmapped or sparse. --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --F8UVI5lPHBbExxUEd9u26b1clvVhFlsEg Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.14 (GNU/Linux) Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJSM1ivAAoJEKeha0olJ0NqkScH/0/7XIaUGYtZCkvHdOqDQfQo AZ/YJjBmKY32hYuYu7M4bolSXVxYRUfIeTBih2pjvynOgg2NRZ/s0m9FD6L4BMiM 6SdjNRGyFEYGE4zBrFAiCDdAyl/drkAiuPw/0ke+WjXwHvrnv2KgNW8lHzpBoZmo yNvlNDM5gRqw9MQBJh4TAuKfd4apH8Qj/i4eT4Y4UlAOn8zx5VST+zuZN8npq1gF +LMjQuBaTfj1zhp5b/W+WRcMyDmHIwygbqQttI1Hvpy8eXmoPY03IQMta6PMyVWx Z8j+Cr/YxJuXsKs2Oy66/kuz4VlhvjuON90YbWOE2LCUQUrTCAgGAiQKyb0qml8= =9wWY -----END PGP SIGNATURE----- --F8UVI5lPHBbExxUEd9u26b1clvVhFlsEg--