Fix metadata wait handling
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Thu, 25 Aug 2011 16:16:40 +0000 (12:16 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Thu, 25 Aug 2011 16:16:40 +0000 (12:16 -0400)
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
include/ust/wait.h
libust/ltt-ring-buffer-client.h

index e92d52856c603144e105da87dab6533bf47bee04..21ced509915932086570d3329073b6d7d764c0fc 100644 (file)
@@ -38,7 +38,7 @@
                        }                                       \
                        __pollret = poll(NULL, 0, 10);  /* wait 10ms */ \
                        if (__pollret < 0) {                    \
-                               __ret = __pollret;              \
+                               __ret = -errno;                 \
                                break;                          \
                        }                                       \
                        __timeout -= 10;                        \
index 5260197a839e5b252f88d066adc8247893cb1f53..2fe854a383d8821df6e2f1855df13c40b26e6c9a 100644 (file)
@@ -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;
This page took 0.024432 seconds and 4 git commands to generate.