From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:51510) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1USXWd-0006ZP-SS for qemu-devel@nongnu.org; Wed, 17 Apr 2013 14:56:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1USXWb-0006AT-0U for qemu-devel@nongnu.org; Wed, 17 Apr 2013 14:56:11 -0400 Received: from mx1.redhat.com ([209.132.183.28]:63213) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1USXWa-00068z-PK for qemu-devel@nongnu.org; Wed, 17 Apr 2013 14:56:08 -0400 Message-ID: <516EEF10.4060800@redhat.com> Date: Wed, 17 Apr 2013 12:50:56 -0600 From: Eric Blake MIME-Version: 1.0 References: <1365843407-16504-1-git-send-email-xiawenc@linux.vnet.ibm.com> <1365843407-16504-3-git-send-email-xiawenc@linux.vnet.ibm.com> <516DF632.5080803@redhat.com> In-Reply-To: <516DF632.5080803@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="----enig2UJAWUEKKXWRKGLDOGGDI" Subject: Re: [Qemu-devel] [PATCH V12 02/18] block: distinguish id and name in bdrv_find_snapshot() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: kwolf@redhat.com, phrdina@redhat.com, stefanha@gmail.com, armbru@redhat.com, lcapitulino@redhat.com, pbonzini@redhat.com, Wenchao Xia This is an OpenPGP/MIME signed message (RFC 4880 and 3156) ------enig2UJAWUEKKXWRKGLDOGGDI Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 04/16/2013 07:09 PM, Eric Blake wrote: > On 04/13/2013 02:56 AM, Wenchao Xia wrote: >> To make it clear about id and name in searching, the API is changed >> a bit to distinguish them, and caller can choose to search by id or na= me. >> Searching will be done with higher priority of id. This function also >> returns negative value from bdrv_snapshot_list() instead of -ENOENT on= >> error now. >> Note that the logic is changed a bit: now it traverse twice, first s= earch >> for id, second for name, but original code traverse only once to searc= h >> them at the same time, so matching sequence may be different. As a res= ult, >> do_savevm(), del_existing_snapshots(), load_vmsate() may behaviors dif= ferently >> if there are unwisely chosen name mixed with id. In do_info_snapshots(= ), >> the caller is changed to search id only, which should be the correct b= ehavior. >=20 > I just realized that you are trying to do the same thing as Pavel, but > that your two implementations differ. >=20 > https://lists.gnu.org/archive/html/qemu-devel/2013-04/msg03289.html >=20 > Rather than spending my time reviewing two competing versions, it would= > be really nice if one of you could rebase patches on top of the other, > and present a unified series containing both of your improvements as a > single series, so that we are only changing bdrv_snapshot_list semantic= s > once. I ended up reviewing both implementations, and not fully liking either of them, to the point that I proposed yet a third version. I guess we need Kevin or Markus to speak up now... https://lists.gnu.org/archive/html/qemu-devel/2013-04/msg03501.html --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org ------enig2UJAWUEKKXWRKGLDOGGDI 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/ iQEcBAEBCAAGBQJRbu8QAAoJEKeha0olJ0NqtKgIAIox8osrTi7R238/lm9Y5dAb FiOOsLzr/NJdXCZkO0H3ZYIHCQQLdMNbjLsYgUKYmsYNEmSKxRWEQ7kjZhspALHz ccp39nl8ujSAoKscTHJ6kydv9YVuYpzHjzaSlqVAKRrn6duMIKWB+1hEwbYzWfIF BHo8RCtcSDg4XPbVkEIkj7s0gOv5NWbTgV5/oojKmnFpGXnHm92AoUHCp7fWXic5 W2DswRidCJKow5Zz/Ns8vz+zxhSvhEQpaNTN7tm+nM+PzzYlOId5Y/XPH/f6OrKd yXZf6BAY0AZVgJbF42NnpHtTHuRzuJPqZinZF9ZcNFRoDPU5u9AehXfdt74AmnY= =p1Jp -----END PGP SIGNATURE----- ------enig2UJAWUEKKXWRKGLDOGGDI--