File fix-update-block-instrumentation-for-4.14-kernel.patch of Package lttng-modules.11968
From: Tony Jones <tonyj@suse.de>
Subject: Fix: update block instrumentation for 4.14 kernel
Date: Thu Oct 5 14:52:15 2017 -0400
References: none
Signed-off-by: Tony Jones <tonyj@suse.de>
X-Info: adjust for SUSE Kernel
diff --git a/instrumentation/events/lttng-module/block.h b/instrumentation/events/lttng-module/block.h
--- a/instrumentation/events/lttng-module/block.h
+++ b/instrumentation/events/lttng-module/block.h
@@ -618,7 +618,7 @@
TP_ARGS(q, bio),
TP_FIELDS(
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0))
+#if (defined(CONFIG_SUSE_KERNEL) || LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0))
ctf_integer(dev_t, dev, bio_dev(bio))
#else
ctf_integer(dev_t, dev, bio->bi_bdev ? bio->bi_bdev->bd_dev : 0)
@@ -663,7 +663,7 @@
#endif
TP_FIELDS(
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0))
+#if (defined(CONFIG_SUSE_KERNEL) || LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0))
ctf_integer(dev_t, dev, bio_dev(bio))
#else
ctf_integer(dev_t, dev, bio->bi_bdev->bd_dev)
@@ -697,7 +697,7 @@
TP_ARGS(q, rq, bio),
TP_FIELDS(
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0))
+#if (defined(CONFIG_SUSE_KERNEL) || LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0))
ctf_integer(dev_t, dev, bio_dev(bio))
#else
ctf_integer(dev_t, dev, bio->bi_bdev->bd_dev)
@@ -763,7 +763,7 @@
TP_ARGS(q, bio),
TP_FIELDS(
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0))
+#if (defined(CONFIG_SUSE_KERNEL) || LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0))
ctf_integer(dev_t, dev, bio_dev(bio))
#else
ctf_integer(dev_t, dev, bio->bi_bdev->bd_dev)
@@ -854,7 +854,7 @@
TP_ARGS(q, bio, rw),
TP_FIELDS(
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0))
+#if (defined(CONFIG_SUSE_KERNEL) || LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0))
ctf_integer(dev_t, dev, bio ? bio_dev(bio) : 0)
#else
ctf_integer(dev_t, dev, bio ? bio->bi_bdev->bd_dev : 0)
@@ -1019,7 +1019,7 @@
TP_ARGS(q, bio, new_sector),
TP_FIELDS(
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0))
+#if (defined(CONFIG_SUSE_KERNEL) || LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0))
ctf_integer(dev_t, dev, bio_dev(bio))
#else
ctf_integer(dev_t, dev, bio->bi_bdev->bd_dev)
@@ -1062,7 +1062,7 @@
TP_ARGS(q, bio, dev, from),
TP_FIELDS(
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0))
+#if (defined(CONFIG_SUSE_KERNEL) || LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0))
ctf_integer(dev_t, dev, bio_dev(bio))
#else
ctf_integer(dev_t, dev, bio->bi_bdev->bd_dev)