]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/blob
37a169a2e9f6016bbf2673450e62cc7b4b03cd54
[thirdparty/openembedded/openembedded-core-contrib.git] /
1 From 4b1945d3c055de4b49e310f799e6f92c57546349 Mon Sep 17 00:00:00 2001
2 From: Michael Jeanson <mjeanson@efficios.com>
3 Date: Sun, 23 Jan 2022 13:11:47 -0500
4 Subject: [PATCH 2/7] fix: block: remove the ->rq_disk field in struct request
5 (v5.17)
6
7 See upstream commit :
8
9 commit f3fa33acca9f0058157214800f68b10d8e71ab7a
10 Author: Christoph Hellwig <hch@lst.de>
11 Date: Fri Nov 26 13:18:00 2021 +0100
12
13 block: remove the ->rq_disk field in struct request
14
15 Just use the disk attached to the request_queue instead.
16
17 Link: https://lore.kernel.org/r/20211126121802.2090656-4-hch@lst.de
18
19 Upstream-Status: Backport [lttng-modules commit 4b1945d3c055de4b49e310f799e6f92c57546349]
20
21 Change-Id: I24263be519d1b51f4b00bd95f14a9aeb8457889a
22 Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
23 Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
24 ---
25 include/instrumentation/events/block.h | 95 ++++++++++++++++++++++++--
26 1 file changed, 91 insertions(+), 4 deletions(-)
27
28 diff --git a/include/instrumentation/events/block.h b/include/instrumentation/events/block.h
29 index 6782c36f..3e1104d7 100644
30 --- a/include/instrumentation/events/block.h
31 +++ b/include/instrumentation/events/block.h
32 @@ -310,7 +310,31 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE(block_rq_with_error, block_rq_abort,
33 )
34 #endif
35
36 -#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,11,0))
37 +#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,17,0))
38 +/**
39 + * block_rq_requeue - place block IO request back on a queue
40 + * @rq: block IO operation request
41 + *
42 + * The block operation request @rq is being placed back into queue
43 + * @q. For some reason the request was not completed and needs to be
44 + * put back in the queue.
45 + */
46 +LTTNG_TRACEPOINT_EVENT(block_rq_requeue,
47 +
48 + TP_PROTO(struct request *rq),
49 +
50 + TP_ARGS(rq),
51 +
52 + TP_FIELDS(
53 + ctf_integer(dev_t, dev,
54 + rq->q->disk ? disk_devt(rq->q->disk) : 0)
55 + ctf_integer(sector_t, sector, blk_rq_trace_sector(rq))
56 + ctf_integer(unsigned int, nr_sector, blk_rq_trace_nr_sectors(rq))
57 + blk_rwbs_ctf_integer(unsigned int, rwbs,
58 + lttng_req_op(rq), lttng_req_rw(rq), blk_rq_bytes(rq))
59 + )
60 +)
61 +#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,11,0))
62 /**
63 * block_rq_requeue - place block IO request back on a queue
64 * @rq: block IO operation request
65 @@ -380,7 +404,24 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE(block_rq_with_error, block_rq_requeue,
66 * do for the request. If @rq->bio is non-NULL then there is
67 * additional work required to complete the request.
68 */
69 -#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,16,0))
70 +#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,17,0))
71 +LTTNG_TRACEPOINT_EVENT(block_rq_complete,
72 +
73 + TP_PROTO(struct request *rq, blk_status_t error, unsigned int nr_bytes),
74 +
75 + TP_ARGS(rq, error, nr_bytes),
76 +
77 + TP_FIELDS(
78 + ctf_integer(dev_t, dev,
79 + rq->q->disk ? disk_devt(rq->q->disk) : 0)
80 + ctf_integer(sector_t, sector, blk_rq_pos(rq))
81 + ctf_integer(unsigned int, nr_sector, nr_bytes >> 9)
82 + ctf_integer(int, error, blk_status_to_errno(error))
83 + blk_rwbs_ctf_integer(unsigned int, rwbs,
84 + lttng_req_op(rq), lttng_req_rw(rq), nr_bytes)
85 + )
86 +)
87 +#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,16,0))
88 LTTNG_TRACEPOINT_EVENT(block_rq_complete,
89
90 TP_PROTO(struct request *rq, blk_status_t error, unsigned int nr_bytes),
91 @@ -519,7 +560,26 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE(block_rq_with_error, block_rq_complete,
92
93 #endif /* #else #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,15,0)) */
94
95 -#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,11,0))
96 +#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,17,0))
97 +LTTNG_TRACEPOINT_EVENT_CLASS(block_rq,
98 +
99 + TP_PROTO(struct request *rq),
100 +
101 + TP_ARGS(rq),
102 +
103 + TP_FIELDS(
104 + ctf_integer(dev_t, dev,
105 + rq->q->disk ? disk_devt(rq->q->disk) : 0)
106 + ctf_integer(sector_t, sector, blk_rq_trace_sector(rq))
107 + ctf_integer(unsigned int, nr_sector, blk_rq_trace_nr_sectors(rq))
108 + ctf_integer(unsigned int, bytes, blk_rq_bytes(rq))
109 + ctf_integer(pid_t, tid, current->pid)
110 + blk_rwbs_ctf_integer(unsigned int, rwbs,
111 + lttng_req_op(rq), lttng_req_rw(rq), blk_rq_bytes(rq))
112 + ctf_array_text(char, comm, current->comm, TASK_COMM_LEN)
113 + )
114 +)
115 +#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,11,0))
116 LTTNG_TRACEPOINT_EVENT_CLASS(block_rq,
117
118 TP_PROTO(struct request *rq),
119 @@ -1513,7 +1573,34 @@ LTTNG_TRACEPOINT_EVENT(block_bio_remap,
120 )
121 #endif
122
123 -#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,11,0))
124 +#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,17,0))
125 +/**
126 + * block_rq_remap - map request for a block operation request
127 + * @rq: block IO operation request
128 + * @dev: device for the operation
129 + * @from: original sector for the operation
130 + *
131 + * The block operation request @rq in @q has been remapped. The block
132 + * operation request @rq holds the current information and @from hold
133 + * the original sector.
134 + */
135 +LTTNG_TRACEPOINT_EVENT(block_rq_remap,
136 +
137 + TP_PROTO(struct request *rq, dev_t dev, sector_t from),
138 +
139 + TP_ARGS(rq, dev, from),
140 +
141 + TP_FIELDS(
142 + ctf_integer(dev_t, dev, disk_devt(rq->q->disk))
143 + ctf_integer(sector_t, sector, blk_rq_pos(rq))
144 + ctf_integer(unsigned int, nr_sector, blk_rq_sectors(rq))
145 + ctf_integer(dev_t, old_dev, dev)
146 + ctf_integer(sector_t, old_sector, from)
147 + blk_rwbs_ctf_integer(unsigned int, rwbs,
148 + lttng_req_op(rq), lttng_req_rw(rq), blk_rq_bytes(rq))
149 + )
150 +)
151 +#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,11,0))
152 /**
153 * block_rq_remap - map request for a block operation request
154 * @rq: block IO operation request
155 --
156 2.19.1
157