• Stefan Hajnoczi's avatar
    nbd: support large NBD requests · 2d821488
    Stefan Hajnoczi authored
    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
    Reported-by: default avatarNick Thomas <nick@bytemark.co.uk>
    Signed-off-by: default avatarStefan Hajnoczi <stefanha@redhat.com>
nbd.c 30.4 KB