From: Mathieu Desnoyers Date: Thu, 25 Aug 2011 16:16:40 +0000 (-0400) Subject: Fix metadata wait handling X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=9dcb02efd18948134deb8469a39478f250033269;p=ust.git Fix metadata wait handling Signed-off-by: Mathieu Desnoyers --- diff --git a/include/ust/wait.h b/include/ust/wait.h index e92d528..21ced50 100644 --- a/include/ust/wait.h +++ b/include/ust/wait.h @@ -38,7 +38,7 @@ } \ __pollret = poll(NULL, 0, 10); /* wait 10ms */ \ if (__pollret < 0) { \ - __ret = __pollret; \ + __ret = -errno; \ break; \ } \ __timeout -= 10; \ diff --git a/libust/ltt-ring-buffer-client.h b/libust/ltt-ring-buffer-client.h index 5260197..2fe854a 100644 --- a/libust/ltt-ring-buffer-client.h +++ b/libust/ltt-ring-buffer-client.h @@ -335,7 +335,11 @@ static void client_buffer_end(struct lib_ring_buffer *buf, u64 tsc, header->ctx.timestamp_end = tsc; header->ctx.content_size = data_size * CHAR_BIT; /* in bits */ header->ctx.packet_size = PAGE_ALIGN(data_size) * CHAR_BIT; /* in bits */ - records_lost += lib_ring_buffer_get_records_lost_full(&client_config, buf); + /* + * We do not care about the records lost count, because the metadata + * channel waits and retry. + */ + (void) lib_ring_buffer_get_records_lost_full(&client_config, buf); records_lost += lib_ring_buffer_get_records_lost_wrap(&client_config, buf); records_lost += lib_ring_buffer_get_records_lost_big(&client_config, buf); header->ctx.events_discarded = records_lost;