From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47192) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VR1DD-0006DB-GF for qemu-devel@nongnu.org; Tue, 01 Oct 2013 10:46:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VR1D7-0003yI-Tw for qemu-devel@nongnu.org; Tue, 01 Oct 2013 10:46:07 -0400 Received: from mx1.redhat.com ([209.132.183.28]:45079) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VR1D7-0003y1-KM for qemu-devel@nongnu.org; Tue, 01 Oct 2013 10:46:01 -0400 Message-ID: <524AE025.9040203@redhat.com> Date: Tue, 01 Oct 2013 08:45:57 -0600 From: Eric Blake MIME-Version: 1.0 References: <1380154568-5339-1-git-send-email-xiawenc@linux.vnet.ibm.com> <1380154568-5339-3-git-send-email-xiawenc@linux.vnet.ibm.com> In-Reply-To: <1380154568-5339-3-git-send-email-xiawenc@linux.vnet.ibm.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="Uo8HdmD2ClCsSFVg5I4SNpaTs15W58tGS" Subject: Re: [Qemu-devel] [PATCH V3 2/7] qemu-nbd: support internal snapshot export List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Wenchao Xia Cc: kwolf@redhat.com, pbonzini@redhat.com, qemu-devel@nongnu.org, stefanha@gmail.com This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --Uo8HdmD2ClCsSFVg5I4SNpaTs15W58tGS Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 09/25/2013 06:16 PM, Wenchao Xia wrote: > Now it is possible to directly export an internal snapshot, which > can be used to probe the snapshot's contents without qemu-img > convert. >=20 > Signed-off-by: Wenchao Xia > --- > block/snapshot.c | 18 ++++++++++++++++++ > include/block/snapshot.h | 6 ++++++ > qemu-nbd.c | 35 ++++++++++++++++++++++++++++++++++- > 3 files changed, 58 insertions(+), 1 deletions(-) Woo-hoo! Long desired. It would be even cooler if we could set up the export directly from a running qemu instance, rather than having to spawn an external qemu-nbd process (after all, we've already documented that having more than one process directly using the same qcow2 file is not safe), but this is a step in the right direction. > @@ -328,6 +331,8 @@ int main(int argc, char **argv) > { "connect", 1, NULL, 'c' }, > { "disconnect", 0, NULL, 'd' }, > { "snapshot", 0, NULL, 's' }, > + { "load-snapshot", 1, NULL, 'l' }, > + { "load-snapshot1", 1, NULL, 'L' }, Uggh. This makes getopt_long's unambiguous-prefix handling very hard to use. For example, --dis is recognized as short for --disconnect; but here --load is NOT short for --load-snapshot, because it could also be short for --load-snapshot1. And why the 1 suffix? Can you come up with a better name that distinguishes why you have to have two different long options, and which doesn't overlap on as much of a common prefix? --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --Uo8HdmD2ClCsSFVg5I4SNpaTs15W58tGS 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/ iQEcBAEBCAAGBQJSSuAlAAoJEKeha0olJ0NqVjEH/ROyOUdaqQT5RW7iMUOW3P6E IJUybcBE03DrIqCLb3M20mmCxCwObxIgZNXpYGrZmiwR5GVAk/sptuzcyaVBER6p ZhIyld+xjN0v2twHZ3aD7KtPjUsvKL7i24AAHAMceX6qpIR+pHrzCH5Wd3zxbqtV dV3MPNDGRNcimm2raZ7Sw2/J5s64kxcck6ZeIQJ4x4UYGKTIo9gXLKKrWPHUz8P7 Leg6Qz45iBRKWxDBsyWFEwMJAKMsFJONJvFp/mw1a6QMGAY2iYcp1wOEhDwUJKPU PpQpWhz4m65JgNeBz/o3h9d7ddNogOuFlXvC5v2OJXOAdWOPdlV1WuOdCfho9/A= =m4ap -----END PGP SIGNATURE----- --Uo8HdmD2ClCsSFVg5I4SNpaTs15W58tGS--