From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38613) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b8ws7-0000IM-Is for qemu-devel@nongnu.org; Fri, 03 Jun 2016 17:43:16 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b8ws5-0000Kk-KI for qemu-devel@nongnu.org; Fri, 03 Jun 2016 17:43:14 -0400 References: <1464973388-15821-1-git-send-email-eblake@redhat.com> <1464973388-15821-6-git-send-email-eblake@redhat.com> <5751C32F.3040806@redhat.com> From: Eric Blake Message-ID: <5751F9E8.6090900@redhat.com> Date: Fri, 3 Jun 2016 15:43:04 -0600 MIME-Version: 1.0 In-Reply-To: <5751C32F.3040806@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="D0pQRnBjj50pabT14WvsXxnqq15e8scRl" 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: qemu-devel@nongnu.org Cc: kwolf@redhat.com, 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) --D0pQRnBjj50pabT14WvsXxnqq15e8scRl Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 06/03/2016 11:49 AM, Eric Blake wrote: > On 06/03/2016 11:03 AM, Eric Blake wrote: >> It makes more sense to have ALL block size limit constraints >> in the same struct. Improve the documentation while at it. >> >> Note that bdrv_refresh_limits() has to keep things alive across >> a memset() of BlockLimits. >> >> Signed-off-by: Eric Blake >> --- >> include/block/block_int.h | 12 ++++++++---- >> block.c | 4 ++-- >> block/blkdebug.c | 4 ++-- >> block/bochs.c | 2 +- >> block/cloop.c | 2 +- >> block/dmg.c | 2 +- >> block/io.c | 12 +++++++----- >> block/iscsi.c | 2 +- >> block/raw-posix.c | 16 ++++++++-------- >> block/raw-win32.c | 6 +++--- >> block/vvfat.c | 2 +- >> 11 files changed, 35 insertions(+), 29 deletions(-) >=20 > Something in this patch is causing qemu-iotests 77 to infloop; we may > decide it is just easier to drop this patch rather than find all the > places where the request_alignment must be preserved across what > otherwise zeroes out limits. Found it; squash this in (or use it as an argument why we don't want request_alignment in bs->bl after all): 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; } static int raw_truncate(BlockDriverState *bs, int64_t offset) --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --D0pQRnBjj50pabT14WvsXxnqq15e8scRl 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/ iQEcBAEBCAAGBQJXUfnoAAoJEKeha0olJ0NqcccH/1u/B4m7eGYJtgDMlrpyNQAH nUUM+KIlzD753aJYrWczQ0myWskxnVRyZ3Y9dsy0WP/H/1nrWId2qcWDJi+AKbdH 9NtqI41lXwJuivnYwLobNdvWbQkVA8/NpNlzpnb5s6c7iuNSNlvuNBkENMGYP02Z vzCv675ZCQZG/YDOKTlmaHm+iuYltiUK+O616iwZLy0g009iZwyY+r5amXsbj+p+ Ic5y/crkbxGkKMjZyPnYcWy6OX1PIB2Mt47+wpwWEDzwzvwq6Qz4MG+UWUiWXqxb x+I9pemV05cMZFLsM5qgtiTbZUBLbkbS/5aZK/vcVfSMwVx0LOnhSE+gBSslh10= =5eX4 -----END PGP SIGNATURE----- --D0pQRnBjj50pabT14WvsXxnqq15e8scRl--