aboutsummaryrefslogtreecommitdiff
path: root/nbd/client.c
diff options
context:
space:
mode:
authorEric Blake <eblake@redhat.com>2017-11-08 15:56:59 -0600
committerEric Blake <eblake@redhat.com>2017-11-09 10:16:45 -0600
commit079d3266c79a41b2b00780f74d1c5e0b1756be95 (patch)
tree004df984d4d92e5b657524ddb5cdff491901dd12 /nbd/client.c
parent1104d83c726d2b20f9cec7b99ab3570a2fdbd46d (diff)
downloadqemu-079d3266c79a41b2b00780f74d1c5e0b1756be95.zip
qemu-079d3266c79a41b2b00780f74d1c5e0b1756be95.tar.gz
qemu-079d3266c79a41b2b00780f74d1c5e0b1756be95.tar.bz2
nbd/client: Nicer trace of structured reply
It's useful to know which structured reply chunk is being processed. Missed in commit d2febedb. Signed-off-by: Eric Blake <eblake@redhat.com> Message-Id: <20171108215703.9295-4-eblake@redhat.com> Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Diffstat (limited to 'nbd/client.c')
-rw-r--r--nbd/client.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/nbd/client.c b/nbd/client.c
index 3d680e6..1880103 100644
--- a/nbd/client.c
+++ b/nbd/client.c
@@ -979,6 +979,7 @@ static int nbd_receive_structured_reply_chunk(QIOChannel *ioc,
int nbd_receive_reply(QIOChannel *ioc, NBDReply *reply, Error **errp)
{
int ret;
+ const char *type;
ret = nbd_read_eof(ioc, &reply->magic, sizeof(reply->magic), errp);
if (ret <= 0) {
@@ -1008,8 +1009,9 @@ int nbd_receive_reply(QIOChannel *ioc, NBDReply *reply, Error **errp)
if (ret < 0) {
break;
}
+ type = nbd_reply_type_lookup(reply->structured.type);
trace_nbd_receive_structured_reply_chunk(reply->structured.flags,
- reply->structured.type,
+ reply->structured.type, type,
reply->structured.handle,
reply->structured.length);
break;