summaryrefslogtreecommitdiffstats
path: root/block/trace-events
diff options
context:
space:
mode:
authorVladimir Sementsov-Ogievskiy2018-11-02 16:11:52 +0100
committerEric Blake2019-01-05 00:34:58 +0100
commitd8b4bad846f08ff0f167b46dc156a5310b750484 (patch)
tree4b4b3c64bdcabcc73c8e9c651500c9e98a371c86 /block/trace-events
parentnbd/client: Trace all server option error messages (diff)
downloadqemu-d8b4bad846f08ff0f167b46dc156a5310b750484.tar.gz
qemu-d8b4bad846f08ff0f167b46dc156a5310b750484.tar.xz
qemu-d8b4bad846f08ff0f167b46dc156a5310b750484.zip
block/nbd-client: use traces instead of noisy error_report_err
Reduce extra noise of nbd-client, change 083 correspondingly. In various commits (be41c100 in 2.10, f140e300 in 2.11, 78a33ab in 2.12), we added spots where qemu as an NBD client would report problems communicating with the server to stderr, because there was no where else to send the error to. However, this is racy, particularly since the most common source of these errors is when either the client or the server abruptly hangs up, leaving one coroutine to report the error only if it wins (or loses) the race in attempting the read from the server before another thread completes its cleanup of a protocol error that caused the disconnect in the first place. The race is also apparent in the fact that differences in the flush behavior of the server can alter the frequency of encountering the race in the client (see commit 6d39db96). Rather than polluting stderr, it's better to just trace these situations, for use by developers debugging a flaky connection, particularly since the real error that either triggers the abrupt disconnection in the first place, or that results from the EIO when a request can't receive a reply, DOES make it back to the user in the normal Error propagation channels. Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> Message-Id: <20181102151152.288399-4-vsementsov@virtuozzo.com> [eblake: drop depedence on error hint, enhance commit message] Signed-off-by: Eric Blake <eblake@redhat.com>
Diffstat (limited to 'block/trace-events')
-rw-r--r--block/trace-events4
1 files changed, 4 insertions, 0 deletions
diff --git a/block/trace-events b/block/trace-events
index 3e8c47bb24..693c14c443 100644
--- a/block/trace-events
+++ b/block/trace-events
@@ -156,3 +156,7 @@ nvme_cmd_map_qiov_iov(void *s, int i, void *page, int pages) "s %p iov[%d] %p pa
# block/iscsi.c
iscsi_xcopy(void *src_lun, uint64_t src_off, void *dst_lun, uint64_t dst_off, uint64_t bytes, int ret) "src_lun %p offset %"PRIu64" dst_lun %p offset %"PRIu64" bytes %"PRIu64" ret %d"
+
+# block/nbd-client.c
+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"