diff options
-rw-r--r-- | block/nbd-client.c | 4 | ||||
-rw-r--r-- | include/block/nbd.h | 1 |
2 files changed, 1 insertions, 4 deletions
diff --git a/block/nbd-client.c b/block/nbd-client.c index 878e879ace..6f6df468fa 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) { diff --git a/include/block/nbd.h b/include/block/nbd.h index b86a976984..36dde24e51 100644 --- a/include/block/nbd.h +++ b/include/block/nbd.h @@ -76,6 +76,7 @@ enum { /* Maximum size of a single READ/WRITE data buffer */ #define NBD_MAX_BUFFER_SIZE (32 * 1024 * 1024) +#define NBD_MAX_SECTORS (NBD_MAX_BUFFER_SIZE / BDRV_SECTOR_SIZE) ssize_t nbd_wr_syncv(QIOChannel *ioc, struct iovec *iov, |