From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52788) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bCg8j-0003to-0n for qemu-devel@nongnu.org; Tue, 14 Jun 2016 00:39:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bCg8h-0007SY-Np for qemu-devel@nongnu.org; Tue, 14 Jun 2016 00:39:48 -0400 References: <1464973388-15821-1-git-send-email-eblake@redhat.com> <1464973388-15821-6-git-send-email-eblake@redhat.com> <5751C32F.3040806@redhat.com> <5751F9E8.6090900@redhat.com> <20160607100810.GB4684@noname.str.redhat.com> From: Eric Blake Message-ID: <575F8A87.6000406@redhat.com> Date: Mon, 13 Jun 2016 22:39:35 -0600 MIME-Version: 1.0 In-Reply-To: <20160607100810.GB4684@noname.str.redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="AecTSAEmC8gj2whgSqNqix0xQNv4BxBTn" Subject: Re: [Qemu-devel] [PATCH 5/5] block: Move request_alignment into BlockLimit List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kevin Wolf Cc: qemu-devel@nongnu.org, Fam Zheng , Ronnie Sahlberg , qemu-block@nongnu.org, Peter Lieven , mreitz@redhat.com, Stefan Hajnoczi , Paolo Bonzini This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --AecTSAEmC8gj2whgSqNqix0xQNv4BxBTn Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 06/07/2016 04:08 AM, Kevin Wolf wrote: >> Found it; squash this in (or use it as an argument why we don't want >> request_alignment in bs->bl after all): >=20 > This hunk doesn't make sense to me. For the correctness of the code it > shouldn't make a difference whether the alignment happens before passin= g > the request to file/raw-posix or already in the raw format layer. >=20 > The cause for the hang you're seeing is probably that the request is > already aligned before the blkdebug layer and therefore the blkdebug > events aren't generated any more. That's a problem with the test (I'm > considering the blkdebug events part of the test infrastructure), > however, and not with the code. >=20 Yes, it's definitely a hang caused by the test expecting an unalignment event, but the inheritance chain now causes things to be aligned to begin with and nothing unaligned happens after all. > Kevin >=20 >> diff --git i/block/raw_bsd.c w/block/raw_bsd.c >> index b1d5237..c3c2246 100644 >> --- i/block/raw_bsd.c >> +++ w/block/raw_bsd.c >> @@ -152,7 +152,11 @@ static int raw_get_info(BlockDriverState *bs, >> BlockDriverInfo *bdi) >> >> static void raw_refresh_limits(BlockDriverState *bs, Error **errp) >> { >> + /* Inherit all limits except for request_alignment */ >> + int request_alignment =3D bs->bl.request_alignment; >> + >> bs->bl =3D bs->file->bs->bl; >> + bs->bl.request_alignment =3D request_alignment; Any ideas on how to fix the test, then? Have two blkdebug devices nested atop one another, since those are the devices where we can explicitly override alignment? (normally, you'd _expect_ the chain to inherit the worst-case alignment of all BDS in the chain, so blkdebug is the way around it). That's the only thing left before I repost the series, so I may just post the last patch as RFC and play with it a bit more... --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --AecTSAEmC8gj2whgSqNqix0xQNv4BxBTn 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/ iQEcBAEBCAAGBQJXX4qHAAoJEKeha0olJ0NqIUwH/ROlXk69Zgw3yeRCj63nZ4D/ 4UqCNNbtens0QSSjmW7NkWpsYLGZCjBZtWx0nrW7SZ+t5bpV8BEusSxQnm98wfEk 8Uv4smYu3JfnEU8oDntqiMgVgh73l6iZLjNEdd4T3pohRKzm99UeUSlXXDPnJ98o k42u8tx/3EA393N+uuCXQB2++BEwB5S00Y5PhLIbt6DcTP4suHcp6zVRUr7MnPf8 F2qvckzrDBv247Jo13Ljr5looTpGHHdOLpD+y2EDnLihcf2e//MIrlxqiB0CPuCj /tRXrTogkLA1qWyb9SwirTLYu+5NU6926CmKs6ENaX79cF40tdwhgr+4KGN6Yc0= =b2ll -----END PGP SIGNATURE----- --AecTSAEmC8gj2whgSqNqix0xQNv4BxBTn--