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>
This commit is contained in:
parent
6bf792b464
commit
714eb0dbc5
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user