[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v2 1/6] block: Fragment reads to max transfer le
From: |
Eric Blake |
Subject: |
Re: [Qemu-devel] [PATCH v2 1/6] block: Fragment reads to max transfer length |
Date: |
Thu, 14 Jul 2016 22:08:36 -0600 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 |
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).
>
> 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.
>
> Signed-off-by: Eric Blake <address@hidden>
>
> ---
> 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.
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
- [Qemu-devel] [PATCH v2 0/6] Auto-fragment large transactions at the block layer, Eric Blake, 2016/07/08
- [Qemu-devel] [PATCH v2 1/6] block: Fragment reads to max transfer length, Eric Blake, 2016/07/08
- Re: [Qemu-devel] [PATCH v2 1/6] block: Fragment reads to max transfer length,
Eric Blake <=
- [Qemu-devel] [PATCH v2 3/6] block: Fragment writes to max transfer length, Eric Blake, 2016/07/08
- [Qemu-devel] [PATCH v2 2/6] raw_bsd: Don't advertise flags not supported by protocol layer, Eric Blake, 2016/07/08
- [Qemu-devel] [PATCH v2 4/6] nbd: Rely on block layer to break up large requests, Eric Blake, 2016/07/08
- [Qemu-devel] [PATCH v2 6/6] iscsi: Rely on block layer to break up large requests, Eric Blake, 2016/07/08
- [Qemu-devel] [PATCH v2 5/6] nbd: Drop unused offset parameter, Eric Blake, 2016/07/08
- Re: [Qemu-devel] [Qemu-block] [PATCH v2 0/6] Auto-fragment large transactions at the block layer, Stefan Hajnoczi, 2016/07/14