From: Jérémie Galarneau Date: Wed, 31 Jul 2019 03:37:39 +0000 (-0400) Subject: Fix: use stream's current tracefile count rather than the max X-Git-Tag: v2.12.0-rc1~523 X-Git-Url: https://git.liburcu.org/?a=commitdiff_plain;h=3b16476a9b2015e59bb869cdeb07975b8d1ec6c5;p=lttng-tools.git Fix: use stream's current tracefile count rather than the max consumer_stream_create_output_files() formats the file name of a stream's data file by passing the tracefile count setting rather than using `tracefile_count_current`, the current "index" within the on-disk ring buffer. This broke the trace file rotation functionality as the same file would be overwritten continuously. Signed-off-by: Jérémie Galarneau --- diff --git a/src/common/consumer/consumer-stream.c b/src/common/consumer/consumer-stream.c index 32441ea2c..fe1178795 100644 --- a/src/common/consumer/consumer-stream.c +++ b/src/common/consumer/consumer-stream.c @@ -576,7 +576,7 @@ int consumer_stream_create_output_files(struct lttng_consumer_stream *stream, ret = utils_stream_file_path(stream->chan->pathname, stream->name, stream->chan->tracefile_size, - stream->chan->tracefile_count, NULL, + stream->tracefile_count_current, NULL, stream_path, sizeof(stream_path)); if (ret < 0) { goto end;