[lttng-dev] [LTTNG-TOOLS PATCH] Fix: reset out_fd_offset when we rotate the trace file
Mathieu Desnoyers
mathieu.desnoyers at efficios.com
Tue Aug 13 18:23:12 EDT 2013
* Julien Desfossez (jdesfossez at efficios.com) wrote:
> This value is only used for the sync_file_range, but it has to be set
> to 0 when we start to write in a new trace file, otherwise the values
> passed to this call are bogus.
>
> Applied to 2.3, but could probably be backported to 2.2.
>
> Signed-off-by: Julien Desfossez <jdesfossez at efficios.com>
Acked-by: Mathieu Desnoyers <mathieu.desnoyers at efficios.com>
> ---
> src/common/consumer.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/src/common/consumer.c b/src/common/consumer.c
> index 221c348..59207da 100644
> --- a/src/common/consumer.c
> +++ b/src/common/consumer.c
> @@ -1431,6 +1431,8 @@ ssize_t lttng_consumer_on_read_subbuffer_mmap(
> outfd = stream->out_fd = ret;
> /* Reset current size because we just perform a rotation. */
> stream->tracefile_size_current = 0;
> + stream->out_fd_offset = 0;
> + orig_offset = 0;
> }
> stream->tracefile_size_current += len;
> }
> @@ -1614,6 +1616,8 @@ ssize_t lttng_consumer_on_read_subbuffer_splice(
> outfd = stream->out_fd = ret;
> /* Reset current size because we just perform a rotation. */
> stream->tracefile_size_current = 0;
> + stream->out_fd_offset = 0;
> + orig_offset = 0;
> }
> stream->tracefile_size_current += len;
> }
> --
> 1.7.10.4
>
>
> _______________________________________________
> lttng-dev mailing list
> lttng-dev at lists.lttng.org
> http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev
--
Mathieu Desnoyers
EfficiOS Inc.
http://www.efficios.com
More information about the lttng-dev
mailing list