X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=src%2Fcommon%2Fkernel-consumer%2Fkernel-consumer.c;h=823b4a28aa9df3934df86e55b09c3469857631fc;hb=e71aad1fa4b06a5f91ddceace42366f3d79bd77e;hp=2054a865f75d76e78b19ec6b6d2e84718271eae1;hpb=f5204c9440be52e1b17bbb2c82450277ec02a583;p=lttng-tools.git diff --git a/src/common/kernel-consumer/kernel-consumer.c b/src/common/kernel-consumer/kernel-consumer.c index 2054a865f..823b4a28a 100644 --- a/src/common/kernel-consumer/kernel-consumer.c +++ b/src/common/kernel-consumer/kernel-consumer.c @@ -19,7 +19,6 @@ #define _GNU_SOURCE #include -#include #include #include #include @@ -28,10 +27,12 @@ #include #include #include +#include #include #include #include +#include #include "kernel-consumer.h" @@ -72,7 +73,7 @@ ssize_t lttng_kconsumer_on_read_subbuffer_mmap( goto end; } /* This won't block, but will start writeout asynchronously */ - sync_file_range(outfd, stream->out_fd_offset, ret, + lttng_sync_file_range(outfd, stream->out_fd_offset, ret, SYNC_FILE_RANGE_WRITE); stream->out_fd_offset += ret; } @@ -105,7 +106,7 @@ ssize_t lttng_kconsumer_on_read_subbuffer_splice( (unsigned long)offset, fd); ret = splice(fd, &offset, ctx->consumer_thread_pipe[1], NULL, len, SPLICE_F_MOVE | SPLICE_F_MORE); - DBG("splice chan to pipe ret %ld", ret); + DBG("splice chan to pipe ret %zd", ret); if (ret < 0) { errno = -ret; perror("Error in relay splice"); @@ -114,7 +115,7 @@ ssize_t lttng_kconsumer_on_read_subbuffer_splice( ret = splice(ctx->consumer_thread_pipe[0], NULL, outfd, NULL, ret, SPLICE_F_MOVE | SPLICE_F_MORE); - DBG("splice pipe to file %ld", ret); + DBG("splice pipe to file %zd", ret); if (ret < 0) { errno = -ret; perror("Error in file splice"); @@ -122,7 +123,7 @@ ssize_t lttng_kconsumer_on_read_subbuffer_splice( } len -= ret; /* This won't block, but will start writeout asynchronously */ - sync_file_range(outfd, stream->out_fd_offset, ret, + lttng_sync_file_range(outfd, stream->out_fd_offset, ret, SYNC_FILE_RANGE_WRITE); stream->out_fd_offset += ret; }