mirror of
https://github.com/mii443/qemu.git
synced 2025-12-03 11:08:25 +00:00
nbd: trace meta context negotiation
Having a more detailed log of the interaction between client and server is invaluable in debugging how meta context negotiation actually works. Signed-off-by: Eric Blake <eblake@redhat.com> Message-Id: <20180330130950.1931229-1-eblake@redhat.com> Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
This commit is contained in:
@@ -623,6 +623,7 @@ static int nbd_negotiate_simple_meta_context(QIOChannel *ioc,
|
||||
char *data = g_malloc(data_len);
|
||||
char *p = data;
|
||||
|
||||
trace_nbd_opt_meta_request(context, export);
|
||||
stl_be_p(p, export_len);
|
||||
memcpy(p += sizeof(export_len), export, export_len);
|
||||
stl_be_p(p += export_len, 1);
|
||||
@@ -680,6 +681,7 @@ static int nbd_negotiate_simple_meta_context(QIOChannel *ioc,
|
||||
}
|
||||
g_free(name);
|
||||
|
||||
trace_nbd_opt_meta_reply(context, received_id);
|
||||
received = true;
|
||||
|
||||
/* receive NBD_REP_ACK */
|
||||
|
||||
Reference in New Issue
Block a user