]> Git Repo - qemu.git/commit
nbd: Rely on block layer to break up large requests
authorEric Blake <[email protected]>
Fri, 15 Jul 2016 18:32:02 +0000 (12:32 -0600)
committerStefan Hajnoczi <[email protected]>
Wed, 20 Jul 2016 13:11:54 +0000 (14:11 +0100)
commitfb1a6de14ab353baa4bc3dfb777e662a26045ca9
treec9660b51c577459759693286876f1a0546d19a5d
parent04ed95f4843281e292d93018d56d4b14705f9f2c
nbd: Rely on block layer to break up large requests

Now that the block layer will honor max_transfer, we can simplify
our code to rely on that guarantee.

The readv code can call directly into nbd-client, just as the
writev code has done since commit 52a4650.

Interestingly enough, while qemu-io 'w 0 40m' splits into a 32M
and 8M transaction, 'w -z 0 40m' splits into two 16M and an 8M,
because the block layer caps the bounce buffer for writing zeroes
at 16M.  When we later introduce support for NBD_CMD_WRITE_ZEROES,
we can get a full 32M zero write (or larger, if the client and
server negotiate that write zeroes can use a larger size than
ordinary writes).

Signed-off-by: Eric Blake <[email protected]>
Reviewed-by: Fam Zheng <[email protected]>
Reviewed-by: Stefan Hajnoczi <[email protected]>
Acked-by: Paolo Bonzini <[email protected]>
Message-id: 1468607524[email protected]
Signed-off-by: Stefan Hajnoczi <[email protected]>
block/nbd-client.c
block/nbd.c
This page took 0.025852 seconds and 4 git commands to generate.