From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39072) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ayiWP-0001Kc-3c for qemu-devel@nongnu.org; Fri, 06 May 2016 12:22:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ayiWD-0004rT-Ed for qemu-devel@nongnu.org; Fri, 06 May 2016 12:22:27 -0400 References: <1462419759-14694-1-git-send-email-eblake@redhat.com> <1462419759-14694-6-git-send-email-eblake@redhat.com> <6507af47-341f-a6d4-b03a-2ca89012551d@redhat.com> From: Eric Blake Message-ID: <572CC499.5020801@redhat.com> Date: Fri, 6 May 2016 10:21:45 -0600 MIME-Version: 1.0 In-Reply-To: <6507af47-341f-a6d4-b03a-2ca89012551d@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="38mdMLSjOLH2TCRuWolUl54hA0KI90JV4" Subject: Re: [Qemu-devel] [PATCH v4 5/6] qemu-io: Add 'open -u' to set BDRV_O_UNMAP after the fact List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Max Reitz , qemu-devel@nongnu.org Cc: qemu-block@nongnu.org, kwolf@redhat.com This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --38mdMLSjOLH2TCRuWolUl54hA0KI90JV4 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 05/06/2016 10:08 AM, Max Reitz wrote: > On 05.05.2016 05:42, Eric Blake wrote: >> When opening a file from the command line, qemu-io defaults >> to BDRV_O_UNMAP but allows -d to give full control to disable >> unmaps. But when opening via the 'open' command, qemu-io did >> not set BDRV_O_UNMAP, and had no way to allow it. >> >> Make it at least possible to symmetrically test things: >> 'qemu-io -d ignore' at the CLI now matches 'qemu-io> open' >> in batch mode, and 'qemu-io' or 'qemu-io -d unmap' at >> the CLI matches 'qemu-io> open -u'. >> >> Signed-off-by: Eric Blake >> --- >> qemu-io.c | 8 ++++++-- >> 1 file changed, 6 insertions(+), 2 deletions(-) >=20 > Not sure why you didn't just reuse the -d option for qemu-io itself, bu= t: -d=3Dstring is different than -u (as a binary flag). But you have a point, that being able to fully-specify ALL modes, rather than just turning on a single mode, is more flexible. I'll see how tough it is to fix for v5. --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --38mdMLSjOLH2TCRuWolUl54hA0KI90JV4 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/ iQEcBAEBCAAGBQJXLMSZAAoJEKeha0olJ0Nq260H/1RDRpEQgTIRBPmAOVmmSalL jXZhfqVedpjNhXqhbwP7/mtRb2zy7kXe6ngZ6iwz5+bsI9aIxLL6+ojBkYDv6CEL JRczZtd8qmmoXfaxUXnY0/UQQ7VTPCu0zdrybcGQbxtm8wKay/j/Zf9g/fKtsmFm 0MqDF1rF5bKIbal4OiLbZQrddWB238F2MnVzgXkerIi+LnMTMGEMqWoAQVjy4gMl EJ4eZnR4QhijjGTZtwp26SUvujIfwr2LBPasfjnRlY0cgfwpO6gQFJp2jkrigC9q CaU2ngp55mAUocaL33Q7+AYl0TNDWIdOCli6wk6RSTwz5LDZktToRMJX1+DLRGg= =tL9v -----END PGP SIGNATURE----- --38mdMLSjOLH2TCRuWolUl54hA0KI90JV4--