[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-block] [PATCH v2 05/17] nbd: Advertise realistic limits to blo
From: |
Stefan Hajnoczi |
Subject: |
Re: [Qemu-block] [PATCH v2 05/17] nbd: Advertise realistic limits to block layer |
Date: |
Mon, 20 Jun 2016 13:14:31 +0100 |
User-agent: |
Mutt/1.6.1 (2016-04-27) |
On Tue, Jun 14, 2016 at 03:30:27PM -0600, Eric Blake wrote:
> We were basing the advertisement of maximum discard and transfer
> length off of UINT32_MAX, but since the rest of the block layer
> has signed int limits on a transaction, nothing could ever reach
> that maximum, and we risk overflowing an int once things are
> converted to byte-based rather than sector-based limits. What's
> more, we DO have a much smaller limit: both the current kernel
> and qemu-nbd have a hard limit of 32M on a read or write
> transaction, and while they may also permit up to a full 32 bits
> on a discard transaction, the upstream NBD protocol is proposing
> wording that without any explicit advertisement otherwise,
> clients should limit ALL requests to the same limits as read and
> write, even though the other requests do not actually require as
> many bytes across the wire. So the better limit to tell the
> block layer is 32M for both values.
>
> Signed-off-by: Eric Blake <address@hidden>
>
> ---
> v2: new patch
> ---
> block/nbd.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
Reviewed-by: Stefan Hajnoczi <address@hidden>
signature.asc
Description: PGP signature
- Re: [Qemu-block] [PATCH v2 04/17] nbd: Allow larger requests, (continued)
- [Qemu-block] [PATCH v2 03/17] block: Fix harmless off-by-one in bdrv_aligned_preadv(), Eric Blake, 2016/06/14
- [Qemu-block] [PATCH v2 05/17] nbd: Advertise realistic limits to block layer, Eric Blake, 2016/06/14
- [Qemu-block] [PATCH v2 11/17] raw-win32: Set request_alignment during .bdrv_refresh_limits(), Eric Blake, 2016/06/14
- [Qemu-block] [PATCH v2 12/17] block: Set request_alignment during .bdrv_refresh_limits(), Eric Blake, 2016/06/14
- [Qemu-block] [PATCH v2 06/17] iscsi: Advertise realistic limits to block layer, Eric Blake, 2016/06/14
- [Qemu-block] [PATCH v2 15/17] block: Switch discard length bounds to byte-based, Eric Blake, 2016/06/14