aboutsummaryrefslogtreecommitdiff
path: root/block
diff options
context:
space:
mode:
Diffstat (limited to 'block')
-rw-r--r--block/nbd.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/block/nbd.c b/block/nbd.c
index 6015e8b537..bf67c8a70b 100644
--- a/block/nbd.c
+++ b/block/nbd.c
@@ -362,8 +362,8 @@ static int nbd_co_flush(BlockDriverState *bs)
static void nbd_refresh_limits(BlockDriverState *bs, Error **errp)
{
- bs->bl.max_discard = UINT32_MAX >> BDRV_SECTOR_BITS;
- bs->bl.max_transfer_length = UINT32_MAX >> BDRV_SECTOR_BITS;
+ bs->bl.max_discard = NBD_MAX_SECTORS;
+ bs->bl.max_transfer_length = NBD_MAX_SECTORS;
}
static int nbd_co_discard(BlockDriverState *bs, int64_t sector_num,