diff options
author | Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> | 2020-04-01 18:01:08 +0300 |
---|---|---|
committer | Eric Blake <eblake@redhat.com> | 2020-05-04 15:16:46 -0500 |
commit | 714eb0dbc5480c8a9d9f39eb931cb5d2acc1b6c6 (patch) | |
tree | 7f630c78e11adb5f33b4ee130e820f424e23bb76 /block | |
parent | 6bf792b4643bd88153b2d473f735f93638cac521 (diff) |
block/nbd-client: drop max_block restriction from discard
The NBD spec was updated (see nbd.git commit 9f30fedb) so that
max_block doesn't relate to NBD_CMD_TRIM. So, drop the restriction.
Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Message-Id: <20200401150112.9557-3-vsementsov@virtuozzo.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
[eblake: tweak commit message to call out NBD commit]
Signed-off-by: Eric Blake <eblake@redhat.com>
Diffstat (limited to 'block')
-rw-r--r-- | block/nbd.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/block/nbd.c b/block/nbd.c index d4d518a780..4ac23c8f62 100644 --- a/block/nbd.c +++ b/block/nbd.c @@ -1955,7 +1955,7 @@ static void nbd_refresh_limits(BlockDriverState *bs, Error **errp) } bs->bl.request_alignment = min; - bs->bl.max_pdiscard = max; + bs->bl.max_pdiscard = QEMU_ALIGN_DOWN(INT_MAX, min); bs->bl.max_pwrite_zeroes = max; bs->bl.max_transfer = max; |