From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:42478) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UXEkN-000298-89 for qemu-devel@nongnu.org; Tue, 30 Apr 2013 13:53:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UXEkH-0006ER-U4 for qemu-devel@nongnu.org; Tue, 30 Apr 2013 13:53:47 -0400 Received: from mx1.redhat.com ([209.132.183.28]:1035) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UXEkH-0006E0-Ju for qemu-devel@nongnu.org; Tue, 30 Apr 2013 13:53:41 -0400 Message-ID: <518004F9.7040709@redhat.com> Date: Tue, 30 Apr 2013 11:52:57 -0600 From: Eric Blake MIME-Version: 1.0 References: <1366968675-1451-1-git-send-email-xiawenc@linux.vnet.ibm.com> <1366968675-1451-5-git-send-email-xiawenc@linux.vnet.ibm.com> <20130426143418.GA7648@stefanha-thinkpad.redhat.com> <517B4743.4000508@linux.vnet.ibm.com> In-Reply-To: <517B4743.4000508@linux.vnet.ibm.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="----enig2TJLNNFALLAHJKLFPKITW" Subject: Re: [Qemu-devel] [PATCH 4/7] block: distinguish id and name in bdrv_find_snapshot() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Wenchao Xia Cc: kwolf@redhat.com, phrdina@redhat.com, Stefan Hajnoczi , qemu-devel@nongnu.org, lcapitulino@redhat.com, pbonzini@redhat.com, armbru@redhat.com This is an OpenPGP/MIME signed message (RFC 4880 and 3156) ------enig2TJLNNFALLAHJKLFPKITW Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 04/26/2013 09:34 PM, Wenchao Xia wrote: >>> to find the snapshot, instead once, so matching sequence may change >>> if there are unwisely chosen, mixed id and names. >>> 2) In do_savevm(), same with del_existing_snapshot(), when it tries t= o >>> find the snapshot to overwrite, matching sequence may change for same= >>> reason. >>> 3) In load_vmstate(), first when it tries to find the snapshot to be >>> loaded, >>> sequence may change for the same reason of above. Later in >>> validation, the >>> logic is changed to be more strict to require both id and name matchi= ng. >>> 4) In do_info_snapshot(), in validation, the logic is changed to be m= ore >>> strict to require both id and name matching. >> >> It's easy to avoid changing semantics: keep the old name or id behavio= r >> around. Use the new name-and-id behavior for #3 and #4. > You mean adding a new function, instead of change > bdrv_find_snapshot()? That's certainly an option. Although after Pavel's proposed series for adding QMP counterpart to savevm, there are no longer any uses of the old semantics. --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org ------enig2TJLNNFALLAHJKLFPKITW 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.13 (GNU/Linux) Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJRgAT5AAoJEKeha0olJ0NqbAsH/3EvA/Brb0IkJaBsajCQh393 Gaiy36fGkCE47AidNIAjrrWizJT0AuJ9wkLhdYLnI/whp5OPY1FsmXVKwREVxxu+ t5JBHa9nfs4HxONyX4oU1HHgK94RddY284RlnTkGIPCW2chxv2A1PxIT4s1vShBZ J3MOIbCuhy+f5yA+9trpd4JXvh02/MeNBxeXRZN5DvDTfXB2AdxRApVysGB8g8vD sMvPfh0v/rN25dIY+f2sLAHpZ8kuAmvUIhVf8bYswo6+4JACvTuQ3Mc3rcnvX/sR Y02YhkapKgRS7gXKVFbAkPUB+zqv6vIKIOorxPvr2NW2tFotj/Vr5Y7DpqgAgVQ= =qBu6 -----END PGP SIGNATURE----- ------enig2TJLNNFALLAHJKLFPKITW--