From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50627) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bylvJ-0006OP-Rm for qemu-devel@nongnu.org; Mon, 24 Oct 2016 16:32:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bylvI-0005om-QR for qemu-devel@nongnu.org; Mon, 24 Oct 2016 16:32:45 -0400 References: <8b945cd9-a601-4c81-495f-c1837f8d8231@redhat.com> From: Eric Blake Message-ID: Date: Mon, 24 Oct 2016 15:32:36 -0500 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="3L8iusbcS5gbGCG3Lnr09VwF7p9FBQ24C" Subject: Re: [Qemu-devel] Assertion failure on qcow2 disk with cluster_size != 64k List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Ed Swierk Cc: qemu-block@nongnu.org, qemu-devel@nongnu.org, Kevin Wolf , "Denis V. Lunev" This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --3L8iusbcS5gbGCG3Lnr09VwF7p9FBQ24C From: Eric Blake To: Ed Swierk Cc: qemu-block@nongnu.org, qemu-devel@nongnu.org, Kevin Wolf , "Denis V. Lunev" Message-ID: Subject: Re: [Qemu-devel] Assertion failure on qcow2 disk with cluster_size != 64k References: <8b945cd9-a601-4c81-495f-c1837f8d8231@redhat.com> In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 10/21/2016 08:14 AM, Ed Swierk wrote: > On Thu, Oct 20, 2016 at 6:38 PM, Eric Blake wrote: >> On 10/20/2016 07:24 PM, Ed Swierk wrote: >>> Changing max_transfer in the normal write case to >>> MIN_NON_ZERO(alignment, MAX_WRITE_ZEROES_BOUNCE_BUFFER) appears to fi= x >>> the problem, but I don't pretend to understand all the subtleties >>> here. >> >> That actually sounds like the right fix. But since the bug was probab= ly >> caused by my code, I'll formalize it into a patch and see if I can >> modify the testsuite to give it coverage. >=20 > If alignment > MAX_WRITE_ZEROES_BOUNCE_BUFFER (however unlikely) we > have the same problem, so maybe this would be better? Our qcow2 support is currently limited to a maximum of 2M clusters; while MAX_WRITE_ZEROES_BOUNCE_BUFFER is 32k * 512, or 16M. The maximum-size bounce buffer should not be the problem here; but for some reason, it looks like alignment is larger than max_transfer which should not normally be possible. I'm still playing with what should be the right patch, but hope to have something posted soon. >=20 > max_transfer =3D alignment > 0 ? alignment : MAX_WRITE_ZEROES_BOUNCE_BU= FFER >=20 > --Ed >=20 --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --3L8iusbcS5gbGCG3Lnr09VwF7p9FBQ24C 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 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJYDm/kAAoJEKeha0olJ0NqrqgH/1t0rU6kseTBN9X8nU70kERK IKwoP9Si80nhMQLi5VxfM/BpgH248DPLekt1zgsH4FnpLwd4LvkELQLpGoQZ5Qvc td4jmMXh6dK4IGBqinm3+fox3HxUNfvy6ccWk0796oYA2XcXXy0WxvMffarKgxje dNd+VNJmYiW9lyou41qnh5DAgW2SzJDYbLZIoV5p+vudtMi9F74t5e/UZRgNNK92 myRU0oYYhoICu9ubw+M0H43WrU/HpK6tAjOd3ayr0X288XUCw4g2IpS4NcLRaCLt KlaTwOTQp0N0WWPSveh4i4bE6/WUUPGjoDnhHD1PvaXMt74WG5C8bFekr4W8aNM= =mrD+ -----END PGP SIGNATURE----- --3L8iusbcS5gbGCG3Lnr09VwF7p9FBQ24C--