Message ID | 1466721446-27737-6-git-send-email-eblake@redhat.com |
---|---|
State | New |
Headers | show |
diff --git a/block/nbd.c b/block/nbd.c index 6015e8b..bf67c8a 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,