From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48937) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xgd9O-0007Xm-Ix for qemu-devel@nongnu.org; Tue, 21 Oct 2014 13:23:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Xgd9J-0001bR-L0 for qemu-devel@nongnu.org; Tue, 21 Oct 2014 13:23:14 -0400 Received: from mx1.redhat.com ([209.132.183.28]:54878) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xgd9J-0001bL-Ca for qemu-devel@nongnu.org; Tue, 21 Oct 2014 13:23:09 -0400 Message-ID: <5446914B.3010305@redhat.com> Date: Tue, 21 Oct 2014 11:00:59 -0600 From: Eric Blake MIME-Version: 1.0 References: <1413881486-24710-1-git-send-email-mreitz@redhat.com> <1413881486-24710-3-git-send-email-mreitz@redhat.com> In-Reply-To: <1413881486-24710-3-git-send-email-mreitz@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="RVAd3aFDV1HHEagRglPFNtG9PKL1H0QDR" Subject: Re: [Qemu-devel] [PATCH 2/2] block/vdi: Do not use bdrv_pwrite_sync() for bmap List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Max Reitz , qemu-devel@nongnu.org Cc: Kevin Wolf , Stefan Weil , =?UTF-8?B?QmVub8OudCBDYW5ldA==?= , Stefan Hajnoczi This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --RVAd3aFDV1HHEagRglPFNtG9PKL1H0QDR Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 10/21/2014 02:51 AM, Max Reitz wrote: > The bmap can be rather large (maximum blocks per image count: > 0x3fffffff; the bmap has a size of block_count * sizeof(uint32_t) bytes= , > which makes 0xfffffffc bytes) and exceed INT_MAX. Using block layer > functions which take a byte count as an int is therefore not a good > idea. Use bdrv_write()+bdrv_flush() instead of bdrv_pwrite_sync(). >=20 > See: https://bugzilla.redhat.com/show_bug.cgi?id=3D1154940 >=20 > Signed-off-by: Max Reitz > --- > block/vdi.c | 9 ++++++++- > 1 file changed, 8 insertions(+), 1 deletion(-) Reviewed-by: Eric Blake --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --RVAd3aFDV1HHEagRglPFNtG9PKL1H0QDR 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 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg iQEcBAEBCAAGBQJURpFLAAoJEKeha0olJ0NqCYcH/R2xn4gcSBKhJnC0UwLoB0V3 sygCY02qxJpIPm797HxtK/u9QQsz/EZPN1DZGbRwZNWzUuyTFlqa8jNefUgqeY63 qP7kjikfif73B3qXaH1q41GDh0TpqUDlFExAYAIZFjaXDkyabK+fuW6mWSH6COaK /JlcTwVIvy3HuAmZ3rTixnbSF0JdeZP2jygFF+nAf6AoUxmnU0VVSEHPkHIawSR7 anxLThB7EIa3GBkOfY3TP3CgOjsZAMDIdqXqY/jX+N9apkyNqcVL7Hv1SmydT4h/ F2Ex1RD8f/CJfviGCxHF3ncL/vg0kbGBQ5Lrvn/LZHVdyaS4Mpm5JDvHSMG4Iwc= =pwp0 -----END PGP SIGNATURE----- --RVAd3aFDV1HHEagRglPFNtG9PKL1H0QDR--