From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47989) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vp0pC-0006xo-FI for qemu-devel@nongnu.org; Fri, 06 Dec 2013 14:12:35 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Vp0p7-0004xa-Ib for qemu-devel@nongnu.org; Fri, 06 Dec 2013 14:12:30 -0500 Received: from mx1.redhat.com ([209.132.183.28]:54574) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vp0p7-0004xJ-91 for qemu-devel@nongnu.org; Fri, 06 Dec 2013 14:12:25 -0500 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id rB6JCOU9000898 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Fri, 6 Dec 2013 14:12:24 -0500 Message-ID: <52A22196.1080707@redhat.com> Date: Fri, 06 Dec 2013 12:12:22 -0700 From: Eric Blake MIME-Version: 1.0 References: <1386350580-5666-1-git-send-email-kwolf@redhat.com> <1386350580-5666-3-git-send-email-kwolf@redhat.com> In-Reply-To: <1386350580-5666-3-git-send-email-kwolf@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="lTcJGCrwqTmHqxhe9TvEdwl7fc4hgRfbr" Subject: Re: [Qemu-devel] [RFC PATCH 02/19] block: Detect unaligned length in bdrv_qiov_is_aligned() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kevin Wolf , qemu-devel@nongnu.org Cc: pbonzini@redhat.com, armbru@redhat.com, stefanha@redhat.com This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --lTcJGCrwqTmHqxhe9TvEdwl7fc4hgRfbr Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 12/06/2013 10:22 AM, Kevin Wolf wrote: > For an O_DIRECT request to succeed, it's not only necessary that all > base addresses in the qiov are aligned, but also that each lengh in it s/lengh/length/ > is aligned. >=20 > Signed-off-by: Kevin Wolf > --- > block.c | 3 +++ > 1 file changed, 3 insertions(+) >=20 > diff --git a/block.c b/block.c > index 382ea71..613201b 100644 > --- a/block.c > +++ b/block.c > @@ -4349,6 +4349,9 @@ bool bdrv_qiov_is_aligned(BlockDriverState *bs, Q= EMUIOVector *qiov) > if ((uintptr_t) qiov->iov[i].iov_base % bs->buffer_alignment) = { > return false; > } > + if (qiov->iov[i].iov_len % bs->buffer_alignment) { > + return false; > + } > } > =20 > return true; >=20 --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --lTcJGCrwqTmHqxhe9TvEdwl7fc4hgRfbr 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.4.15 (GNU/Linux) Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJSoiGWAAoJEKeha0olJ0NqnMEH/RFqkv8YVf9njrgu1hbsFmd2 QQgCVYwuYzf7UsC0lxZg37XTRfw+coOlv3TmECDCmNO8LQUVb9iCtoSm4IMWE1lQ 4otLtnquVaYhbd9duA5XZfH9V5HHaAPr/pLUCEo+fGtgvsy1VZVmlUO5bideQvLh zlASZsCeER1nm6jvftyKKBnb+PI/Gs4wFdoMTzd4xOVlqJ8aHJMSLGq+lyY5LZxh phGibnY3CV2EF1VY1hQHrnZkPjIR8i8aWkxN71TlBXE6LvqG6VEb+3oh8L+NmIvF qUoRUaevVpUJ5AFWdhTlzB6i2X6m5I6Pq0tRcGD5/ddbIgC7ZwNhm9ls5G4qtZA= =d+30 -----END PGP SIGNATURE----- --lTcJGCrwqTmHqxhe9TvEdwl7fc4hgRfbr--