On 06/20/2016 05:39 PM, Eric Blake wrote: > We have max_transfer documented in BlockLimits, but while we > honor it during pwrite_zeroes, we were blindly ignoring it > during pwritev and preadv, leading to multiple drivers having > to implement fragmentation themselves. This series moves > fragmentation to the block layer, then fixes the NBD driver to > use it; if you like this but it needs a v2, you can request that > I further do other drivers (I know at least iscsi and qcow2 do > some self-fragmenting and/or error reporting that can be > simplified by deferring fragmentation to the block layer).
iscsi turned out to be easy (see 6/5), but qcow2 is too tricky (we still have to fragment in qcow2_alloc_cluster_offset() if cluster allocation is not contiguous, so there is no one good value of max_transfer to use) > > Prequisite: Kevin's block branch, plus my work on byte-based > block limits (v2 at the moment): > https://lists.gnu.org/archive/html/qemu-devel/2016-06/msg04006.html > > Also available as a tag at: > git fetch git://repo.or.cz/qemu/ericb.git nbd-fragment-v1 > > Eric Blake (5): > block: Fragment reads to max transfer length > block: Fragment writes to max transfer length > raw_bsd: Don't advertise flags not supported by protocol layer > nbd: Rely on block layer to break up large requests > nbd: Drop unused offset parameter > > include/block/nbd.h | 1 - > nbd/nbd-internal.h | 4 +-- > block/io.c | 84 > +++++++++++++++++++++++++++++++++++++++-------------- > block/nbd-client.c | 78 ++++++++++++++----------------------------------- > block/nbd.c | 12 ++------ > block/raw_bsd.c | 6 ++-- > nbd/common.c | 3 +- > 7 files changed, 95 insertions(+), 93 deletions(-) > -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
