From 476b923c32ece0e268580776aaf1fab4ab4459a8 Mon Sep 17 00:00:00 2001 From: Eric Blake Date: Thu, 23 Jun 2016 16:37:08 -0600 Subject: nbd: Allow larger requests The NBD layer was breaking up request at a limit of 2040 sectors (just under 1M) to cater to old qemu-nbd. But the server limit was raised to 32M in commit 2d8214885 to match the kernel, more than three years ago; and the upstream NBD Protocol is proposing documentation that without any explicit communication to state otherwise, a client should be able to safely assume that a 32M transaction will work. It is time to rely on the larger sizing, and any downstream distro that cares about maximum interoperability to older qemu-nbd servers can just tweak the value of #define NBD_MAX_SECTORS. Signed-off-by: Eric Blake Reviewed-by: Kevin Wolf Acked-by: Paolo Bonzini Cc: qemu-stable@nongnu.org Reviewed-by: Fam Zheng Reviewed-by: Stefan Hajnoczi Signed-off-by: Kevin Wolf --- block/nbd-client.c | 4 ---- 1 file changed, 4 deletions(-) (limited to 'block') diff --git a/block/nbd-client.c b/block/nbd-client.c index 4d13444409..420bce89f3 100644 --- a/block/nbd-client.c +++ b/block/nbd-client.c @@ -269,10 +269,6 @@ static int nbd_co_writev_1(BlockDriverState *bs, int64_t sector_num, return -reply.error; } -/* qemu-nbd has a limit of slightly less than 1M per request. Try to - * remain aligned to 4K. */ -#define NBD_MAX_SECTORS 2040 - int nbd_client_co_readv(BlockDriverState *bs, int64_t sector_num, int nb_sectors, QEMUIOVector *qiov) { -- cgit v1.2.3