From: Mathieu Desnoyers Date: Tue, 11 Jun 2019 21:44:56 +0000 (+0200) Subject: Fix: do not set quiescent state on channel destroy X-Git-Tag: v2.11.0-rc5~2 X-Git-Url: http://git.lttng.org./?a=commitdiff_plain;h=4fd3f042aeec90c27404bdeb8706923ebf1541ae;p=lttng-modules.git Fix: do not set quiescent state on channel destroy Setting the quiescent state to true for each stream at channel destruction is not useful: there are no readers left anyway at that stage. The side-effect perceived of setting this quiescent state on destroy is that the metadata stream ends up with an empty last packet (due to flush_empty performed when setting the quiescent state) which is never consumed. This shows up in the lttng-modules error reporting. Signed-off-by: Mathieu Desnoyers --- diff --git a/lib/ringbuffer/ring_buffer_frontend.c b/lib/ringbuffer/ring_buffer_frontend.c index 90c665d6..f367dffc 100644 --- a/lib/ringbuffer/ring_buffer_frontend.c +++ b/lib/ringbuffer/ring_buffer_frontend.c @@ -978,8 +978,6 @@ void *channel_destroy(struct channel *chan) config->cb.buffer_finalize(buf, chan->backend.priv, cpu); - if (buf->backend.allocated) - lib_ring_buffer_set_quiescent(buf); /* * Perform flush before writing to finalized. */ @@ -992,8 +990,6 @@ void *channel_destroy(struct channel *chan) if (config->cb.buffer_finalize) config->cb.buffer_finalize(buf, chan->backend.priv, -1); - if (buf->backend.allocated) - lib_ring_buffer_set_quiescent(buf); /* * Perform flush before writing to finalized. */