From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:47031) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UFWPD-000200-G8 for qemu-devel@nongnu.org; Tue, 12 Mar 2013 17:07:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UFWO9-00088d-Ep for qemu-devel@nongnu.org; Tue, 12 Mar 2013 17:06:43 -0400 Received: from mx1.redhat.com ([209.132.183.28]:56751) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UFV8L-0001cc-Nw for qemu-devel@nongnu.org; Tue, 12 Mar 2013 15:45:13 -0400 Message-ID: <513F85C4.9090609@redhat.com> Date: Tue, 12 Mar 2013 13:45:08 -0600 From: Eric Blake MIME-Version: 1.0 References: <1363000996-13221-1-git-send-email-xiawenc@linux.vnet.ibm.com> <1363000996-13221-7-git-send-email-xiawenc@linux.vnet.ibm.com> In-Reply-To: <1363000996-13221-7-git-send-email-xiawenc@linux.vnet.ibm.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="----enig2GIJICGAPFJITOETQJVTN" Subject: Re: [Qemu-devel] [PATCH V9 06/14] 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, stefanha@gmail.com, qemu-devel@nongnu.org, lcapitulino@redhat.com, pbonzini@redhat.com, armbru@redhat.com This is an OpenPGP/MIME signed message (RFC 4880 and 3156) ------enig2GIJICGAPFJITOETQJVTN Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 03/11/2013 05:23 AM, Wenchao Xia wrote: > This patch adds a parameter to tell whether return valid snapshots > for whole VM only. >=20 > Signed-off-by: Wenchao Xia > --- > block/qapi.c | 42 ++++++++++++++++++++++++++++++++++++++++--= > include/block/qapi.h | 1 + > qemu-img.c | 3 ++- > 3 files changed, 43 insertions(+), 3 deletions(-) > + /* 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 (bdrv_can_snapshot(bs1) && bs1 !=3D bs) { Minor optimization - you could rearrange the conjunct and check 'bs1 !=3D= bs' first, to avoid the overhead of bdrv_can_snapshot on bs. But that doesn't stop me from giving: Reviewed-by: Eric Blake --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org ------enig2GIJICGAPFJITOETQJVTN 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/ iQEcBAEBCAAGBQJRP4XFAAoJEKeha0olJ0NqkoYIAKlcr4OiLAwzRtKfP5ZVHtWP 4kmTAbsIKdQSghO2pYIA7b1r47r+93Ruix7Gzak0zc9MPnsKWGGlfThFB1T7zeS/ 2JL6JRmYakK7PNZTLGeKbeRF8kvrhXI0BTd+moc8Nv5a1LSd2VRyq5SpmQo3ALwi WEDUf/mWQsEeAR9nWo7mSQum06hDDqbiSDFTUypTCSb2zxVKjWOIjArcLXxU0NRx nUmE8ufxRznl/OgpzEnxBAIw88XNTmF1SEALT5HWBSWAnUhuvlTReml2ENYTT3Wb WTurxm0f45Gj1k5UgrpkpkdcW0qdqL0tCK4ZKEhhfNNoq8F42ciRAowumm9l+Xg= =TR7C -----END PGP SIGNATURE----- ------enig2GIJICGAPFJITOETQJVTN--