Commit 296dbc72 authored by Wouter Verhelst's avatar Wouter Verhelst Committed by Jens Axboe
Browse files

nbd: correct the maximum value for discard sectors



The version of the NBD protocol implemented by the kernel driver
currently has a 32 bit field for length values. As the NBD protocol uses
bytes as a unit of length, length values larger than 2^32 bytes cannot
be expressed.

Update the max_hw_discard_sectors field to match that.

Signed-off-by: default avatarWouter Verhelst <w@uter.be>
Fixes: 26828324 ("nbd: use the atomic queue limits API in nbd_set_size")
Reviewed-by: default avatarDamien Le Moal <dlemoal@kernel.org>
Cc: Eric Blake <eblake@redhat.Com>
Link: https://lore.kernel.org/r/20240812133032.115134-8-w@uter.be


Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent 41372f5c
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment