From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:52661) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1USZLc-0004oP-27 for qemu-devel@nongnu.org; Wed, 17 Apr 2013 16:52:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1USZLZ-0003jS-RQ for qemu-devel@nongnu.org; Wed, 17 Apr 2013 16:52:55 -0400 Received: from mx1.redhat.com ([209.132.183.28]:51412) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1USZLZ-0003hp-JW for qemu-devel@nongnu.org; Wed, 17 Apr 2013 16:52:53 -0400 Message-ID: <516F0BA0.4060302@redhat.com> Date: Wed, 17 Apr 2013 14:52:48 -0600 From: Eric Blake MIME-Version: 1.0 References: <1365843407-16504-1-git-send-email-xiawenc@linux.vnet.ibm.com> <1365843407-16504-7-git-send-email-xiawenc@linux.vnet.ibm.com> In-Reply-To: <1365843407-16504-7-git-send-email-xiawenc@linux.vnet.ibm.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="----enig2VSVAIBOSBUOGBIDRVSXB" Subject: Re: [Qemu-devel] [PATCH V12 06/18] block: add check for VM snapshot in bdrv_query_snapshot_info_list() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Wenchao Xia Cc: kwolf@redhat.com, phrdina@redhat.com, armbru@redhat.com, qemu-devel@nongnu.org, lcapitulino@redhat.com, stefanha@gmail.com, pbonzini@redhat.com This is an OpenPGP/MIME signed message (RFC 4880 and 3156) ------enig2VSVAIBOSBUOGBIDRVSXB Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 04/13/2013 02:56 AM, Wenchao Xia wrote: > This patch adds a parameter to tell whether return valid snapshots > for whole VM only. > Note that the snapshot check logic is copied from do_info_snapshots()= , > which is different with load_vmstate() and will be changed in next patc= h. >=20 > Signed-off-by: Wenchao Xia > Reviewed-by: Eric Blake > Reviewed-by: Kevin Wolf > --- > + > + /* Check logic is connected with load_vmstate(): > + Only check the devices that can snapshot, other devices that ca= n't > + take snapshot, for example, readonly ones, will be ignored in > + load_vmstate(). */ > + while ((bs1 =3D bdrv_next(bs1))) { > + if (bs1 !=3D bs && bdrv_can_snapshot(bs1)) { > + ret =3D bdrv_snapshot_find(bs1, sn_info, sn->id_str, NULL)= ; This says for a snapshot to be consistent, all block devices must share the same id but can have different names. Is that really true? Or is it backwards from reality? If snapshot ids allocated incrementally per block device, can I use hotplug to create a situation where I have a VM with two disks disk a has snapshot id 1 named 'A', id 2 named 'B' disk b has snapshot id 1 named 'B' where the existing HMP 'loadvm B' should load the snapshot named 'B' from both disks, regardless of the different number, and where snapshot 'A' is inconsistent unless disk b is hot-unplugged? --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org ------enig2VSVAIBOSBUOGBIDRVSXB 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/ iQEcBAEBCAAGBQJRbwugAAoJEKeha0olJ0NqCfAH/AsK1De4/6fvcRU5aBYFBHeV j0pRhbN5/6r0kHxndYV6aKjinmQ7cmC6v6/nXu7MqdSG7JDdQ/gozsfY+79gKi80 SXd2BlvYf3aEa5Wy3cI2BVtBBedl3jPUD7VRKVQ9l9mOEmOoGruT5CU7lHE7QJwF g9iMA9c28XP67G1qVxGml4b5owthXzrZ/6J4vfFxGg5465+ufiKAXCFiqkWmtFun aRV2b3ggq7WsgwTKbLZ7SNIQ06aFwAqFI43EsNIASfKsrs+m721qhVojHszta7Kp h5VyE4eb0G50R/IJALCkCALiJ1SELBMpFDV3A89GuS5YTi7/9PmQnz9wchbien8= =gh61 -----END PGP SIGNATURE----- ------enig2VSVAIBOSBUOGBIDRVSXB--