diff options
author | Eric Blake <eblake@redhat.com> | 2019-01-17 13:36:47 -0600 |
---|---|---|
committer | Eric Blake <eblake@redhat.com> | 2019-01-21 15:49:52 -0600 |
commit | 2df94eb52b68d16f8a050bc28dd94a8c7d3366ec (patch) | |
tree | efc17966d9a61729797aabf35924bea4ff5a35e1 /block | |
parent | 6dc1667d6881add34e9bad48ac2a848134ea8a6d (diff) |
nbd/client: Change signature of nbd_negotiate_simple_meta_context()
Pass 'info' instead of three separate parameters related to info,
when requesting the server to set the meta context. Update the
NBDExportInfo struct to rename the received id field to match the
fact that we are currently overloading the field to match whatever
context the user supplied through the x-dirty-bitmap hack, as well
as adding a TODO comment to remind future patches about a desire
to request two contexts at once.
Signed-off-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Richard W.M. Jones <rjones@redhat.com>
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Message-Id: <20190117193658.16413-11-eblake@redhat.com>
Diffstat (limited to 'block')
-rw-r--r-- | block/nbd-client.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/block/nbd-client.c b/block/nbd-client.c index 3309376bc1..813539676d 100644 --- a/block/nbd-client.c +++ b/block/nbd-client.c @@ -249,11 +249,11 @@ static int nbd_parse_blockstatus_payload(NBDClientSession *client, } context_id = payload_advance32(&payload); - if (client->info.meta_base_allocation_id != context_id) { + if (client->info.context_id != context_id) { error_setg(errp, "Protocol error: unexpected context id %d for " "NBD_REPLY_TYPE_BLOCK_STATUS, when negotiated context " "id is %d", context_id, - client->info.meta_base_allocation_id); + client->info.context_id); return -EINVAL; } |