File fix-update-block-instrumentation-for-4.14-kernel.patch of Package lttng-modules
101
1
From: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
2
Subject: Fix: update block instrumentation for 4.14 kernel
3
Date: Thu Oct 5 14:52:15 2017 -0400
4
Git-commit: 7feabe53ccf316430ceb10986e718a638bd584c1
5
References: https://build.suse.de/request/show/148262
6
Signed-off-by: Tony Jones <tonyj@suse.de>
7
8
Fix: update block instrumentation for 4.14 kernel.
9
[SUSE: make confitional on SLE15 v4.12]
10
11
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12
13
diff --git a/instrumentation/events/lttng-module/block.h b/instrumentation/events/lttng-module/block.h
14
index c43d747..6526d3d 100644
15
--- a/instrumentation/events/lttng-module/block.h
16
+++ b/instrumentation/events/lttng-module/block.h
17
18
TP_ARGS(q, bio),
19
20
TP_FIELDS(
21
+#if ((defined(CONFIG_SUSE_KERNEL) && LINUX_VERSION_CODE >= KERNEL_VERSION(4,12,0)) || LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0))
22
+ ctf_integer(dev_t, dev, bio_dev(bio))
23
+#else
24
ctf_integer(dev_t, dev, bio->bi_bdev ? bio->bi_bdev->bd_dev : 0)
25
+#endif
26
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,14,0))
27
ctf_integer(sector_t, sector, bio->bi_iter.bi_sector)
28
ctf_integer(unsigned int, nr_sector, bio_sectors(bio))
29
30
#endif
31
32
TP_FIELDS(
33
+#if ((defined(CONFIG_SUSE_KERNEL) && LINUX_VERSION_CODE >= KERNEL_VERSION(4,12,0)) || LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0))
34
+ ctf_integer(dev_t, dev, bio_dev(bio))
35
+#else
36
ctf_integer(dev_t, dev, bio->bi_bdev->bd_dev)
37
+#endif
38
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,14,0))
39
ctf_integer(sector_t, sector, bio->bi_iter.bi_sector)
40
ctf_integer(unsigned int, nr_sector, bio_sectors(bio))
41
42
TP_ARGS(q, rq, bio),
43
44
TP_FIELDS(
45
+#if ((defined(CONFIG_SUSE_KERNEL) && LINUX_VERSION_CODE >= KERNEL_VERSION(4,12,0)) || LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0))
46
+ ctf_integer(dev_t, dev, bio_dev(bio))
47
+#else
48
ctf_integer(dev_t, dev, bio->bi_bdev->bd_dev)
49
+#endif
50
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,14,0))
51
ctf_integer(sector_t, sector, bio->bi_iter.bi_sector)
52
ctf_integer(unsigned int, nr_sector, bio_sectors(bio))
53
54
TP_ARGS(q, bio),
55
56
TP_FIELDS(
57
+#if ((defined(CONFIG_SUSE_KERNEL) && LINUX_VERSION_CODE >= KERNEL_VERSION(4,12,0)) || LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0))
58
+ ctf_integer(dev_t, dev, bio_dev(bio))
59
+#else
60
ctf_integer(dev_t, dev, bio->bi_bdev->bd_dev)
61
+#endif
62
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,14,0))
63
ctf_integer(sector_t, sector, bio->bi_iter.bi_sector)
64
ctf_integer(unsigned int, nr_sector, bio_sectors(bio))
65
66
TP_ARGS(q, bio, rw),
67
68
TP_FIELDS(
69
+#if ((defined(CONFIG_SUSE_KERNEL) && LINUX_VERSION_CODE >= KERNEL_VERSION(4,12,0)) || LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0))
70
+ ctf_integer(dev_t, dev, bio_dev(bio))
71
+#else
72
ctf_integer(dev_t, dev, bio ? bio->bi_bdev->bd_dev : 0)
73
+#endif
74
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,14,0))
75
ctf_integer(sector_t, sector, bio ? bio->bi_iter.bi_sector : 0)
76
ctf_integer(unsigned int, nr_sector,
77
78
TP_ARGS(q, bio, new_sector),
79
80
TP_FIELDS(
81
+#if ((defined(CONFIG_SUSE_KERNEL) && LINUX_VERSION_CODE >= KERNEL_VERSION(4,12,0)) || LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0))
82
+ ctf_integer(dev_t, dev, bio_dev(bio))
83
+#else
84
ctf_integer(dev_t, dev, bio->bi_bdev->bd_dev)
85
+#endif
86
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,14,0))
87
ctf_integer(sector_t, sector, bio->bi_iter.bi_sector)
88
blk_rwbs_ctf_integer(unsigned int, rwbs,
89
90
TP_ARGS(q, bio, dev, from),
91
92
TP_FIELDS(
93
+#if ((defined(CONFIG_SUSE_KERNEL) && LINUX_VERSION_CODE >= KERNEL_VERSION(4,12,0)) || LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0))
94
+ ctf_integer(dev_t, dev, bio_dev(bio))
95
+#else
96
ctf_integer(dev_t, dev, bio->bi_bdev->bd_dev)
97
+#endif
98
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,14,0))
99
ctf_integer(sector_t, sector, bio->bi_iter.bi_sector)
100
ctf_integer(unsigned int, nr_sector, bio_sectors(bio))
101