From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37411) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X9Ft4-0000BY-Rx for qemu-devel@nongnu.org; Mon, 21 Jul 2014 11:52:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X9Fsy-0001Df-Ux for qemu-devel@nongnu.org; Mon, 21 Jul 2014 11:52:26 -0400 Received: from mx1.redhat.com ([209.132.183.28]:63965) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X9Fsy-0001DV-N4 for qemu-devel@nongnu.org; Mon, 21 Jul 2014 11:52:20 -0400 Message-ID: <53CD3728.1040904@redhat.com> Date: Mon, 21 Jul 2014 09:52:08 -0600 From: Eric Blake MIME-Version: 1.0 References: <1405802159-2355-1-git-send-email-mreitz@redhat.com> <1405802159-2355-2-git-send-email-mreitz@redhat.com> In-Reply-To: <1405802159-2355-2-git-send-email-mreitz@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="S0tPC9fE7uLVOnNABxe44KMkMP8K5VKOX" Subject: Re: [Qemu-devel] [PATCH 1/2] qemu-img: Allow source cache mode specification List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Max Reitz , qemu-devel@nongnu.org Cc: Kevin Wolf , Peter Lieven , Stefan Hajnoczi This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --S0tPC9fE7uLVOnNABxe44KMkMP8K5VKOX Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 07/19/2014 02:35 PM, Max Reitz wrote: > Many qemu-img subcommands only read the source file(s) once. For these > use cases, a full write-back cache is unnecessary and mainly clutters > host cache memory. Though this is generally no concern as cache memory > is freely available and can be scaled by the host OS, it may become a > concern with thin provisioning. >=20 > For these cases, it makes sense to allow users to freely specify the > source cache mode (e.g. use no cache at all). >=20 > This commit adds a new switch (-T) for the qemu-img subcommands check, > compare, convert and rebase to specify the cache to be used for source > images (the backing file in case of rebase). What mnemonic did you have in mind when choosing -T? Or was it just a universally available letter for the subcommands you were touching? >=20 > Signed-off-by: Max Reitz > --- > qemu-img-cmds.hx | 16 ++++++------ > qemu-img.c | 78 ++++++++++++++++++++++++++++++++++++++++++++----= -------- > qemu-img.texi | 14 +++++++--- > 3 files changed, 80 insertions(+), 28 deletions(-) >=20 > diff --git a/qemu-img-cmds.hx b/qemu-img-cmds.hx > index d029609..5613628 100644 > --- a/qemu-img-cmds.hx > +++ b/qemu-img-cmds.hx > @@ -10,9 +10,9 @@ STEXI > ETEXI > =20 > DEF("check", img_check, > - "check [-q] [-f fmt] [--output=3Dofmt] [-r [leaks | all]] filenam= e") > + "check [-q] [-f fmt] [--output=3Dofmt] [-r [leaks | all]] [-T src= _cache] filename") Might be nice to fix the unintentional double space before -r while touching this line. > DEF("convert", img_convert, > - "convert [-c] [-p] [-q] [-n] [-f fmt] [-t cache] [-O output_fmt] [= -o options] [-s snapshot_id_or_name] [-l snapshot_param] [-S sparse_size]= filename [filename2 [...]] output_filename") > + "convert [-c] [-p] [-q] [-n] [-f fmt] [-t cache] [-T src_cache] [-= O output_fmt] [-o options] [-s snapshot_id_or_name] [-l snapshot_param] [= -S sparse_size] filename [filename2 [...]] output_filename") Oh, maybe you just picked -T for source because -t was already picked for destination? At any rate, seems reasonable. Reviewed-by: Eric Blake --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --S0tPC9fE7uLVOnNABxe44KMkMP8K5VKOX 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 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJTzTcoAAoJEKeha0olJ0Nqa+cH/3ID5yMSRmrg959enDNwEd4M sEgcQ1679RnBNywXwXwE51wB8ykF7k9vTAwi99Qa45SatEIApqbeuzj3XjiGTe2y mY1brDYWMtJK4YsBua5RXT7oIdcsbj0WlRNCBldV1Bb7mLJK6zN9MSEnHm9x6RQi jq6HvL19RL4ONK8jB7HyODTmPKO1KO/UbDrdHdhttGfA+ZNJXot7IsiaGsPXHBv3 Jk4KWsvFDJTSKIIgQHLNe/4zyircI8rtvVWkHnD8JUcKnZ52sgI/JShU3jtibn79 6msc0BX3rFE7kmyr62H5esWfvZYrSGwqA92g3nW25qGlfqeKMpfGjYcZaEUtskY= =AePI -----END PGP SIGNATURE----- --S0tPC9fE7uLVOnNABxe44KMkMP8K5VKOX--