On 05/23/2018 05:24 AM, Vladimir Sementsov-Ogievskiy wrote:
Return code = 1 doesn't mean that we parsed base:allocation. Move
trace point to appropriate place.

Signed-off-by: Vladimir Sementsov-Ogievskiy <vsement...@virtuozzo.com>
---
  nbd/server.c | 7 +++++--
  1 file changed, 5 insertions(+), 2 deletions(-)


@@ -768,10 +771,10 @@ static int nbd_meta_base_query(NBDClient *client, 
NBDExportMetaContexts *meta,
      }
if (strncmp(query, "allocation", alen) == 0) {
+        trace_nbd_negotiate_meta_query_parse("base:allocation");
          meta->base_allocation = true;
      }

It's probably worth tracing even when we successfully skip the request, as in:

if (strncmp...) {
    trace_nbd_negotiate_meta_query_parse("base:allocation");
    meta->base_allocation = true;
} else {
    trace_nbd_negotiate_meta_query_skip("unrecognized request %s", query);
}

--
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org

Reply via email to