]> git.proxmox.com Git - qemu.git/commit
nbd: support large NBD requests
authorStefan Hajnoczi <stefanha@redhat.com>
Thu, 2 May 2013 12:23:08 +0000 (14:23 +0200)
committerStefan Hajnoczi <stefanha@redhat.com>
Fri, 3 May 2013 11:05:49 +0000 (13:05 +0200)
commit2d8214885942becb8f4371a66d6f8c9a9580108a
tree64ed61dd1bc57a8a0e6f7481f84934c90bd9c3f1
parente1adb27a83f19799c454cead7bf930a0b3f2bb28
nbd: support large NBD requests

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

  commit 078be02b80359a541928c899c2631f39628f56df
  Author: Michal Belczyk <belczyk@bsd.krakow.pl>
  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<x>/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.

Reported-by: Nick Thomas <nick@bytemark.co.uk>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
include/block/nbd.h
nbd.c