nbd: support large NBD requests

Enterprise / Virtualization / QEMU - Stefan Hajnoczi [redhat.com] - 3 May 2013 06:05 UTC

The Linux nbd driver recently increased the maximum supported request size up to 32 MB:

commit 078be02b80359a541928c899c2631f39628f56df Author: Michal Belczyk Date: Tue Apr 30 15:28:28 2013 -0700

nbd: increase default and max request sizes

Raise the default max request size for nbd to 128KB (from 127KB) to get it 4KB aligned. This patch also allows the max request size to be increased (via /sys/block/nbd/queue/max_sectors_kb) to 32MB.

QEMU's 1 MB buffers are too small to handle these requests.

This patch allocates data buffers dynamically and allows up to 32 MB per request.

2d82148 nbd: support large NBD requests
include/block/nbd.h | 3 ++-
nbd.c | 17 +++++++++++------
2 files changed, 13 insertions(+), 7 deletions(-)

Upstream: git.qemu.org


  • Share