Message ID | 20200504211438.195926-4-eblake@redhat.com |
---|---|
State | New |
Headers | show |
Series | NBD patches through 2020-05-04 | expand |
diff --git a/block/nbd.c b/block/nbd.c index 2160859f6499..d4d518a780c9 100644 --- a/block/nbd.c +++ b/block/nbd.c @@ -1320,9 +1320,7 @@ static int coroutine_fn nbd_client_co_block_status( NBDRequest request = { .type = NBD_CMD_BLOCK_STATUS, .from = offset, - .len = MIN(MIN_NON_ZERO(QEMU_ALIGN_DOWN(INT_MAX, - bs->bl.request_alignment), - s->info.max_block), + .len = MIN(QEMU_ALIGN_DOWN(INT_MAX, bs->bl.request_alignment), MIN(bytes, s->info.size - offset)), .flags = NBD_CMD_FLAG_REQ_ONE, };