From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:60109) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tktl9-0003dF-C8 for qemu-devel@nongnu.org; Tue, 18 Dec 2012 04:46:49 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Tktl8-00081c-39 for qemu-devel@nongnu.org; Tue, 18 Dec 2012 04:46:47 -0500 Received: from mail.univention.de ([82.198.197.8]:1478) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tktl7-00080V-OD for qemu-devel@nongnu.org; Tue, 18 Dec 2012 04:46:46 -0500 From: Philipp Hahn Date: Tue, 18 Dec 2012 10:46:30 +0100 References: <1339767219-24297-1-git-send-email-kwolf@redhat.com> <201212121510.06575.hahn@univention.de> <50C8B6E2.9080306@redhat.com> In-Reply-To: <50C8B6E2.9080306@redhat.com> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart8754259.6AJJfxB5b2"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <201212181046.42577.hahn@univention.de> Subject: Re: [Qemu-devel] [BUG] qemu-1.1.2 [FIXED-BY] qcow2: Fix avail_sectors in cluster allocation code List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Kevin Wolf , Michael Tokarev --nextPart8754259.6AJJfxB5b2 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Hello Kevin, hello Michael, On Wednesday 12 December 2012 17:54:58 Kevin Wolf wrote: > Am 12.12.2012 15:09, schrieb Philipp Hahn: > > Am Mittwoch 12 Dezember 2012 14:41:49 schrieb Kevin Wolf: > >> As you can see in the commit message of that patch I was convinced that > >> no bug did exist in practice and this was only dangerous with respect = to > >> future changes. Therefore my first question is if you're using an > >> unmodified upstream qemu or if some backported patches are applied to > >> it? If it's indeed unmodified, we should probably review the code once > >> again to understand why it makes a difference. > > > > This were all unmodified versions directly from git between > > "qemu-kvm-1.1.0" and "qemu-kvm-1.2.0" > > > > "git checkout b7ab0fea37c15ca9e249c42c46f5c48fd1a0943c" works, > > "git checkout b7ab0fea37c15ca9e249c42c46f5c48fd1a0943c~1" is broken. > > "git checkout qemu-kvm-1.1.2" is broken, > > "git checkout qemu-kvm-1.1.2 ; git cherry-pick > > b7ab0fea37c15ca9e249c42c46f5c48fd1a0943c" works > > Ok, thanks for clarifying. Then I must have missed some interesting case > while doing the patch. I think I found your missing link: After filling in "QCowL2Meta *m", that request ist queued: QLIST_INSERT_HEAD(&s->cluster_allocs, m, next_in_flight); do prevent double allocating the same cluster for overlapping requests, whi= ch=20 is checked in do_alloc_cluster_offset(). I guess that since the sector count was wrong, the overlap detection didn't= =20 work and the two concurrent write requests to the same cluster overwrote ea= ch=20 other. > Ideally we would find a sequence of qemu-io commands to reliably > reproduce this. You're the block guru, so I leave that to you (or anybody else who knows mo= re=20 about the working of qemu-io.) ;-) Sincerely Philipp =2D-=20 Philipp Hahn Open Source Software Engineer hahn@univention.de Univention GmbH be open. fon: +49 421 22 232- 0 Mary-Somerville-Str.1 D-28359 Bremen fax: +49 421 22 232-99 http://www.univention.de/ --nextPart8754259.6AJJfxB5b2 Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) iEYEABECAAYFAlDQO34ACgkQYPlgoZpUDjkE7gCgicjneKGmOU2olyOEpRjFkkxF TkgAn2xEPjGJuRxDTooRN7ZD8O2/f6ak =WrcB -----END PGP SIGNATURE----- --nextPart8754259.6AJJfxB5b2--