qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v2 6/6] nbd: use generic trace subsystem instead


From: Vladimir Sementsov-Ogievskiy
Subject: Re: [Qemu-devel] [PATCH v2 6/6] nbd: use generic trace subsystem instead of TRACE macro
Date: Fri, 7 Jul 2017 17:02:04 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1

06.07.2017 18:44, Eric Blake wrote:
On 06/21/2017 10:34 AM, Vladimir Sementsov-Ogievskiy wrote:
Starting from this patch to enable traces use -trace option of qemu or
-T, --trace option of qemu-img, qemu-io and qemu-nbd. For qemu traces
also can be managed by qmp commands trace-event-{get,set}-state.

Recompilation with CFLAGS=-DDEBUG_NBD is no more needed, furthermore,
DEBUG_NBD macro is removed from the code.

Signed-off-by: Vladimir Sementsov-Ogievskiy <address@hidden>
---
+++ b/nbd/server.c
@@ -441,7 +441,7 @@ static int nbd_negotiate_options(NBDClient *client, Error 
**errp)
          }
          length = be32_to_cpu(length);
- TRACE("Checking option 0x%" PRIx32, clientflags);
+        trace_nbd_negotiate_options_check_option(clientflags);
This variable is a stupid name (it has nothing to do with flags, but is
a single integer representing the option requested by the client). Now's

will use your wording for commit message)

as good as any to rename it to something that makes sense (maybe 'option').

+nbd_negotiate_options_check_option(uint32_t clientflags) "Checking option 0x%" 
PRIx32
and likewise use the saner name in the trace file.  Perhaps as a
separate cleanup patch.


--
Best regards,
Vladimir




reply via email to

[Prev in Thread] Current Thread [Next in Thread]