block/nbd-client: drop max_block restriction from block_status

The NBD spec was updated (see nbd.git commit 9f30fedb) so that
max_block doesn't relate to NBD_CMD_BLOCK_STATUS. So, drop the
restriction.

Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Message-Id: <20200401150112.9557-2-vsementsov@virtuozzo.com>
[eblake: tweak commit message to call out NBD commit]
Signed-off-by: Eric Blake <eblake@redhat.com>
This commit is contained in:
Vladimir Sementsov-Ogievskiy 2020-04-01 18:01:07 +03:00 committed by Eric Blake
parent e5ac52d8d4
commit 6bf792b464

View File

@ -1320,9 +1320,7 @@ static int coroutine_fn nbd_client_co_block_status(
NBDRequest request = { NBDRequest request = {
.type = NBD_CMD_BLOCK_STATUS, .type = NBD_CMD_BLOCK_STATUS,
.from = offset, .from = offset,
.len = MIN(MIN_NON_ZERO(QEMU_ALIGN_DOWN(INT_MAX, .len = MIN(QEMU_ALIGN_DOWN(INT_MAX, bs->bl.request_alignment),
bs->bl.request_alignment),
s->info.max_block),
MIN(bytes, s->info.size - offset)), MIN(bytes, s->info.size - offset)),
.flags = NBD_CMD_FLAG_REQ_ONE, .flags = NBD_CMD_FLAG_REQ_ONE,
}; };