nbd: Allow larger requests
commitab2aac59e8cc7172800864a28f2386d780a08016
authorEric Blake <eblake@redhat.com>
Thu, 23 Jun 2016 22:37:08 +0000 (23 16:37 -0600)
committerMichael Roth <mdroth@linux.vnet.ibm.com>
Fri, 5 Aug 2016 19:34:45 +0000 (5 14:34 -0500)
tree59740130fcec47229a7eb2f121953685c508b6a9
parente19b9ad27ca65bbb8743fda22e4815dfa311f4e2
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 <eblake@redhat.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Acked-by: Paolo Bonzini <pbonzini@redhat.com>
Cc: qemu-stable@nongnu.org
Reviewed-by: Fam Zheng <famz@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
(cherry picked from commit 476b923c32ece0e268580776aaf1fab4ab4459a8)
Conflicts:
include/block/nbd.h

* removed context dependency on 943cec86

Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
block/nbd-client.c
include/block/nbd.h