From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38199) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bNuQf-000629-QY for qemu-devel@nongnu.org; Fri, 15 Jul 2016 00:08:46 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bNuQe-0002Kl-HP for qemu-devel@nongnu.org; Fri, 15 Jul 2016 00:08:45 -0400 References: <1468017364-25980-1-git-send-email-eblake@redhat.com> <1468017364-25980-2-git-send-email-eblake@redhat.com> From: Eric Blake Message-ID: <578861C4.2080700@redhat.com> Date: Thu, 14 Jul 2016 22:08:36 -0600 MIME-Version: 1.0 In-Reply-To: <1468017364-25980-2-git-send-email-eblake@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="iv6Kn2E6itNGVPHkID3lOduhsWS4tWWbw" Subject: Re: [Qemu-devel] [PATCH v2 1/6] block: Fragment reads to max transfer length List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: kwolf@redhat.com, famz@redhat.com, Stefan Hajnoczi , qemu-block@nongnu.org, Max Reitz This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --iv6Kn2E6itNGVPHkID3lOduhsWS4tWWbw From: Eric Blake To: qemu-devel@nongnu.org Cc: kwolf@redhat.com, famz@redhat.com, Stefan Hajnoczi , qemu-block@nongnu.org, Max Reitz Message-ID: <578861C4.2080700@redhat.com> Subject: Re: [Qemu-devel] [PATCH v2 1/6] block: Fragment reads to max transfer length References: <1468017364-25980-1-git-send-email-eblake@redhat.com> <1468017364-25980-2-git-send-email-eblake@redhat.com> In-Reply-To: <1468017364-25980-2-git-send-email-eblake@redhat.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 07/08/2016 04:35 PM, Eric Blake wrote: > Drivers should be able to rely on the block layer honoring the > max transfer length, rather than needing to return -EINVAL > (iscsi) or manually fragment things (nbd). This patch adds > the fragmentation in the block layer, after requests have been > aligned (fragmenting before alignment would lead to multiple > unaligned requests, rather than just the head and tail). >=20 > The return value was previously nebulous on success (sometimes > zero, sometimes the length read); since we never have a short > read, and since fragmenting may store yet another positive > value in 'ret', change the function to always return the > incoming 'bytes' value on success. >=20 > Signed-off-by: Eric Blake >=20 > --- > v2: Fix uninitialized use of 'ret' for an all-zero read beyond eof Uggh. Something I did here and not in v1 is now causing 'make check-qtest' failures. Please don't merge until I've posted v3. --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --iv6Kn2E6itNGVPHkID3lOduhsWS4tWWbw 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/ iQEcBAEBCAAGBQJXiGHEAAoJEKeha0olJ0Nq8RwH/0h74A7w2Ipbp7yhBS1rSUrE LMeCxAg9t7T1nCaNlXZFyEODrpOj83+i+edm6w0Axbb2hT7Fc7tLrCdZ5HIQNID6 Bng9D5UGnKHsKWYstbhCzvzHd+69kbQt16jdOtdfsDvXTsQ4sB0yM5wieGLUGbgK KN1OIm5gaeeeXa7FTYirgR5Axdil718bemjManiOfV1R7y0/uRkfAknweOuntVOs Urj8kDWh9SghvKcyAqJ1tpdK+tXM+PvrPgHc0zOcIpwO169anjeVGO1EUtcTYPwY iywMys/GPG4Zi+k2uvsainvAis10erEtvWX3lGuFLzee7qqnh9hc3RurN6sy9BU= =KgP1 -----END PGP SIGNATURE----- --iv6Kn2E6itNGVPHkID3lOduhsWS4tWWbw--