On 10/14/2017 08:01 PM, Eric Blake wrote: > NBD errors were originally sent over the wire based on Linux errno > values; but not all the world is Linux, and not all platforms share > the same values. Since a number isn't very easy to decipher on all > platforms, update the trace messages to include the name of NBD > errors being sent/received over the wire. Tweak the trace messages > to be at the point where we are using the NBD error, not the > translation to the host errno values. > > Signed-off-by: Eric Blake <ebl...@redhat.com> > ---
> +++ b/nbd/trace-events > @@ -29,7 +29,7 @@ nbd_client_loop_ret(int ret, const char *error) "NBD loop > returned %d: %s" > nbd_client_clear_queue(void) "Clearing NBD queue" > nbd_client_clear_socket(void) "Clearing NBD socket" > nbd_send_request(uint64_t from, uint32_t len, uint64_t handle, uint16_t > flags, uint16_t type, const char *name) "Sending request to server: { .from = > %" PRIu64", .len = %" PRIu32 ", .handle = %" PRIu64 ", .flags = 0x%" PRIx16 > ", .type = %" PRIu16 " (%s) }" > -nbd_receive_reply(uint32_t magic, int32_t error, uint64_t handle) "Got > reply: { magic = 0x%" PRIx32 ", .error = % " PRId32 ", handle = %" PRIu64" }" Pre-existing unusual spacing in '.error = % " PRId32', > +nbd_receive_reply(uint32_t magic, int32_t error, const char *errname, > uint64_t handle) "Got reply: { magic = 0x%" PRIx32 ", .error = % " PRId32 " > (%s), handle = %" PRIu64" }" so I'll clean that up in the next revision. -- Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3266 Virtualization: qemu.org | libvirt.org
signature.asc
Description: OpenPGP digital signature