From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39423) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VYME7-0005H8-7f for qemu-devel@nongnu.org; Mon, 21 Oct 2013 16:37:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VYME2-0007OK-69 for qemu-devel@nongnu.org; Mon, 21 Oct 2013 16:37:23 -0400 Received: from mx1.redhat.com ([209.132.183.28]:25499) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VYME1-0007O7-TP for qemu-devel@nongnu.org; Mon, 21 Oct 2013 16:37:18 -0400 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r9LKbHPj011189 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 21 Oct 2013 16:37:17 -0400 Message-ID: <52659071.4070003@redhat.com> Date: Mon, 21 Oct 2013 21:37:05 +0100 From: Eric Blake MIME-Version: 1.0 References: <1382298755-21383-1-git-send-email-mreitz@redhat.com> In-Reply-To: <1382298755-21383-1-git-send-email-mreitz@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="JO9rTIluWpmJrFHVAFJ4esMd2P30aiia3" Subject: Re: [Qemu-devel] [PATCH] qcow2: Unset zero_beyond_eof in save_vmstate List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Max Reitz , qemu-devel@nongnu.org Cc: Kevin Wolf , Stefan Hajnoczi This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --JO9rTIluWpmJrFHVAFJ4esMd2P30aiia3 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 10/20/2013 08:52 PM, Max Reitz wrote: > Saving the VM state is done using bdrv_pwrite. This function may perfor= m > a read-modify-write, which in this case results in data being read from= > beyond the end of the virtual disk. Since we are actually trying to > access an area which is not a part of the virtual disk, zero_beyond_eof= > has to be set to false before performing the partial write, otherwise > the VM state may become corrupted. >=20 > Signed-off-by: Max Reitz > --- > Follow-up to (depends on): > - qcow2: Restore total_sectors value in save_vmstate Reviewed-by: Eric Blake Do you have test cases that demonstrate the corruption pre-patch? --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --JO9rTIluWpmJrFHVAFJ4esMd2P30aiia3 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.15 (GNU/Linux) Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJSZZBxAAoJEKeha0olJ0NqNZgH/jf+BVSG894359YH9nqvhM56 Py9cJBVVOtgEBl3WFFwuEhHSFx+roh1paxSW5XnT39vPnsqfieQYQpHZJHX0lA3E mELEN/RdJFVUwTInVeXPN8Io4yTY2w2bZSKm2PdteNAe4Kowgi1OnHsRGo6p2GRN WleUaYvN6PKdNdsE9L1Pr4vQliTRBWwBcWuleadoaZQ2HVzvD/hzo0XEzpllS3fd CWiu40q31oErkYLlPUR6IkEFvkUtoJj/A4AD9XfeS/OdSQ/ifPhTVsr3hns2PmgO U2lRVl2Tbwnr8XW6+dyUi8EtpBBo9OdnLX/jwt0/OLfp25Iql7AWPysiMhl3Yvs= =umqF -----END PGP SIGNATURE----- --JO9rTIluWpmJrFHVAFJ4esMd2P30aiia3--