]> Git Repo - qemu.git/commitdiff
block/nbd-client: drop stale logout
authorVladimir Sementsov-Ogievskiy <[email protected]>
Tue, 11 Jun 2019 10:27:18 +0000 (13:27 +0300)
committerEric Blake <[email protected]>
Thu, 13 Jun 2019 14:35:53 +0000 (09:35 -0500)
Drop one on failure path (we have errp) and turn two others into trace
points.

Signed-off-by: Vladimir Sementsov-Ogievskiy <[email protected]>
Message-Id: <20190611102720[email protected]>
Reviewed-by: Eric Blake <[email protected]>
Signed-off-by: Eric Blake <[email protected]>
block/nbd-client.c
block/nbd-client.h
block/trace-events

index 790ecc1ee1cb346358122afb6769529ae7a30012..f89a67c23b642b2606daee004a02016ecf5ef5b6 100644 (file)
@@ -1136,7 +1136,7 @@ static int nbd_client_connect(BlockDriverState *bs,
     }
 
     /* NBD handshake */
-    logout("session init %s\n", export);
+    trace_nbd_client_connect(export);
     qio_channel_set_blocking(QIO_CHANNEL(sioc), true, NULL);
 
     client->info.request_sizes = true;
@@ -1149,7 +1149,6 @@ static int nbd_client_connect(BlockDriverState *bs,
     g_free(client->info.x_dirty_bitmap);
     g_free(client->info.name);
     if (ret < 0) {
-        logout("Failed to negotiate with the NBD server\n");
         object_unref(OBJECT(sioc));
         return ret;
     }
@@ -1187,7 +1186,8 @@ static int nbd_client_connect(BlockDriverState *bs,
     bdrv_inc_in_flight(bs);
     nbd_client_attach_aio_context(bs, bdrv_get_aio_context(bs));
 
-    logout("Established connection with NBD server\n");
+    trace_nbd_client_connect_success(export);
+
     return 0;
 
  fail:
index 4587053114af6c42f45f31e0491a20b19fbe82a8..570538f4c8847ce6ba92c9f7347d737f2dd09343 100644 (file)
@@ -5,15 +5,6 @@
 #include "block/block_int.h"
 #include "io/channel-socket.h"
 
-/* #define DEBUG_NBD */
-
-#if defined(DEBUG_NBD)
-#define logout(fmt, ...) \
-    fprintf(stderr, "nbd\t%-24s" fmt, __func__, ##__VA_ARGS__)
-#else
-#define logout(fmt, ...) ((void)0)
-#endif
-
 #define MAX_NBD_REQUESTS    16
 
 typedef struct {
index eab51497fc0fb789bcf286d7187abb602a27b408..01fa5eb081be6741aea848d3ce60d8ca15a0fc7b 100644 (file)
@@ -165,6 +165,8 @@ nbd_parse_blockstatus_compliance(const char *err) "ignoring extra data from non-
 nbd_structured_read_compliance(const char *type) "server sent non-compliant unaligned read %s chunk"
 nbd_read_reply_entry_fail(int ret, const char *err) "ret = %d, err: %s"
 nbd_co_request_fail(uint64_t from, uint32_t len, uint64_t handle, uint16_t flags, uint16_t type, const char *name, int ret, const char *err) "Request failed { .from = %" PRIu64", .len = %" PRIu32 ", .handle = %" PRIu64 ", .flags = 0x%" PRIx16 ", .type = %" PRIu16 " (%s) } ret = %d, err: %s"
+nbd_client_connect(const char *export_name) "export '%s'"
+nbd_client_connect_success(const char *export_name) "export '%s'"
 
 # ssh.c
 ssh_restart_coroutine(void *co) "co=%p"
This page took 0.028674 seconds and 4 git commands to generate.