From: Jérémie Galarneau Date: Thu, 19 May 2016 22:48:16 +0000 (-0400) Subject: Fix: only perform lttng_consumer_sync_trace_file() in local mode X-Git-Tag: v2.9.0-rc1~151 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=f5dbe415fb8c3efcdcd68968b8cc8f40369b9cd9;p=lttng-tools.git Fix: only perform lttng_consumer_sync_trace_file() in local mode Signed-off-by: Jérémie Galarneau --- diff --git a/src/common/consumer/consumer.c b/src/common/consumer/consumer.c index 8945cb07a..e182c991f 100644 --- a/src/common/consumer/consumer.c +++ b/src/common/consumer/consumer.c @@ -1692,8 +1692,8 @@ ssize_t lttng_consumer_on_read_subbuffer_mmap( lttng_sync_file_range(outfd, stream->out_fd_offset, len, SYNC_FILE_RANGE_WRITE); stream->out_fd_offset += len; + lttng_consumer_sync_trace_file(stream, orig_offset); } - lttng_consumer_sync_trace_file(stream, orig_offset); write_error: /* @@ -1922,7 +1922,9 @@ ssize_t lttng_consumer_on_read_subbuffer_splice( stream->output_written += ret_splice; written += ret_splice; } - lttng_consumer_sync_trace_file(stream, orig_offset); + if (!relayd) { + lttng_consumer_sync_trace_file(stream, orig_offset); + } goto end; write_error: