Make lttng_consumer_sync_trace_file static
[lttng-tools.git] / src / common / consumer / consumer.c
index 321703a5157305104f855a3834a55ddf81434bc5..8945cb07a043f66ec267a0157dd21bce7807d78f 100644 (file)
@@ -1021,7 +1021,7 @@ struct lttng_consumer_channel *consumer_allocate_channel(uint64_t key,
 
        CDS_INIT_LIST_HEAD(&channel->streams.head);
 
-       DBG("Allocated channel (key %" PRIu64 ")", channel->key)
+       DBG("Allocated channel (key %" PRIu64 ")", channel->key);
 
 end:
        return channel;
@@ -1229,6 +1229,11 @@ void lttng_consumer_should_exit(struct lttng_consumer_local_data *ctx)
        DBG("Consumer flag that it should quit");
 }
 
+
+/*
+ * Flush pending writes to trace output disk file.
+ */
+static
 void lttng_consumer_sync_trace_file(struct lttng_consumer_stream *stream,
                off_t orig_offset)
 {
@@ -1265,8 +1270,9 @@ void lttng_consumer_sync_trace_file(struct lttng_consumer_stream *stream,
         */
        ret = posix_fadvise(outfd, orig_offset - stream->max_sb_size,
                        stream->max_sb_size, POSIX_FADV_DONTNEED);
-       if (ret) {
-               WARN("posix_fadvise() error (%i)", ret);
+       if (ret && ret != -ENOSYS) {
+               errno = ret;
+               PERROR("posix_fadvise on fd %i", outfd);
        }
 }
 
This page took 0.023557 seconds and 4 git commands to generate.