On Thu, Aug 10, 2023 at 12:37:04PM -0500, Eric Blake wrote:
> Allow a client to request a subset of negotiated meta contexts. For
> example, a client may ask to use a single connection to learn about
> both block status and dirty bitmaps, but where the dirty bitmap
> queries only need to be performed on a subset of the disk; forcing the
> server to compute that information on block status queries in the rest
> of the disk is wasted effort (both at the server, and on the amount of
> traffic sent over the wire to be parsed and ignored by the client).
>
> +nbd_co_block_status_payload_read(NBDClient *client, NBDRequest *request,
> + Error **errp)
> +{
> + int payload_len = request->len;
> + g_autofree char *buf = NULL;
> + size_t count, i, nr_bitmaps;
> + uint32_t id;
> +
> + if (payload_len > NBD_MAX_BUFFER_SIZE) {
> + error_setg(errp, "len (%" PRIu64" ) is larger than max len (%u)",
> + request->len, NBD_MAX_BUFFER_SIZE);
Copy and paste specing bug produces "len (12345678980 ) is larger...",
should be 'PRIu64 ")'; will touch up here and in all other places it
occurs.
--
Eric Blake, Principal Software Engineer
Red Hat, Inc.
Virtualization: qemu.org | libguestfs.org