1 /* SPDX-License-Identifier: GPL-2.0 */
3 #define TRACE_SYSTEM block
5 #if !defined(LTTNG_TRACE_BLOCK_H) || defined(TRACE_HEADER_MULTI_READ)
6 #define LTTNG_TRACE_BLOCK_H
8 #include <probes/lttng-tracepoint-event.h>
9 #include <linux/blktrace_api.h>
10 #include <linux/blkdev.h>
11 #include <linux/trace_seq.h>
12 #include <lttng-kernel-version.h>
14 #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,11,0))
15 #include <scsi/scsi_request.h>
16 #endif /* (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,11,0)) */
18 #ifndef _TRACE_BLOCK_DEF_
19 #define _TRACE_BLOCK_DEF_
22 RWBS_FLAG_WRITE
= (1 << 0),
23 RWBS_FLAG_DISCARD
= (1 << 1),
24 RWBS_FLAG_READ
= (1 << 2),
25 RWBS_FLAG_RAHEAD
= (1 << 3),
26 RWBS_FLAG_BARRIER
= (1 << 4),
27 RWBS_FLAG_SYNC
= (1 << 5),
28 RWBS_FLAG_META
= (1 << 6),
29 RWBS_FLAG_SECURE
= (1 << 7),
30 RWBS_FLAG_FLUSH
= (1 << 8),
31 RWBS_FLAG_FUA
= (1 << 9),
32 RWBS_FLAG_PREFLUSH
= (1 << 10),
35 #endif /* _TRACE_BLOCK_DEF_ */
37 #ifdef CONFIG_LTTNG_EXPERIMENTAL_BITWISE_ENUM
38 LTTNG_TRACEPOINT_ENUM(block_rq_type
,
40 ctf_enum_value("RWBS_FLAG_WRITE", RWBS_FLAG_WRITE
)
41 ctf_enum_value("RWBS_FLAG_DISCARD", RWBS_FLAG_DISCARD
)
42 ctf_enum_value("RWBS_FLAG_READ", RWBS_FLAG_READ
)
43 ctf_enum_value("RWBS_FLAG_RAHEAD", RWBS_FLAG_RAHEAD
)
44 ctf_enum_value("RWBS_FLAG_BARRIER", RWBS_FLAG_BARRIER
)
45 ctf_enum_value("RWBS_FLAG_SYNC", RWBS_FLAG_SYNC
)
46 ctf_enum_value("RWBS_FLAG_META", RWBS_FLAG_META
)
47 ctf_enum_value("RWBS_FLAG_SECURE", RWBS_FLAG_SECURE
)
48 ctf_enum_value("RWBS_FLAG_FLUSH", RWBS_FLAG_FLUSH
)
49 ctf_enum_value("RWBS_FLAG_FUA", RWBS_FLAG_FUA
)
50 ctf_enum_value("RWBS_FLAG_PREFLUSH", RWBS_FLAG_PREFLUSH
)
53 #endif /* CONFIG_LTTNG_EXPERIMENTAL_BITWISE_ENUM */
55 #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,8,0) || \
56 LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \
57 LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \
58 LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \
59 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,4,103,7,0,0) || \
60 LTTNG_SLE_KERNEL_RANGE(4,4,114,94,0,0, 4,4,114,95,0,0) || \
61 LTTNG_SLE_KERNEL_RANGE(4,4,120,94,0,0, 4,4,120,95,0,0) || \
62 LTTNG_SLE_KERNEL_RANGE(4,4,126,94,0,0, 4,5,0,0,0,0))
64 #define lttng_req_op(rq) req_op(rq)
65 #define lttng_req_rw(rq) ((rq)->cmd_flags)
66 #define lttng_bio_op(bio) bio_op(bio)
67 #define lttng_bio_rw(bio) ((bio)->bi_opf)
69 #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,18,0))
70 #ifdef CONFIG_LTTNG_EXPERIMENTAL_BITWISE_ENUM
71 #define blk_rwbs_ctf_integer(type, rwbs, op, rw, bytes) \
72 ctf_enum(block_rq_type, type, rwbs, \
73 ( (op) == REQ_OP_WRITE ? RWBS_FLAG_WRITE : \
74 ( (op) == REQ_OP_DISCARD ? RWBS_FLAG_DISCARD : \
75 ( (op) == REQ_OP_SECURE_ERASE ? (RWBS_FLAG_DISCARD | RWBS_FLAG_SECURE) : \
76 ( (op) == REQ_OP_FLUSH ? RWBS_FLAG_FLUSH : \
77 ( (op) == REQ_OP_READ ? RWBS_FLAG_READ : \
79 | ((rw) & REQ_RAHEAD ? RWBS_FLAG_RAHEAD : 0) \
80 | ((rw) & REQ_SYNC ? RWBS_FLAG_SYNC : 0) \
81 | ((rw) & REQ_META ? RWBS_FLAG_META : 0) \
82 | ((rw) & REQ_PREFLUSH ? RWBS_FLAG_PREFLUSH : 0) \
83 | ((rw) & REQ_FUA ? RWBS_FLAG_FUA : 0))
85 #define blk_rwbs_ctf_integer(type, rwbs, op, rw, bytes) \
86 ctf_integer(type, rwbs, \
87 ( (op) == REQ_OP_WRITE ? RWBS_FLAG_WRITE : \
88 ( (op) == REQ_OP_DISCARD ? RWBS_FLAG_DISCARD : \
89 ( (op) == REQ_OP_SECURE_ERASE ? (RWBS_FLAG_DISCARD | RWBS_FLAG_SECURE) : \
90 ( (op) == REQ_OP_FLUSH ? RWBS_FLAG_FLUSH : \
91 ( (op) == REQ_OP_READ ? RWBS_FLAG_READ : \
93 | ((rw) & REQ_RAHEAD ? RWBS_FLAG_RAHEAD : 0) \
94 | ((rw) & REQ_SYNC ? RWBS_FLAG_SYNC : 0) \
95 | ((rw) & REQ_META ? RWBS_FLAG_META : 0) \
96 | ((rw) & REQ_PREFLUSH ? RWBS_FLAG_PREFLUSH : 0) \
97 | ((rw) & REQ_FUA ? RWBS_FLAG_FUA : 0))
98 #endif /* CONFIG_LTTNG_EXPERIMENTAL_BITWISE_ENUM */
100 #ifdef CONFIG_LTTNG_EXPERIMENTAL_BITWISE_ENUM
101 #define blk_rwbs_ctf_integer(type, rwbs, op, rw, bytes) \
102 ctf_enum(block_rq_type, type, rwbs, \
103 (((op) == REQ_OP_WRITE || (op) == REQ_OP_WRITE_SAME) ? RWBS_FLAG_WRITE : \
104 ( (op) == REQ_OP_DISCARD ? RWBS_FLAG_DISCARD : \
105 ( (op) == REQ_OP_SECURE_ERASE ? (RWBS_FLAG_DISCARD | RWBS_FLAG_SECURE) : \
106 ( (op) == REQ_OP_FLUSH ? RWBS_FLAG_FLUSH : \
107 ( (op) == REQ_OP_READ ? RWBS_FLAG_READ : \
109 | ((rw) & REQ_RAHEAD ? RWBS_FLAG_RAHEAD : 0) \
110 | ((rw) & REQ_SYNC ? RWBS_FLAG_SYNC : 0) \
111 | ((rw) & REQ_META ? RWBS_FLAG_META : 0) \
112 | ((rw) & REQ_PREFLUSH ? RWBS_FLAG_PREFLUSH : 0) \
113 | ((rw) & REQ_FUA ? RWBS_FLAG_FUA : 0))
115 #define blk_rwbs_ctf_integer(type, rwbs, op, rw, bytes) \
116 ctf_integer(type, rwbs, \
117 (((op) == REQ_OP_WRITE || (op) == REQ_OP_WRITE_SAME) ? RWBS_FLAG_WRITE : \
118 ( (op) == REQ_OP_DISCARD ? RWBS_FLAG_DISCARD : \
119 ( (op) == REQ_OP_SECURE_ERASE ? (RWBS_FLAG_DISCARD | RWBS_FLAG_SECURE) : \
120 ( (op) == REQ_OP_FLUSH ? RWBS_FLAG_FLUSH : \
121 ( (op) == REQ_OP_READ ? RWBS_FLAG_READ : \
123 | ((rw) & REQ_RAHEAD ? RWBS_FLAG_RAHEAD : 0) \
124 | ((rw) & REQ_SYNC ? RWBS_FLAG_SYNC : 0) \
125 | ((rw) & REQ_META ? RWBS_FLAG_META : 0) \
126 | ((rw) & REQ_PREFLUSH ? RWBS_FLAG_PREFLUSH : 0) \
127 | ((rw) & REQ_FUA ? RWBS_FLAG_FUA : 0))
128 #endif /* CONFIG_LTTNG_EXPERIMENTAL_BITWISE_ENUM */
131 #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,1,0))
133 #define lttng_req_op(rq)
134 #define lttng_req_rw(rq) ((rq)->cmd_flags)
135 #define lttng_bio_op(bio)
136 #define lttng_bio_rw(bio) ((bio)->bi_rw)
138 #ifdef CONFIG_LTTNG_EXPERIMENTAL_BITWISE_ENUM
139 #define blk_rwbs_ctf_integer(type, rwbs, op, rw, bytes) \
140 ctf_enum(block_rq_type, type, rwbs, ((rw) & WRITE ? RWBS_FLAG_WRITE : \
141 ( (rw) & REQ_DISCARD ? RWBS_FLAG_DISCARD : \
142 ( (bytes) ? RWBS_FLAG_READ : \
144 | ((rw) & REQ_RAHEAD ? RWBS_FLAG_RAHEAD : 0) \
145 | ((rw) & REQ_SYNC ? RWBS_FLAG_SYNC : 0) \
146 | ((rw) & REQ_META ? RWBS_FLAG_META : 0) \
147 | ((rw) & REQ_SECURE ? RWBS_FLAG_SECURE : 0) \
148 | ((rw) & REQ_FLUSH ? RWBS_FLAG_FLUSH : 0) \
149 | ((rw) & REQ_FUA ? RWBS_FLAG_FUA : 0))
151 #define blk_rwbs_ctf_integer(type, rwbs, op, rw, bytes) \
152 ctf_integer(type, rwbs, ((rw) & WRITE ? RWBS_FLAG_WRITE : \
153 ( (rw) & REQ_DISCARD ? RWBS_FLAG_DISCARD : \
154 ( (bytes) ? RWBS_FLAG_READ : \
156 | ((rw) & REQ_RAHEAD ? RWBS_FLAG_RAHEAD : 0) \
157 | ((rw) & REQ_SYNC ? RWBS_FLAG_SYNC : 0) \
158 | ((rw) & REQ_META ? RWBS_FLAG_META : 0) \
159 | ((rw) & REQ_SECURE ? RWBS_FLAG_SECURE : 0) \
160 | ((rw) & REQ_FLUSH ? RWBS_FLAG_FLUSH : 0) \
161 | ((rw) & REQ_FUA ? RWBS_FLAG_FUA : 0))
162 #endif /* CONFIG_LTTNG_EXPERIMENTAL_BITWISE_ENUM */
166 #define lttng_req_op(rq)
167 #define lttng_req_rw(rq) ((rq)->cmd_flags)
168 #define lttng_bio_op(bio)
169 #define lttng_bio_rw(bio) ((bio)->bi_rw)
171 #ifdef CONFIG_LTTNG_EXPERIMENTAL_BITWISE_ENUM
172 #define blk_rwbs_ctf_integer(type, rwbs, op, rw, bytes) \
173 ctf_enum(block_rq_type, type, rwbs, ((rw) & WRITE ? RWBS_FLAG_WRITE : \
174 ( (rw) & REQ_DISCARD ? RWBS_FLAG_DISCARD : \
175 ( (bytes) ? RWBS_FLAG_READ : \
177 | ((rw) & REQ_RAHEAD ? RWBS_FLAG_RAHEAD : 0) \
178 | ((rw) & REQ_SYNC ? RWBS_FLAG_SYNC : 0) \
179 | ((rw) & REQ_META ? RWBS_FLAG_META : 0) \
180 | ((rw) & REQ_SECURE ? RWBS_FLAG_SECURE : 0))
182 #define blk_rwbs_ctf_integer(type, rwbs, op, rw, bytes) \
183 ctf_integer(type, rwbs, ((rw) & WRITE ? RWBS_FLAG_WRITE : \
184 ( (rw) & REQ_DISCARD ? RWBS_FLAG_DISCARD : \
185 ( (bytes) ? RWBS_FLAG_READ : \
187 | ((rw) & REQ_RAHEAD ? RWBS_FLAG_RAHEAD : 0) \
188 | ((rw) & REQ_SYNC ? RWBS_FLAG_SYNC : 0) \
189 | ((rw) & REQ_META ? RWBS_FLAG_META : 0) \
190 | ((rw) & REQ_SECURE ? RWBS_FLAG_SECURE : 0))
191 #endif /* CONFIG_LTTNG_EXPERIMENTAL_BITWISE_ENUM */
195 #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,9,0))
196 LTTNG_TRACEPOINT_EVENT_CLASS(block_buffer
,
198 TP_PROTO(struct buffer_head
*bh
),
203 ctf_integer(dev_t
, dev
, bh
->b_bdev
->bd_dev
)
204 ctf_integer(sector_t
, sector
, bh
->b_blocknr
)
205 ctf_integer(size_t, size
, bh
->b_size
)
210 * block_touch_buffer - mark a buffer accessed
211 * @bh: buffer_head being touched
213 * Called from touch_buffer().
215 LTTNG_TRACEPOINT_EVENT_INSTANCE(block_buffer
, block_touch_buffer
,
217 TP_PROTO(struct buffer_head
*bh
),
223 * block_dirty_buffer - mark a buffer dirty
224 * @bh: buffer_head being dirtied
226 * Called from mark_buffer_dirty().
228 LTTNG_TRACEPOINT_EVENT_INSTANCE(block_buffer
, block_dirty_buffer
,
230 TP_PROTO(struct buffer_head
*bh
),
236 #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,12,0))
237 /* block_rq_with_error event class removed in kernel 4.12 */
238 #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,11,0))
239 LTTNG_TRACEPOINT_EVENT_CLASS_CODE(block_rq_with_error
,
241 TP_PROTO(struct request_queue
*q
, struct request
*rq
),
247 unsigned int nr_sector
;
253 if (blk_rq_is_scsi(rq
)) {
254 struct scsi_request
*scsi_rq
= scsi_req(rq
);
255 tp_locvar
->sector
= 0;
256 tp_locvar
->nr_sector
= 0;
257 tp_locvar
->cmd
= scsi_rq
->cmd
;
258 tp_locvar
->cmd_len
= scsi_rq
->cmd_len
;
260 tp_locvar
->sector
= blk_rq_pos(rq
);
261 tp_locvar
->nr_sector
= blk_rq_sectors(rq
);
262 tp_locvar
->cmd
= NULL
;
263 tp_locvar
->cmd_len
= 0;
268 ctf_integer(dev_t
, dev
,
269 rq
->rq_disk
? disk_devt(rq
->rq_disk
) : 0)
270 ctf_integer(sector_t
, sector
, tp_locvar
->sector
)
271 ctf_integer(unsigned int, nr_sector
, tp_locvar
->nr_sector
)
272 ctf_integer(int, errors
, rq
->errors
)
273 blk_rwbs_ctf_integer(unsigned int, rwbs
,
274 lttng_req_op(rq
), lttng_req_rw(rq
), blk_rq_bytes(rq
))
275 ctf_sequence_hex(unsigned char, cmd
,
276 tp_locvar
->cmd
, size_t, tp_locvar
->cmd_len
)
281 #else /* #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,11,0)) */
282 LTTNG_TRACEPOINT_EVENT_CLASS_CODE(block_rq_with_error
,
284 TP_PROTO(struct request_queue
*q
, struct request
*rq
),
290 unsigned int nr_sector
;
297 if (rq
->cmd_type
== REQ_TYPE_BLOCK_PC
) {
298 tp_locvar
->sector
= 0;
299 tp_locvar
->nr_sector
= 0;
300 tp_locvar
->cmd
= rq
->cmd
;
301 tp_locvar
->cmd_len
= rq
->cmd_len
;
303 tp_locvar
->sector
= blk_rq_pos(rq
);
304 tp_locvar
->nr_sector
= blk_rq_sectors(rq
);
305 tp_locvar
->cmd
= NULL
;
306 tp_locvar
->cmd_len
= 0;
311 ctf_integer(dev_t
, dev
,
312 rq
->rq_disk
? disk_devt(rq
->rq_disk
) : 0)
313 ctf_integer(sector_t
, sector
, tp_locvar
->sector
)
314 ctf_integer(unsigned int, nr_sector
, tp_locvar
->nr_sector
)
315 ctf_integer(int, errors
, rq
->errors
)
316 blk_rwbs_ctf_integer(unsigned int, rwbs
,
317 lttng_req_op(rq
), lttng_req_rw(rq
), blk_rq_bytes(rq
))
318 ctf_sequence_hex(unsigned char, cmd
,
319 tp_locvar
->cmd
, size_t, tp_locvar
->cmd_len
)
324 #endif /* #else #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,11,0)) */
326 #if (LTTNG_LINUX_VERSION_CODE < LTTNG_KERNEL_VERSION(4,12,0))
328 * block_rq_abort - abort block operation request
329 * @q: queue containing the block operation request
330 * @rq: block IO operation request
332 * Called immediately after pending block IO operation request @rq in
333 * queue @q is aborted. The fields in the operation request @rq
334 * can be examined to determine which device and sectors the pending
335 * operation would access.
337 LTTNG_TRACEPOINT_EVENT_INSTANCE(block_rq_with_error
, block_rq_abort
,
339 TP_PROTO(struct request_queue
*q
, struct request
*rq
),
345 #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,17,0))
347 * block_rq_requeue - place block IO request back on a queue
348 * @rq: block IO operation request
350 * The block operation request @rq is being placed back into queue
351 * @q. For some reason the request was not completed and needs to be
352 * put back in the queue.
354 LTTNG_TRACEPOINT_EVENT(block_rq_requeue
,
356 TP_PROTO(struct request
*rq
),
361 ctf_integer(dev_t
, dev
,
362 rq
->q
->disk
? disk_devt(rq
->q
->disk
) : 0)
363 ctf_integer(sector_t
, sector
, blk_rq_trace_sector(rq
))
364 ctf_integer(unsigned int, nr_sector
, blk_rq_trace_nr_sectors(rq
))
365 blk_rwbs_ctf_integer(unsigned int, rwbs
,
366 lttng_req_op(rq
), lttng_req_rw(rq
), blk_rq_bytes(rq
))
369 #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,11,0) \
370 || LTTNG_KERNEL_RANGE(5,10,137, 5,11,0) \
371 || LTTNG_RHEL_KERNEL_RANGE(4,18,0,372,0,0, 4,19,0,0,0,0))
373 * block_rq_requeue - place block IO request back on a queue
374 * @rq: block IO operation request
376 * The block operation request @rq is being placed back into queue
377 * @q. For some reason the request was not completed and needs to be
378 * put back in the queue.
380 LTTNG_TRACEPOINT_EVENT(block_rq_requeue
,
382 TP_PROTO(struct request
*rq
),
387 ctf_integer(dev_t
, dev
,
388 rq
->rq_disk
? disk_devt(rq
->rq_disk
) : 0)
389 ctf_integer(sector_t
, sector
, blk_rq_trace_sector(rq
))
390 ctf_integer(unsigned int, nr_sector
, blk_rq_trace_nr_sectors(rq
))
391 blk_rwbs_ctf_integer(unsigned int, rwbs
,
392 lttng_req_op(rq
), lttng_req_rw(rq
), blk_rq_bytes(rq
))
395 #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,12,0))
397 * block_rq_requeue - place block IO request back on a queue
398 * @q: queue holding operation
399 * @rq: block IO operation request
401 * The block operation request @rq is being placed back into queue
402 * @q. For some reason the request was not completed and needs to be
403 * put back in the queue.
405 LTTNG_TRACEPOINT_EVENT(block_rq_requeue
,
407 TP_PROTO(struct request_queue
*q
, struct request
*rq
),
412 ctf_integer(dev_t
, dev
,
413 rq
->rq_disk
? disk_devt(rq
->rq_disk
) : 0)
414 ctf_integer(sector_t
, sector
, blk_rq_trace_sector(rq
))
415 ctf_integer(unsigned int, nr_sector
, blk_rq_trace_nr_sectors(rq
))
416 blk_rwbs_ctf_integer(unsigned int, rwbs
,
417 lttng_req_op(rq
), lttng_req_rw(rq
), blk_rq_bytes(rq
))
421 LTTNG_TRACEPOINT_EVENT_INSTANCE(block_rq_with_error
, block_rq_requeue
,
423 TP_PROTO(struct request_queue
*q
, struct request
*rq
),
430 * block_rq_complete - block IO operation completed by device driver
431 * @q: queue containing the block operation request
432 * @rq: block operations request
433 * @nr_bytes: number of completed bytes
435 * The block_rq_complete tracepoint event indicates that some portion
436 * of operation request has been completed by the device driver. If
437 * the @rq->bio is %NULL, then there is absolutely no additional work to
438 * do for the request. If @rq->bio is non-NULL then there is
439 * additional work required to complete the request.
441 #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,17,0))
442 LTTNG_TRACEPOINT_EVENT(block_rq_complete
,
444 TP_PROTO(struct request
*rq
, blk_status_t error
, unsigned int nr_bytes
),
446 TP_ARGS(rq
, error
, nr_bytes
),
449 ctf_integer(dev_t
, dev
,
450 rq
->q
->disk
? disk_devt(rq
->q
->disk
) : 0)
451 ctf_integer(sector_t
, sector
, blk_rq_pos(rq
))
452 ctf_integer(unsigned int, nr_sector
, nr_bytes
>> 9)
453 ctf_integer(int, error
, blk_status_to_errno(error
))
454 blk_rwbs_ctf_integer(unsigned int, rwbs
,
455 lttng_req_op(rq
), lttng_req_rw(rq
), nr_bytes
)
458 #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,16,0) \
459 || LTTNG_RHEL_KERNEL_RANGE(5,14,0,70,0,0, 5,15,0,0,0,0))
460 LTTNG_TRACEPOINT_EVENT(block_rq_complete
,
462 TP_PROTO(struct request
*rq
, blk_status_t error
, unsigned int nr_bytes
),
464 TP_ARGS(rq
, error
, nr_bytes
),
467 ctf_integer(dev_t
, dev
,
468 rq
->rq_disk
? disk_devt(rq
->rq_disk
) : 0)
469 ctf_integer(sector_t
, sector
, blk_rq_pos(rq
))
470 ctf_integer(unsigned int, nr_sector
, nr_bytes
>> 9)
471 ctf_integer(int, error
, blk_status_to_errno(error
))
472 blk_rwbs_ctf_integer(unsigned int, rwbs
,
473 lttng_req_op(rq
), lttng_req_rw(rq
), nr_bytes
)
476 #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,12,0))
477 LTTNG_TRACEPOINT_EVENT(block_rq_complete
,
479 TP_PROTO(struct request
*rq
, int error
, unsigned int nr_bytes
),
481 TP_ARGS(rq
, error
, nr_bytes
),
484 ctf_integer(dev_t
, dev
,
485 rq
->rq_disk
? disk_devt(rq
->rq_disk
) : 0)
486 ctf_integer(sector_t
, sector
, blk_rq_pos(rq
))
487 ctf_integer(unsigned int, nr_sector
, nr_bytes
>> 9)
488 ctf_integer(int, error
, error
)
489 blk_rwbs_ctf_integer(unsigned int, rwbs
,
490 lttng_req_op(rq
), lttng_req_rw(rq
), nr_bytes
)
493 #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,11,0))
494 LTTNG_TRACEPOINT_EVENT_CODE(block_rq_complete
,
496 TP_PROTO(struct request_queue
*q
, struct request
*rq
,
497 unsigned int nr_bytes
),
499 TP_ARGS(q
, rq
, nr_bytes
),
507 if (blk_rq_is_scsi(rq
)) {
508 struct scsi_request
*scsi_rq
= scsi_req(rq
);
509 tp_locvar
->cmd
= scsi_rq
->cmd
;
510 tp_locvar
->cmd_len
= scsi_rq
->cmd_len
;
512 tp_locvar
->cmd
= NULL
;
513 tp_locvar
->cmd_len
= 0;
518 ctf_integer(dev_t
, dev
,
519 rq
->rq_disk
? disk_devt(rq
->rq_disk
) : 0)
520 ctf_integer(sector_t
, sector
, blk_rq_pos(rq
))
521 ctf_integer(unsigned int, nr_sector
, nr_bytes
>> 9)
522 ctf_integer(int, errors
, rq
->errors
)
523 blk_rwbs_ctf_integer(unsigned int, rwbs
,
524 lttng_req_op(rq
), lttng_req_rw(rq
), nr_bytes
)
525 ctf_sequence_hex(unsigned char, cmd
,
526 tp_locvar
->cmd
, size_t, tp_locvar
->cmd_len
)
531 #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,14,5) \
532 || LTTNG_KERNEL_RANGE(3,12,21, 3,13,0) \
533 || LTTNG_KERNEL_RANGE(3,10,41, 3,11,0) \
534 || LTTNG_KERNEL_RANGE(3,4,91, 3,5,0) \
535 || LTTNG_KERNEL_RANGE(3,2,58, 3,3,0) \
536 || LTTNG_UBUNTU_KERNEL_RANGE(3,13,11,28, 3,14,0,0) \
537 || LTTNG_RHEL_KERNEL_RANGE(3,10,0,229,0,0, 3,11,0,0,0,0))
539 LTTNG_TRACEPOINT_EVENT_CODE(block_rq_complete
,
541 TP_PROTO(struct request_queue
*q
, struct request
*rq
,
542 unsigned int nr_bytes
),
544 TP_ARGS(q
, rq
, nr_bytes
),
552 if (rq
->cmd_type
== REQ_TYPE_BLOCK_PC
) {
553 tp_locvar
->cmd
= rq
->cmd
;
554 tp_locvar
->cmd_len
= rq
->cmd_len
;
556 tp_locvar
->cmd
= NULL
;
557 tp_locvar
->cmd_len
= 0;
562 ctf_integer(dev_t
, dev
,
563 rq
->rq_disk
? disk_devt(rq
->rq_disk
) : 0)
564 ctf_integer(sector_t
, sector
, blk_rq_pos(rq
))
565 ctf_integer(unsigned int, nr_sector
, nr_bytes
>> 9)
566 ctf_integer(int, errors
, rq
->errors
)
567 blk_rwbs_ctf_integer(unsigned int, rwbs
,
568 lttng_req_op(rq
), lttng_req_rw(rq
), nr_bytes
)
569 ctf_sequence_hex(unsigned char, cmd
,
570 tp_locvar
->cmd
, size_t, tp_locvar
->cmd_len
)
576 #else /* #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,15,0)) */
579 * block_rq_complete - block IO operation completed by device driver
580 * @q: queue containing the block operation request
581 * @rq: block operations request
583 * The block_rq_complete tracepoint event indicates that some portion
584 * of operation request has been completed by the device driver. If
585 * the @rq->bio is %NULL, then there is absolutely no additional work to
586 * do for the request. If @rq->bio is non-NULL then there is
587 * additional work required to complete the request.
589 LTTNG_TRACEPOINT_EVENT_INSTANCE(block_rq_with_error
, block_rq_complete
,
591 TP_PROTO(struct request_queue
*q
, struct request
*rq
),
596 #endif /* #else #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,15,0)) */
598 #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,17,0))
599 LTTNG_TRACEPOINT_EVENT_CLASS(block_rq
,
601 TP_PROTO(struct request
*rq
),
606 ctf_integer(dev_t
, dev
,
607 rq
->q
->disk
? disk_devt(rq
->q
->disk
) : 0)
608 ctf_integer(sector_t
, sector
, blk_rq_trace_sector(rq
))
609 ctf_integer(unsigned int, nr_sector
, blk_rq_trace_nr_sectors(rq
))
610 ctf_integer(unsigned int, bytes
, blk_rq_bytes(rq
))
611 ctf_integer(pid_t
, tid
, current
->pid
)
612 blk_rwbs_ctf_integer(unsigned int, rwbs
,
613 lttng_req_op(rq
), lttng_req_rw(rq
), blk_rq_bytes(rq
))
614 ctf_array_text(char, comm
, current
->comm
, TASK_COMM_LEN
)
617 #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,11,0) \
618 || LTTNG_KERNEL_RANGE(5,10,137, 5,11,0) \
619 || LTTNG_RHEL_KERNEL_RANGE(4,18,0,372,0,0, 4,19,0,0,0,0))
620 LTTNG_TRACEPOINT_EVENT_CLASS(block_rq
,
622 TP_PROTO(struct request
*rq
),
627 ctf_integer(dev_t
, dev
,
628 rq
->rq_disk
? disk_devt(rq
->rq_disk
) : 0)
629 ctf_integer(sector_t
, sector
, blk_rq_trace_sector(rq
))
630 ctf_integer(unsigned int, nr_sector
, blk_rq_trace_nr_sectors(rq
))
631 ctf_integer(unsigned int, bytes
, blk_rq_bytes(rq
))
632 ctf_integer(pid_t
, tid
, current
->pid
)
633 blk_rwbs_ctf_integer(unsigned int, rwbs
,
634 lttng_req_op(rq
), lttng_req_rw(rq
), blk_rq_bytes(rq
))
635 ctf_array_text(char, comm
, current
->comm
, TASK_COMM_LEN
)
638 #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,12,0))
639 LTTNG_TRACEPOINT_EVENT_CLASS(block_rq
,
641 TP_PROTO(struct request_queue
*q
, struct request
*rq
),
646 ctf_integer(dev_t
, dev
,
647 rq
->rq_disk
? disk_devt(rq
->rq_disk
) : 0)
648 ctf_integer(sector_t
, sector
, blk_rq_trace_sector(rq
))
649 ctf_integer(unsigned int, nr_sector
, blk_rq_trace_nr_sectors(rq
))
650 ctf_integer(unsigned int, bytes
, blk_rq_bytes(rq
))
651 ctf_integer(pid_t
, tid
, current
->pid
)
652 blk_rwbs_ctf_integer(unsigned int, rwbs
,
653 lttng_req_op(rq
), lttng_req_rw(rq
), blk_rq_bytes(rq
))
654 ctf_array_text(char, comm
, current
->comm
, TASK_COMM_LEN
)
657 #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,11,0))
658 LTTNG_TRACEPOINT_EVENT_CLASS_CODE(block_rq
,
660 TP_PROTO(struct request_queue
*q
, struct request
*rq
),
666 unsigned int nr_sector
;
673 if (blk_rq_is_scsi(rq
)) {
674 struct scsi_request
*scsi_rq
= scsi_req(rq
);
675 tp_locvar
->sector
= 0;
676 tp_locvar
->nr_sector
= 0;
677 tp_locvar
->bytes
= scsi_rq
->resid_len
;
678 tp_locvar
->cmd
= scsi_rq
->cmd
;
679 tp_locvar
->cmd_len
= scsi_rq
->cmd_len
;
681 tp_locvar
->sector
= blk_rq_pos(rq
);
682 tp_locvar
->nr_sector
= blk_rq_sectors(rq
);
683 tp_locvar
->bytes
= 0;
684 tp_locvar
->cmd
= NULL
;
685 tp_locvar
->cmd_len
= 0;
690 ctf_integer(dev_t
, dev
,
691 rq
->rq_disk
? disk_devt(rq
->rq_disk
) : 0)
692 ctf_integer(sector_t
, sector
, tp_locvar
->sector
)
693 ctf_integer(unsigned int, nr_sector
, tp_locvar
->nr_sector
)
694 ctf_integer(unsigned int, bytes
, tp_locvar
->bytes
)
695 ctf_integer(pid_t
, tid
, current
->pid
)
696 blk_rwbs_ctf_integer(unsigned int, rwbs
,
697 lttng_req_op(rq
), lttng_req_rw(rq
), blk_rq_bytes(rq
))
698 ctf_sequence_hex(unsigned char, cmd
,
699 tp_locvar
->cmd
, size_t, tp_locvar
->cmd_len
)
700 ctf_array_text(char, comm
, current
->comm
, TASK_COMM_LEN
)
705 #else /* #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,11,0)) */
706 LTTNG_TRACEPOINT_EVENT_CLASS_CODE(block_rq
,
708 TP_PROTO(struct request_queue
*q
, struct request
*rq
),
714 unsigned int nr_sector
;
721 if (rq
->cmd_type
== REQ_TYPE_BLOCK_PC
) {
722 tp_locvar
->sector
= 0;
723 tp_locvar
->nr_sector
= 0;
724 tp_locvar
->bytes
= blk_rq_bytes(rq
);
725 tp_locvar
->cmd
= rq
->cmd
;
726 tp_locvar
->cmd_len
= rq
->cmd_len
;
728 tp_locvar
->sector
= blk_rq_pos(rq
);
729 tp_locvar
->nr_sector
= blk_rq_sectors(rq
);
730 tp_locvar
->bytes
= 0;
731 tp_locvar
->cmd
= NULL
;
732 tp_locvar
->cmd_len
= 0;
737 ctf_integer(dev_t
, dev
,
738 rq
->rq_disk
? disk_devt(rq
->rq_disk
) : 0)
739 ctf_integer(sector_t
, sector
, tp_locvar
->sector
)
740 ctf_integer(unsigned int, nr_sector
, tp_locvar
->nr_sector
)
741 ctf_integer(unsigned int, bytes
, tp_locvar
->bytes
)
742 ctf_integer(pid_t
, tid
, current
->pid
)
743 blk_rwbs_ctf_integer(unsigned int, rwbs
,
744 lttng_req_op(rq
), lttng_req_rw(rq
), blk_rq_bytes(rq
))
745 ctf_sequence_hex(unsigned char, cmd
,
746 tp_locvar
->cmd
, size_t, tp_locvar
->cmd_len
)
747 ctf_array_text(char, comm
, current
->comm
, TASK_COMM_LEN
)
752 #endif /* #else #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,11,0)) */
754 #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,11,0) \
755 || LTTNG_KERNEL_RANGE(5,10,137, 5,11,0) \
756 || LTTNG_RHEL_KERNEL_RANGE(4,18,0,372,0,0, 4,19,0,0,0,0))
758 * block_rq_insert - insert block operation request into queue
759 * @rq: block IO operation request
761 * Called immediately before block operation request @rq is inserted
762 * into queue @q. The fields in the operation request @rq struct can
763 * be examined to determine which device and sectors the pending
764 * operation would access.
766 LTTNG_TRACEPOINT_EVENT_INSTANCE(block_rq
, block_rq_insert
,
768 TP_PROTO(struct request
*rq
),
774 * block_rq_insert - insert block operation request into queue
776 * @rq: block IO operation request
778 * Called immediately before block operation request @rq is inserted
779 * into queue @q. The fields in the operation request @rq struct can
780 * be examined to determine which device and sectors the pending
781 * operation would access.
783 LTTNG_TRACEPOINT_EVENT_INSTANCE(block_rq
, block_rq_insert
,
785 TP_PROTO(struct request_queue
*q
, struct request
*rq
),
791 #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,11,0) \
792 || LTTNG_KERNEL_RANGE(5,10,137, 5,11,0) \
793 || LTTNG_RHEL_KERNEL_RANGE(4,18,0,372,0,0, 4,19,0,0,0,0))
795 * block_rq_issue - issue pending block IO request operation to device driver
796 * @rq: block IO operation operation request
798 * Called when block operation request @rq from queue @q is sent to a
799 * device driver for processing.
801 LTTNG_TRACEPOINT_EVENT_INSTANCE(block_rq
, block_rq_issue
,
803 TP_PROTO(struct request
*rq
),
809 * block_rq_issue - issue pending block IO request operation to device driver
810 * @q: queue holding operation
811 * @rq: block IO operation operation request
813 * Called when block operation request @rq from queue @q is sent to a
814 * device driver for processing.
816 LTTNG_TRACEPOINT_EVENT_INSTANCE(block_rq
, block_rq_issue
,
818 TP_PROTO(struct request_queue
*q
, struct request
*rq
),
824 #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,11,0) \
825 || LTTNG_KERNEL_RANGE(5,10,137, 5,11,0))
827 * block_rq_merge - merge request with another one in the elevator
828 * @rq: block IO operation operation request
830 * Called when block operation request @rq from queue @q is merged to another
831 * request queued in the elevator.
833 LTTNG_TRACEPOINT_EVENT_INSTANCE(block_rq
, block_rq_merge
,
835 TP_PROTO(struct request
*rq
),
839 #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,9,0))
841 * block_rq_merge - merge request with another one in the elevator
842 * @q: queue holding operation
843 * @rq: block IO operation operation request
845 * Called when block operation request @rq from queue @q is merged to another
846 * request queued in the elevator.
848 LTTNG_TRACEPOINT_EVENT_INSTANCE(block_rq
, block_rq_merge
,
850 TP_PROTO(struct request_queue
*q
, struct request
*rq
),
856 #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,8,0) || \
857 LTTNG_RHEL_KERNEL_RANGE(4,18,0,305,0,0, 4,19,0,0,0,0))
860 * block_bio_complete - completed all work on the block operation
861 * @q: queue holding the block operation
862 * @bio: block operation completed
863 * @error: io error value
865 * This tracepoint indicates there is no further work to do on this
866 * block IO operation @bio.
868 LTTNG_TRACEPOINT_EVENT(block_bio_complete
,
870 TP_PROTO(struct request_queue
*q
, struct bio
*bio
),
875 ctf_integer(dev_t
, dev
, bio_dev(bio
))
876 ctf_integer(sector_t
, sector
, bio
->bi_iter
.bi_sector
)
877 ctf_integer(unsigned int, nr_sector
, bio_sectors(bio
))
878 ctf_integer(int, error
, blk_status_to_errno(bio
->bi_status
))
879 blk_rwbs_ctf_integer(unsigned int, rwbs
,
880 lttng_bio_op(bio
), lttng_bio_rw(bio
),
881 bio
->bi_iter
.bi_size
)
884 #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,14,0))
886 * block_bio_complete - completed all work on the block operation
887 * @q: queue holding the block operation
888 * @bio: block operation completed
889 * @error: io error value
891 * This tracepoint indicates there is no further work to do on this
892 * block IO operation @bio.
894 LTTNG_TRACEPOINT_EVENT(block_bio_complete
,
896 TP_PROTO(struct request_queue
*q
, struct bio
*bio
, int error
),
898 TP_ARGS(q
, bio
, error
),
901 ctf_integer(dev_t
, dev
, bio_dev(bio
))
902 ctf_integer(sector_t
, sector
, bio
->bi_iter
.bi_sector
)
903 ctf_integer(unsigned int, nr_sector
, bio_sectors(bio
))
904 ctf_integer(int, error
, error
)
905 blk_rwbs_ctf_integer(unsigned int, rwbs
,
906 lttng_bio_op(bio
), lttng_bio_rw(bio
),
907 bio
->bi_iter
.bi_size
)
910 #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,14,0))
912 * block_bio_complete - completed all work on the block operation
913 * @q: queue holding the block operation
914 * @bio: block operation completed
915 * @error: io error value
917 * This tracepoint indicates there is no further work to do on this
918 * block IO operation @bio.
920 LTTNG_TRACEPOINT_EVENT(block_bio_complete
,
922 TP_PROTO(struct request_queue
*q
, struct bio
*bio
, int error
),
924 TP_ARGS(q
, bio
, error
),
927 ctf_integer(dev_t
, dev
, bio
->bi_bdev
->bd_dev
)
928 ctf_integer(sector_t
, sector
, bio
->bi_iter
.bi_sector
)
929 ctf_integer(unsigned int, nr_sector
, bio_sectors(bio
))
930 ctf_integer(int, error
, error
)
931 blk_rwbs_ctf_integer(unsigned int, rwbs
,
932 lttng_bio_op(bio
), lttng_bio_rw(bio
),
933 bio
->bi_iter
.bi_size
)
938 * block_bio_complete - completed all work on the block operation
939 * @q: queue holding the block operation
940 * @bio: block operation completed
941 * @error: io error value
943 * This tracepoint indicates there is no further work to do on this
944 * block IO operation @bio.
946 LTTNG_TRACEPOINT_EVENT(block_bio_complete
,
948 TP_PROTO(struct request_queue
*q
, struct bio
*bio
, int error
),
950 TP_ARGS(q
, bio
, error
),
953 ctf_integer(dev_t
, dev
, bio
->bi_bdev
->bd_dev
)
954 ctf_integer(sector_t
, sector
, bio
->bi_sector
)
955 ctf_integer(unsigned int, nr_sector
, bio
->bi_size
>> 9)
956 ctf_integer(int, error
, error
)
957 blk_rwbs_ctf_integer(unsigned int, rwbs
,
958 lttng_bio_op(bio
), lttng_bio_rw(bio
), bio
->bi_size
)
963 #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,11,0))
964 LTTNG_TRACEPOINT_EVENT_CLASS(block_bio
,
966 TP_PROTO(struct bio
*bio
),
971 ctf_integer(dev_t
, dev
, bio_dev(bio
))
972 ctf_integer(sector_t
, sector
, bio
->bi_iter
.bi_sector
)
973 ctf_integer(unsigned int, nr_sector
, bio_sectors(bio
))
974 blk_rwbs_ctf_integer(unsigned int, rwbs
,
975 lttng_bio_op(bio
), lttng_bio_rw(bio
),
976 bio
->bi_iter
.bi_size
)
977 ctf_integer(pid_t
, tid
, current
->pid
)
978 ctf_array_text(char, comm
, current
->comm
, TASK_COMM_LEN
)
981 #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,14,0))
982 LTTNG_TRACEPOINT_EVENT_CLASS(block_bio_merge
,
984 TP_PROTO(struct request_queue
*q
, struct request
*rq
, struct bio
*bio
),
989 ctf_integer(dev_t
, dev
, bio_dev(bio
))
990 ctf_integer(sector_t
, sector
, bio
->bi_iter
.bi_sector
)
991 ctf_integer(unsigned int, nr_sector
, bio_sectors(bio
))
992 blk_rwbs_ctf_integer(unsigned int, rwbs
,
993 lttng_bio_op(bio
), lttng_bio_rw(bio
),
994 bio
->bi_iter
.bi_size
)
995 ctf_integer(pid_t
, tid
, current
->pid
)
996 ctf_array_text(char, comm
, current
->comm
, TASK_COMM_LEN
)
999 #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,14,0))
1000 LTTNG_TRACEPOINT_EVENT_CLASS(block_bio_merge
,
1002 TP_PROTO(struct request_queue
*q
, struct request
*rq
, struct bio
*bio
),
1004 TP_ARGS(q
, rq
, bio
),
1007 ctf_integer(dev_t
, dev
, bio
->bi_bdev
->bd_dev
)
1008 ctf_integer(sector_t
, sector
, bio
->bi_iter
.bi_sector
)
1009 ctf_integer(unsigned int, nr_sector
, bio_sectors(bio
))
1010 blk_rwbs_ctf_integer(unsigned int, rwbs
,
1011 lttng_bio_op(bio
), lttng_bio_rw(bio
),
1012 bio
->bi_iter
.bi_size
)
1013 ctf_integer(pid_t
, tid
, current
->pid
)
1014 ctf_array_text(char, comm
, current
->comm
, TASK_COMM_LEN
)
1017 #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,9,0))
1018 LTTNG_TRACEPOINT_EVENT_CLASS(block_bio_merge
,
1020 TP_PROTO(struct request_queue
*q
, struct request
*rq
, struct bio
*bio
),
1022 TP_ARGS(q
, rq
, bio
),
1025 ctf_integer(dev_t
, dev
, bio
->bi_bdev
->bd_dev
)
1026 ctf_integer(sector_t
, sector
, bio
->bi_sector
)
1027 ctf_integer(unsigned int, nr_sector
, bio
->bi_size
>> 9)
1028 blk_rwbs_ctf_integer(unsigned int, rwbs
,
1029 lttng_bio_op(bio
), lttng_bio_rw(bio
), bio
->bi_size
)
1030 ctf_integer(pid_t
, tid
, current
->pid
)
1031 ctf_array_text(char, comm
, current
->comm
, TASK_COMM_LEN
)
1038 #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,11,0))
1040 * block_bio_bounce - used bounce buffer when processing block operation
1041 * @bio: block operation
1043 * A bounce buffer was used to handle the block operation @bio in @q.
1044 * This occurs when hardware limitations prevent a direct transfer of
1045 * data between the @bio data memory area and the IO device. Use of a
1046 * bounce buffer requires extra copying of data and decreases
1049 LTTNG_TRACEPOINT_EVENT_INSTANCE(block_bio
, block_bio_bounce
,
1051 TP_PROTO(struct bio
*bio
),
1055 #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,14,0))
1057 * block_bio_bounce - used bounce buffer when processing block operation
1058 * @q: queue holding the block operation
1059 * @bio: block operation
1061 * A bounce buffer was used to handle the block operation @bio in @q.
1062 * This occurs when hardware limitations prevent a direct transfer of
1063 * data between the @bio data memory area and the IO device. Use of a
1064 * bounce buffer requires extra copying of data and decreases
1067 LTTNG_TRACEPOINT_EVENT(block_bio_bounce
,
1069 TP_PROTO(struct request_queue
*q
, struct bio
*bio
),
1074 ctf_integer(dev_t
, dev
, bio_dev(bio
))
1075 ctf_integer(sector_t
, sector
, bio
->bi_iter
.bi_sector
)
1076 ctf_integer(unsigned int, nr_sector
, bio_sectors(bio
))
1077 blk_rwbs_ctf_integer(unsigned int, rwbs
,
1078 lttng_bio_op(bio
), lttng_bio_rw(bio
),
1079 bio
->bi_iter
.bi_size
)
1080 ctf_integer(pid_t
, tid
, current
->pid
)
1081 ctf_array_text(char, comm
, current
->comm
, TASK_COMM_LEN
)
1084 #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,14,0))
1085 LTTNG_TRACEPOINT_EVENT(block_bio_bounce
,
1087 TP_PROTO(struct request_queue
*q
, struct bio
*bio
),
1092 ctf_integer(dev_t
, dev
, bio
->bi_bdev
? bio
->bi_bdev
->bd_dev
: 0)
1093 ctf_integer(sector_t
, sector
, bio
->bi_iter
.bi_sector
)
1094 ctf_integer(unsigned int, nr_sector
, bio_sectors(bio
))
1095 blk_rwbs_ctf_integer(unsigned int, rwbs
,
1096 lttng_bio_op(bio
), lttng_bio_rw(bio
),
1097 bio
->bi_iter
.bi_size
)
1098 ctf_integer(pid_t
, tid
, current
->pid
)
1099 ctf_array_text(char, comm
, current
->comm
, TASK_COMM_LEN
)
1103 LTTNG_TRACEPOINT_EVENT(block_bio_bounce
,
1105 TP_PROTO(struct request_queue
*q
, struct bio
*bio
),
1110 ctf_integer(dev_t
, dev
, bio
->bi_bdev
? bio
->bi_bdev
->bd_dev
: 0)
1111 ctf_integer(sector_t
, sector
, bio
->bi_sector
)
1112 ctf_integer(unsigned int, nr_sector
, bio
->bi_size
>> 9)
1113 blk_rwbs_ctf_integer(unsigned int, rwbs
,
1114 lttng_bio_op(bio
), lttng_bio_rw(bio
),
1116 ctf_integer(pid_t
, tid
, current
->pid
)
1117 ctf_array_text(char, comm
, current
->comm
, TASK_COMM_LEN
)
1123 #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,11,0))
1125 * block_bio_backmerge - merging block operation to the end of an existing operation
1126 * @bio: new block operation to merge
1128 * Merging block request @bio to the end of an existing block request.
1130 LTTNG_TRACEPOINT_EVENT_INSTANCE(block_bio
, block_bio_backmerge
,
1132 TP_PROTO(struct bio
*bio
),
1138 * block_bio_frontmerge - merging block operation to the beginning of an existing operation
1139 * @bio: new block operation to merge
1141 * Merging block IO operation @bio to the beginning of an existing block request.
1143 LTTNG_TRACEPOINT_EVENT_INSTANCE(block_bio
, block_bio_frontmerge
,
1145 TP_PROTO(struct bio
*bio
),
1151 * block_bio_queue - putting new block IO operation in queue
1152 * @bio: new block operation
1154 * About to place the block IO operation @bio into queue @q.
1156 LTTNG_TRACEPOINT_EVENT_INSTANCE(block_bio
, block_bio_queue
,
1158 TP_PROTO(struct bio
*bio
),
1162 #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,9,0))
1164 * block_bio_backmerge - merging block operation to the end of an existing operation
1165 * @q: queue holding operation
1166 * @rq: request bio is being merged into
1167 * @bio: new block operation to merge
1169 * Merging block request @bio to the end of an existing block request
1172 LTTNG_TRACEPOINT_EVENT_INSTANCE(block_bio_merge
, block_bio_backmerge
,
1174 TP_PROTO(struct request_queue
*q
, struct request
*rq
, struct bio
*bio
),
1180 * block_bio_frontmerge - merging block operation to the beginning of an existing operation
1181 * @q: queue holding operation
1182 * @rq: request bio is being merged into
1183 * @bio: new block operation to merge
1185 * Merging block IO operation @bio to the beginning of an existing block
1186 * operation in queue @q.
1188 LTTNG_TRACEPOINT_EVENT_INSTANCE(block_bio_merge
, block_bio_frontmerge
,
1190 TP_PROTO(struct request_queue
*q
, struct request
*rq
, struct bio
*bio
),
1196 * block_bio_queue - putting new block IO operation in queue
1197 * @q: queue holding operation
1198 * @bio: new block operation
1200 * About to place the block IO operation @bio into queue @q.
1202 LTTNG_TRACEPOINT_EVENT(block_bio_queue
,
1204 TP_PROTO(struct request_queue
*q
, struct bio
*bio
),
1209 #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,14,0))
1210 ctf_integer(dev_t
, dev
, bio_dev(bio
))
1212 ctf_integer(dev_t
, dev
, bio
->bi_bdev
->bd_dev
)
1214 #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,14,0))
1215 ctf_integer(sector_t
, sector
, bio
->bi_iter
.bi_sector
)
1216 ctf_integer(unsigned int, nr_sector
, bio_sectors(bio
))
1217 blk_rwbs_ctf_integer(unsigned int, rwbs
,
1218 lttng_bio_op(bio
), lttng_bio_rw(bio
),
1219 bio
->bi_iter
.bi_size
)
1220 #else /* #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,14,0)) */
1221 ctf_integer(sector_t
, sector
, bio
->bi_sector
)
1222 ctf_integer(unsigned int, nr_sector
, bio
->bi_size
>> 9)
1223 blk_rwbs_ctf_integer(unsigned int, rwbs
,
1224 lttng_bio_op(bio
), lttng_bio_rw(bio
), bio
->bi_size
)
1225 #endif /* #else #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,14,0)) */
1226 ctf_integer(pid_t
, tid
, current
->pid
)
1227 ctf_array_text(char, comm
, current
->comm
, TASK_COMM_LEN
)
1230 #else /* if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,9,0)) */
1231 LTTNG_TRACEPOINT_EVENT_CLASS(block_bio
,
1233 TP_PROTO(struct request_queue
*q
, struct bio
*bio
),
1238 ctf_integer(dev_t
, dev
, bio
->bi_bdev
? bio
->bi_bdev
->bd_dev
: 0)
1239 ctf_integer(sector_t
, sector
, bio
->bi_sector
)
1240 ctf_integer(unsigned int, nr_sector
, bio
->bi_size
>> 9)
1241 blk_rwbs_ctf_integer(unsigned int, rwbs
,
1242 lttng_bio_op(bio
), lttng_bio_rw(bio
), bio
->bi_size
)
1243 ctf_integer(pid_t
, tid
, current
->pid
)
1244 ctf_array_text(char, comm
, current
->comm
, TASK_COMM_LEN
)
1249 * block_bio_backmerge - merging block operation to the end of an existing operation
1250 * @q: queue holding operation
1251 * @bio: new block operation to merge
1253 * Merging block request @bio to the end of an existing block request
1256 LTTNG_TRACEPOINT_EVENT_INSTANCE(block_bio
, block_bio_backmerge
,
1258 TP_PROTO(struct request_queue
*q
, struct bio
*bio
),
1264 * block_bio_frontmerge - merging block operation to the beginning of an existing operation
1265 * @q: queue holding operation
1266 * @bio: new block operation to merge
1268 * Merging block IO operation @bio to the beginning of an existing block
1269 * operation in queue @q.
1271 LTTNG_TRACEPOINT_EVENT_INSTANCE(block_bio
, block_bio_frontmerge
,
1273 TP_PROTO(struct request_queue
*q
, struct bio
*bio
),
1279 * block_bio_queue - putting new block IO operation in queue
1280 * @q: queue holding operation
1281 * @bio: new block operation
1283 * About to place the block IO operation @bio into queue @q.
1285 LTTNG_TRACEPOINT_EVENT_INSTANCE(block_bio
, block_bio_queue
,
1287 TP_PROTO(struct request_queue
*q
, struct bio
*bio
),
1291 #endif /* #else #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,9,0)) */
1293 #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,11,0))
1295 * block_getrq - get a free request entry in queue for block IO operations
1296 * @bio: pending block IO operation (can be %NULL)
1298 * A request struct has been allocated to handle the block IO operation @bio.
1300 LTTNG_TRACEPOINT_EVENT_INSTANCE(block_bio
, block_getrq
,
1302 TP_PROTO(struct bio
*bio
),
1307 LTTNG_TRACEPOINT_EVENT_CLASS(block_get_rq
,
1309 TP_PROTO(struct request_queue
*q
, struct bio
*bio
, int rw
),
1311 TP_ARGS(q
, bio
, rw
),
1314 #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,14,0))
1315 ctf_integer(dev_t
, dev
, bio
? bio_dev(bio
) : 0)
1317 ctf_integer(dev_t
, dev
, bio
? bio
->bi_bdev
->bd_dev
: 0)
1319 #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,14,0))
1320 ctf_integer(sector_t
, sector
, bio
? bio
->bi_iter
.bi_sector
: 0)
1321 ctf_integer(unsigned int, nr_sector
,
1322 bio
? bio_sectors(bio
) : 0)
1323 blk_rwbs_ctf_integer(unsigned int, rwbs
,
1324 bio
? lttng_bio_op(bio
) : 0,
1325 bio
? lttng_bio_rw(bio
) : 0,
1326 bio
? bio
->bi_iter
.bi_size
: 0)
1327 #else /* #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,14,0)) */
1328 ctf_integer(sector_t
, sector
, bio
? bio
->bi_sector
: 0)
1329 ctf_integer(unsigned int, nr_sector
,
1330 bio
? bio
->bi_size
>> 9 : 0)
1331 blk_rwbs_ctf_integer(unsigned int, rwbs
,
1332 bio
? lttng_bio_op(bio
) : 0,
1333 bio
? lttng_bio_rw(bio
) : 0,
1334 bio
? bio
->bi_size
: 0)
1335 #endif /* #else #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,14,0)) */
1336 ctf_integer(pid_t
, tid
, current
->pid
)
1337 ctf_array_text(char, comm
, current
->comm
, TASK_COMM_LEN
)
1342 * block_getrq - get a free request entry in queue for block IO operations
1343 * @q: queue for operations
1344 * @bio: pending block IO operation (can be %NULL)
1345 * @rw: low bit indicates a read (%0) or a write (%1)
1347 * A request struct for queue @q has been allocated to handle the
1348 * block IO operation @bio.
1350 LTTNG_TRACEPOINT_EVENT_INSTANCE(block_get_rq
, block_getrq
,
1352 TP_PROTO(struct request_queue
*q
, struct bio
*bio
, int rw
),
1358 * block_sleeprq - waiting to get a free request entry in queue for block IO operation
1359 * @q: queue for operation
1360 * @bio: pending block IO operation (can be %NULL)
1361 * @rw: low bit indicates a read (%0) or a write (%1)
1363 * In the case where a request struct cannot be provided for queue @q
1364 * the process needs to wait for an request struct to become
1365 * available. This tracepoint event is generated each time the
1366 * process goes to sleep waiting for request struct become available.
1368 LTTNG_TRACEPOINT_EVENT_INSTANCE(block_get_rq
, block_sleeprq
,
1370 TP_PROTO(struct request_queue
*q
, struct bio
*bio
, int rw
),
1377 * block_plug - keep operations requests in request queue
1378 * @q: request queue to plug
1380 * Plug the request queue @q. Do not allow block operation requests
1381 * to be sent to the device driver. Instead, accumulate requests in
1382 * the queue to improve throughput performance of the block device.
1384 LTTNG_TRACEPOINT_EVENT(block_plug
,
1386 TP_PROTO(struct request_queue
*q
),
1391 ctf_integer(pid_t
, tid
, current
->pid
)
1392 ctf_array_text(char, comm
, current
->comm
, TASK_COMM_LEN
)
1396 LTTNG_TRACEPOINT_EVENT_CLASS(block_unplug
,
1398 TP_PROTO(struct request_queue
*q
, unsigned int depth
, bool explicit),
1400 TP_ARGS(q
, depth
, explicit),
1403 ctf_integer(int, nr_rq
, depth
)
1404 ctf_integer(pid_t
, tid
, current
->pid
)
1405 ctf_array_text(char, comm
, current
->comm
, TASK_COMM_LEN
)
1410 * block_unplug - release of operations requests in request queue
1411 * @q: request queue to unplug
1412 * @depth: number of requests just added to the queue
1413 * @explicit: whether this was an explicit unplug, or one from schedule()
1415 * Unplug request queue @q because device driver is scheduled to work
1416 * on elements in the request queue.
1418 LTTNG_TRACEPOINT_EVENT_INSTANCE(block_unplug
, block_unplug
,
1420 TP_PROTO(struct request_queue
*q
, unsigned int depth
, bool explicit),
1422 TP_ARGS(q
, depth
, explicit)
1425 #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,11,0))
1427 * block_split - split a single bio struct into two bio structs
1428 * @bio: block operation being split
1429 * @new_sector: The starting sector for the new bio
1431 * The bio request @bio needs to be split into two bio requests. The newly
1432 * created @bio request starts at @new_sector. This split may be required due to
1433 * hardware limitations such as operation crossing device boundaries in a RAID
1436 LTTNG_TRACEPOINT_EVENT(block_split
,
1438 TP_PROTO(struct bio
*bio
, unsigned int new_sector
),
1440 TP_ARGS(bio
, new_sector
),
1443 ctf_integer(dev_t
, dev
, bio_dev(bio
))
1444 ctf_integer(sector_t
, sector
, bio
->bi_iter
.bi_sector
)
1445 blk_rwbs_ctf_integer(unsigned int, rwbs
,
1446 lttng_bio_op(bio
), lttng_bio_rw(bio
),
1447 bio
->bi_iter
.bi_size
)
1448 ctf_integer(sector_t
, new_sector
, new_sector
)
1449 ctf_integer(pid_t
, tid
, current
->pid
)
1450 ctf_array_text(char, comm
, current
->comm
, TASK_COMM_LEN
)
1454 #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,14,0))
1456 * block_split - split a single bio struct into two bio structs
1457 * @q: queue containing the bio
1458 * @bio: block operation being split
1459 * @new_sector: The starting sector for the new bio
1461 * The bio request @bio in request queue @q needs to be split into two
1462 * bio requests. The newly created @bio request starts at
1463 * @new_sector. This split may be required due to hardware limitation
1464 * such as operation crossing device boundaries in a RAID system.
1466 LTTNG_TRACEPOINT_EVENT(block_split
,
1468 TP_PROTO(struct request_queue
*q
, struct bio
*bio
,
1469 unsigned int new_sector
),
1471 TP_ARGS(q
, bio
, new_sector
),
1474 ctf_integer(dev_t
, dev
, bio_dev(bio
))
1475 ctf_integer(sector_t
, sector
, bio
->bi_iter
.bi_sector
)
1476 blk_rwbs_ctf_integer(unsigned int, rwbs
,
1477 lttng_bio_op(bio
), lttng_bio_rw(bio
),
1478 bio
->bi_iter
.bi_size
)
1479 ctf_integer(sector_t
, new_sector
, new_sector
)
1480 ctf_integer(pid_t
, tid
, current
->pid
)
1481 ctf_array_text(char, comm
, current
->comm
, TASK_COMM_LEN
)
1484 #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,14,0))
1485 LTTNG_TRACEPOINT_EVENT(block_split
,
1487 TP_PROTO(struct request_queue
*q
, struct bio
*bio
,
1488 unsigned int new_sector
),
1490 TP_ARGS(q
, bio
, new_sector
),
1493 ctf_integer(dev_t
, dev
, bio
->bi_bdev
->bd_dev
)
1494 ctf_integer(sector_t
, sector
, bio
->bi_iter
.bi_sector
)
1495 blk_rwbs_ctf_integer(unsigned int, rwbs
,
1496 lttng_bio_op(bio
), lttng_bio_rw(bio
),
1497 bio
->bi_iter
.bi_size
)
1498 ctf_integer(sector_t
, new_sector
, new_sector
)
1499 ctf_integer(pid_t
, tid
, current
->pid
)
1500 ctf_array_text(char, comm
, current
->comm
, TASK_COMM_LEN
)
1504 LTTNG_TRACEPOINT_EVENT(block_split
,
1506 TP_PROTO(struct request_queue
*q
, struct bio
*bio
,
1507 unsigned int new_sector
),
1509 TP_ARGS(q
, bio
, new_sector
),
1512 ctf_integer(dev_t
, dev
, bio
->bi_bdev
->bd_dev
)
1513 ctf_integer(sector_t
, sector
, bio
->bi_sector
)
1514 blk_rwbs_ctf_integer(unsigned int, rwbs
,
1515 lttng_bio_op(bio
), lttng_bio_rw(bio
), bio
->bi_size
)
1516 ctf_integer(sector_t
, new_sector
, new_sector
)
1517 ctf_integer(pid_t
, tid
, current
->pid
)
1518 ctf_array_text(char, comm
, current
->comm
, TASK_COMM_LEN
)
1523 #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,11,0))
1525 * block_bio_remap - map request for a logical device to the raw device
1526 * @bio: revised operation
1527 * @dev: original device for the operation
1528 * @from: original sector for the operation
1530 * An operation for a logical device has been mapped to the
1533 LTTNG_TRACEPOINT_EVENT(block_bio_remap
,
1535 TP_PROTO(struct bio
*bio
, dev_t dev
, sector_t from
),
1537 TP_ARGS(bio
, dev
, from
),
1540 ctf_integer(dev_t
, dev
, bio_dev(bio
))
1541 ctf_integer(sector_t
, sector
, bio
->bi_iter
.bi_sector
)
1542 ctf_integer(unsigned int, nr_sector
, bio_sectors(bio
))
1543 blk_rwbs_ctf_integer(unsigned int, rwbs
,
1544 lttng_bio_op(bio
), lttng_bio_rw(bio
),
1545 bio
->bi_iter
.bi_size
)
1546 ctf_integer(dev_t
, old_dev
, dev
)
1547 ctf_integer(sector_t
, old_sector
, from
)
1550 #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,14,0))
1552 * block_bio_remap - map request for a logical device to the raw device
1553 * @q: queue holding the operation
1554 * @bio: revised operation
1555 * @dev: device for the operation
1556 * @from: original sector for the operation
1558 * An operation for a logical device has been mapped to the
1561 LTTNG_TRACEPOINT_EVENT(block_bio_remap
,
1563 TP_PROTO(struct request_queue
*q
, struct bio
*bio
, dev_t dev
,
1566 TP_ARGS(q
, bio
, dev
, from
),
1569 ctf_integer(dev_t
, dev
, bio_dev(bio
))
1570 ctf_integer(sector_t
, sector
, bio
->bi_iter
.bi_sector
)
1571 ctf_integer(unsigned int, nr_sector
, bio_sectors(bio
))
1572 blk_rwbs_ctf_integer(unsigned int, rwbs
,
1573 lttng_bio_op(bio
), lttng_bio_rw(bio
),
1574 bio
->bi_iter
.bi_size
)
1575 ctf_integer(dev_t
, old_dev
, dev
)
1576 ctf_integer(sector_t
, old_sector
, from
)
1579 #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,14,0))
1580 LTTNG_TRACEPOINT_EVENT(block_bio_remap
,
1582 TP_PROTO(struct request_queue
*q
, struct bio
*bio
, dev_t dev
,
1585 TP_ARGS(q
, bio
, dev
, from
),
1588 ctf_integer(dev_t
, dev
, bio
->bi_bdev
->bd_dev
)
1589 ctf_integer(sector_t
, sector
, bio
->bi_iter
.bi_sector
)
1590 ctf_integer(unsigned int, nr_sector
, bio_sectors(bio
))
1591 blk_rwbs_ctf_integer(unsigned int, rwbs
,
1592 lttng_bio_op(bio
), lttng_bio_rw(bio
),
1593 bio
->bi_iter
.bi_size
)
1594 ctf_integer(dev_t
, old_dev
, dev
)
1595 ctf_integer(sector_t
, old_sector
, from
)
1599 LTTNG_TRACEPOINT_EVENT(block_bio_remap
,
1601 TP_PROTO(struct request_queue
*q
, struct bio
*bio
, dev_t dev
,
1604 TP_ARGS(q
, bio
, dev
, from
),
1607 ctf_integer(dev_t
, dev
, bio
->bi_bdev
->bd_dev
)
1608 ctf_integer(sector_t
, sector
, bio
->bi_sector
)
1609 ctf_integer(unsigned int, nr_sector
, bio
->bi_size
>> 9)
1610 blk_rwbs_ctf_integer(unsigned int, rwbs
,
1611 lttng_bio_op(bio
), lttng_bio_rw(bio
), bio
->bi_size
)
1612 ctf_integer(dev_t
, old_dev
, dev
)
1613 ctf_integer(sector_t
, old_sector
, from
)
1618 #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,17,0))
1620 * block_rq_remap - map request for a block operation request
1621 * @rq: block IO operation request
1622 * @dev: device for the operation
1623 * @from: original sector for the operation
1625 * The block operation request @rq in @q has been remapped. The block
1626 * operation request @rq holds the current information and @from hold
1627 * the original sector.
1629 LTTNG_TRACEPOINT_EVENT(block_rq_remap
,
1631 TP_PROTO(struct request
*rq
, dev_t dev
, sector_t from
),
1633 TP_ARGS(rq
, dev
, from
),
1636 ctf_integer(dev_t
, dev
, disk_devt(rq
->q
->disk
))
1637 ctf_integer(sector_t
, sector
, blk_rq_pos(rq
))
1638 ctf_integer(unsigned int, nr_sector
, blk_rq_sectors(rq
))
1639 ctf_integer(dev_t
, old_dev
, dev
)
1640 ctf_integer(sector_t
, old_sector
, from
)
1641 blk_rwbs_ctf_integer(unsigned int, rwbs
,
1642 lttng_req_op(rq
), lttng_req_rw(rq
), blk_rq_bytes(rq
))
1645 #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,11,0) \
1646 || LTTNG_KERNEL_RANGE(5,10,137, 5,11,0) \
1647 || LTTNG_RHEL_KERNEL_RANGE(4,18,0,372,0,0, 4,19,0,0,0,0))
1649 * block_rq_remap - map request for a block operation request
1650 * @rq: block IO operation request
1651 * @dev: device for the operation
1652 * @from: original sector for the operation
1654 * The block operation request @rq in @q has been remapped. The block
1655 * operation request @rq holds the current information and @from hold
1656 * the original sector.
1658 LTTNG_TRACEPOINT_EVENT(block_rq_remap
,
1660 TP_PROTO(struct request
*rq
, dev_t dev
, sector_t from
),
1662 TP_ARGS(rq
, dev
, from
),
1665 ctf_integer(dev_t
, dev
, disk_devt(rq
->rq_disk
))
1666 ctf_integer(sector_t
, sector
, blk_rq_pos(rq
))
1667 ctf_integer(unsigned int, nr_sector
, blk_rq_sectors(rq
))
1668 ctf_integer(dev_t
, old_dev
, dev
)
1669 ctf_integer(sector_t
, old_sector
, from
)
1670 blk_rwbs_ctf_integer(unsigned int, rwbs
,
1671 lttng_req_op(rq
), lttng_req_rw(rq
), blk_rq_bytes(rq
))
1676 * block_rq_remap - map request for a block operation request
1677 * @q: queue holding the operation
1678 * @rq: block IO operation request
1679 * @dev: device for the operation
1680 * @from: original sector for the operation
1682 * The block operation request @rq in @q has been remapped. The block
1683 * operation request @rq holds the current information and @from hold
1684 * the original sector.
1686 LTTNG_TRACEPOINT_EVENT(block_rq_remap
,
1688 TP_PROTO(struct request_queue
*q
, struct request
*rq
, dev_t dev
,
1691 TP_ARGS(q
, rq
, dev
, from
),
1694 ctf_integer(dev_t
, dev
, disk_devt(rq
->rq_disk
))
1695 ctf_integer(sector_t
, sector
, blk_rq_pos(rq
))
1696 ctf_integer(unsigned int, nr_sector
, blk_rq_sectors(rq
))
1697 ctf_integer(dev_t
, old_dev
, dev
)
1698 ctf_integer(sector_t
, old_sector
, from
)
1699 blk_rwbs_ctf_integer(unsigned int, rwbs
,
1700 lttng_req_op(rq
), lttng_req_rw(rq
), blk_rq_bytes(rq
))
1705 #undef __print_rwbs_flags
1706 #undef blk_fill_rwbs
1708 #endif /* LTTNG_TRACE_BLOCK_H */
1710 /* This part must be outside protection */
1711 #include <probes/define_trace.h>
This page took 0.073933 seconds and 5 git commands to generate.