Received: from eggs.gnu.org ([2001:4830:134:3::10]:47158) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bHZVq-0002SA-NB for qemu-devel@nongnu.org; Mon, 27 Jun 2016 12:35:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bHZVm-00067v-Mb for qemu-devel@nongnu.org; Mon, 27 Jun 2016 12:35:54 -0400 Received: from mx1.redhat.com ([209.132.183.28]:60607) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bHZVm-00067j-Dn for qemu-devel@nongnu.org; Mon, 27 Jun 2016 12:35:50 -0400 References: <1466152443-15660-1-git-send-email-lma@suse.com> <1466152443-15660-2-git-send-email-lma@suse.com> From: Max Reitz Message-ID: <3202da3d-a115-e254-4a37-cb633bdc6595@redhat.com> Date: Mon, 27 Jun 2016 18:35:46 +0200 MIME-Version: 1.0 In-Reply-To: <1466152443-15660-2-git-send-email-lma@suse.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="Rt5rJrQRaV3S04tRM55JVMWw5VVdvI21a" Subject: Re: [Qemu-devel] [PATCH 1/2 V2] hmp: use snapshot name to determine whether a snapshot is 'fully available' List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Lin Ma , kwolf@redhat.com, qemu-devel@nongnu.org This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --Rt5rJrQRaV3S04tRM55JVMWw5VVdvI21a From: Max Reitz To: Lin Ma , kwolf@redhat.com, qemu-devel@nongnu.org Message-ID: <3202da3d-a115-e254-4a37-cb633bdc6595@redhat.com> Subject: Re: [Qemu-devel] [PATCH 1/2 V2] hmp: use snapshot name to determine whether a snapshot is 'fully available' References: <1466152443-15660-1-git-send-email-lma@suse.com> <1466152443-15660-2-git-send-email-lma@suse.com> In-Reply-To: <1466152443-15660-2-git-send-email-lma@suse.com> Content-Type: text/plain; charset=iso-8859-15 Content-Transfer-Encoding: quoted-printable On 17.06.2016 10:34, Lin Ma wrote: > Currently qemu uses snapshot id to determine whether a snapshot is full= y > available, It causes incorrect output in some scenario. >=20 > For instance: > (qemu) info block > drive_image1 (#block113): /opt/vms/SLES12-SP1-JeOS-x86_64-GM/disk0.qcow= 2 > (qcow2) > Cache mode: writeback >=20 > drive_image2 (#block349): /opt/vms/SLES12-SP1-JeOS-x86_64-GM/disk1.qcow= 2 > (qcow2) > Cache mode: writeback > (qemu) > (qemu) info snapshots > There is no snapshot available. > (qemu) > (qemu) snapshot_blkdev_internal drive_image1 snap1 > (qemu) > (qemu) info snapshots > There is no suitable snapshot available > (qemu) > (qemu) savevm checkpoint-1 > (qemu) > (qemu) info snapshots > ID TAG VM SIZE DATE VM CLOC= K > 1 snap1 0 2016-05-22 16:57:31 00:01:30.56= 7 > (qemu) >=20 > $ qemu-img snapshot -l disk0.qcow2 > Snapshot list: > ID TAG VM SIZE DATE VM CLOC= K > 1 snap1 0 2016-05-22 16:57:31 00:01:30.56= 7 > 2 checkpoint-1 165M 2016-05-22 16:58:07 00:02:06.81= 3 >=20 > $ qemu-img snapshot -l disk1.qcow2 > Snapshot list: > ID TAG VM SIZE DATE VM CLOC= K > 1 checkpoint-1 0 2016-05-22 16:58:07 00:02:06.81= 3 >=20 > The patch uses snapshot name instead of snapshot id to determine whethe= r a > snapshot is fully available and uses '--' instead of snapshot id in out= put > because the snapshot id is not guaranteed to be the same on all images.= > For instance: > (qemu) info snapshots > List of snapshots present on all disks: > ID TAG VM SIZE DATE VM CLO= CK > -- checkpoint-1 165M 2016-05-22 16:58:07 00:02:06.8= 13 >=20 > Signed-off-by: Lin Ma > --- > migration/savevm.c | 6 +++++- > 1 file changed, 5 insertions(+), 1 deletion(-) Reviewed-by: Max Reitz --Rt5rJrQRaV3S04tRM55JVMWw5VVdvI21a Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEvBAEBCAAZBQJXcVXiEhxtcmVpdHpAcmVkaGF0LmNvbQAKCRA7sUIC6DisrbfA B/9nzX67g9o3ToKiQ/X5Mb3cw9tZDPGCoIP263ja7G861Noq/npytUiCPEeS+Pb2 xSZgG+8UwKVbvkV4hFDC6jKdtxls8Vf9WqEBi27CRn6f83/PNsux2nCEK/p5a/UG QjyrQ59WVkZAyErRGIDzsv2Xxi1B02fDvpDBcuVwTlNrKBM1NQJ2JrsOkEVUL2a6 LggOJth4T2u3sg5wlNLP/n5sSlCDzhnUtij8NxcMquChNpuId59URM4/WHwpThMy gCNy6fzc8wTiRpnPigbjjOhZPR+XsBR1K4vKptbSF7H7+4WIyClwJb7UN42xI1W6 o5keGCG4zKP1Go3m4NJfIFpD =7Wuh -----END PGP SIGNATURE----- --Rt5rJrQRaV3S04tRM55JVMWw5VVdvI21a--