From: Mathieu Desnoyers Date: Sat, 3 May 2014 19:07:42 +0000 (-0400) Subject: Fix: blktrace instrumentation for v3.2.58+ stable branch X-Git-Tag: v2.5.0-rc1~6 X-Git-Url: http://git.lttng.org/?p=lttng-modules.git;a=commitdiff_plain;h=cf0b616277b7be6950243bc6cdad172af073ff0a 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 --- diff --git a/instrumentation/events/lttng-module/block.h b/instrumentation/events/lttng-module/block.h index 2af4fb32..5ea557d9 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)) /** * 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 27f2142a..d363d4de 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