From cf0b616277b7be6950243bc6cdad172af073ff0a Mon Sep 17 00:00:00 2001 From: Mathieu Desnoyers Date: Sat, 3 May 2014 15:07:42 -0400 Subject: [PATCH] Fix: blktrace instrumentation for v3.2.58+ stable branch Starting with Linux kernel v3.2.58 within the v3.2 Linux stable branch: commit 5b85afa68e4f56c27f1d5c6f49e5257bce6448e6 Author: Roman Pen Date: Tue Mar 4 23:13:10 2014 +0900 blktrace: fix accounting of partially completed requests commit af5040da01ef980670b3741b3e10733ee3e33566 upstream. The module API for a block layer tracepoint changes. Fix the associated build failure. Signed-off-by: Mathieu Desnoyers --- instrumentation/events/lttng-module/block.h | 3 ++- probes/lttng-probe-block.c | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/instrumentation/events/lttng-module/block.h b/instrumentation/events/lttng-module/block.h index 2af4fb3..5ea557d 100644 --- a/instrumentation/events/lttng-module/block.h +++ b/instrumentation/events/lttng-module/block.h @@ -221,7 +221,8 @@ DEFINE_EVENT(block_rq_with_error, block_rq_requeue, TP_ARGS(q, rq) ) -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,15,0)) +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,15,0) \ + || LTTNG_KERNEL_RANGE(3,2,58, 3,3,0) || LTTNG_KERNEL_RANGE(3,4,91, 3,5,0)) /** * block_rq_complete - block IO operation completed by device driver diff --git a/probes/lttng-probe-block.c b/probes/lttng-probe-block.c index 27f2142..d363d4d 100644 --- a/probes/lttng-probe-block.c +++ b/probes/lttng-probe-block.c @@ -23,6 +23,7 @@ #include #include #include "../lttng-tracer.h" +#include "../lttng-kernel-version.h" /* * Create the tracepoint static inlines from the kernel to validate that our -- 1.7.10.4