598d75a947aab08d2aa082b6bb4835a5d1eb5913
1 /* SPDX-License-Identifier: GPL-2.0-only */
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 <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_KERNEL_RANGE(4,11,0, 5,18,0)
15 #include <scsi/scsi_request.h>
16 #endif /* LTTNG_KERNEL_RANGE(4,11,0, 5,18,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_TRACEPOINT_EVENT(block_rq_complete
,
461 TP_PROTO(struct request
*rq
, blk_status_t error
, unsigned int nr_bytes
),
463 TP_ARGS(rq
, error
, nr_bytes
),
466 ctf_integer(dev_t
, dev
,
467 rq
->rq_disk
? disk_devt(rq
->rq_disk
) : 0)
468 ctf_integer(sector_t
, sector
, blk_rq_pos(rq
))
469 ctf_integer(unsigned int, nr_sector
, nr_bytes
>> 9)
470 ctf_integer(int, error
, blk_status_to_errno(error
))
471 blk_rwbs_ctf_integer(unsigned int, rwbs
,
472 lttng_req_op(rq
), lttng_req_rw(rq
), nr_bytes
)
475 #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,12,0))
476 LTTNG_TRACEPOINT_EVENT(block_rq_complete
,
478 TP_PROTO(struct request
*rq
, int error
, unsigned int nr_bytes
),
480 TP_ARGS(rq
, error
, nr_bytes
),
483 ctf_integer(dev_t
, dev
,
484 rq
->rq_disk
? disk_devt(rq
->rq_disk
) : 0)
485 ctf_integer(sector_t
, sector
, blk_rq_pos(rq
))
486 ctf_integer(unsigned int, nr_sector
, nr_bytes
>> 9)
487 ctf_integer(int, error
, error
)
488 blk_rwbs_ctf_integer(unsigned int, rwbs
,
489 lttng_req_op(rq
), lttng_req_rw(rq
), nr_bytes
)
492 #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,11,0))
493 LTTNG_TRACEPOINT_EVENT_CODE(block_rq_complete
,
495 TP_PROTO(struct request_queue
*q
, struct request
*rq
,
496 unsigned int nr_bytes
),
498 TP_ARGS(q
, rq
, nr_bytes
),
506 if (blk_rq_is_scsi(rq
)) {
507 struct scsi_request
*scsi_rq
= scsi_req(rq
);
508 tp_locvar
->cmd
= scsi_rq
->cmd
;
509 tp_locvar
->cmd_len
= scsi_rq
->cmd_len
;
511 tp_locvar
->cmd
= NULL
;
512 tp_locvar
->cmd_len
= 0;
517 ctf_integer(dev_t
, dev
,
518 rq
->rq_disk
? disk_devt(rq
->rq_disk
) : 0)
519 ctf_integer(sector_t
, sector
, blk_rq_pos(rq
))
520 ctf_integer(unsigned int, nr_sector
, nr_bytes
>> 9)
521 ctf_integer(int, errors
, rq
->errors
)
522 blk_rwbs_ctf_integer(unsigned int, rwbs
,
523 lttng_req_op(rq
), lttng_req_rw(rq
), nr_bytes
)
524 ctf_sequence_hex(unsigned char, cmd
,
525 tp_locvar
->cmd
, size_t, tp_locvar
->cmd_len
)
530 #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,14,5) \
531 || LTTNG_KERNEL_RANGE(3,12,21, 3,13,0) \
532 || LTTNG_KERNEL_RANGE(3,10,41, 3,11,0) \
533 || LTTNG_KERNEL_RANGE(3,4,91, 3,5,0) \
534 || LTTNG_KERNEL_RANGE(3,2,58, 3,3,0) \
535 || LTTNG_UBUNTU_KERNEL_RANGE(3,13,11,28, 3,14,0,0) \
536 || LTTNG_RHEL_KERNEL_RANGE(3,10,0,229,0,0, 3,11,0,0,0,0))
538 LTTNG_TRACEPOINT_EVENT_CODE(block_rq_complete
,
540 TP_PROTO(struct request_queue
*q
, struct request
*rq
,
541 unsigned int nr_bytes
),
543 TP_ARGS(q
, rq
, nr_bytes
),
551 if (rq
->cmd_type
== REQ_TYPE_BLOCK_PC
) {
552 tp_locvar
->cmd
= rq
->cmd
;
553 tp_locvar
->cmd_len
= rq
->cmd_len
;
555 tp_locvar
->cmd
= NULL
;
556 tp_locvar
->cmd_len
= 0;
561 ctf_integer(dev_t
, dev
,
562 rq
->rq_disk
? disk_devt(rq
->rq_disk
) : 0)
563 ctf_integer(sector_t
, sector
, blk_rq_pos(rq
))
564 ctf_integer(unsigned int, nr_sector
, nr_bytes
>> 9)
565 ctf_integer(int, errors
, rq
->errors
)
566 blk_rwbs_ctf_integer(unsigned int, rwbs
,
567 lttng_req_op(rq
), lttng_req_rw(rq
), nr_bytes
)
568 ctf_sequence_hex(unsigned char, cmd
,
569 tp_locvar
->cmd
, size_t, tp_locvar
->cmd_len
)
575 #else /* #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,15,0)) */
578 * block_rq_complete - block IO operation completed by device driver
579 * @q: queue containing the block operation request
580 * @rq: block operations request
582 * The block_rq_complete tracepoint event indicates that some portion
583 * of operation request has been completed by the device driver. If
584 * the @rq->bio is %NULL, then there is absolutely no additional work to
585 * do for the request. If @rq->bio is non-NULL then there is
586 * additional work required to complete the request.
588 LTTNG_TRACEPOINT_EVENT_INSTANCE(block_rq_with_error
, block_rq_complete
,
590 TP_PROTO(struct request_queue
*q
, struct request
*rq
),
595 #endif /* #else #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,15,0)) */
597 #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,17,0))
598 LTTNG_TRACEPOINT_EVENT_CLASS(block_rq
,
600 TP_PROTO(struct request
*rq
),
605 ctf_integer(dev_t
, dev
,
606 rq
->q
->disk
? disk_devt(rq
->q
->disk
) : 0)
607 ctf_integer(sector_t
, sector
, blk_rq_trace_sector(rq
))
608 ctf_integer(unsigned int, nr_sector
, blk_rq_trace_nr_sectors(rq
))
609 ctf_integer(unsigned int, bytes
, blk_rq_bytes(rq
))
610 ctf_integer(pid_t
, tid
, current
->pid
)
611 blk_rwbs_ctf_integer(unsigned int, rwbs
,
612 lttng_req_op(rq
), lttng_req_rw(rq
), blk_rq_bytes(rq
))
613 ctf_array_text(char, comm
, current
->comm
, TASK_COMM_LEN
)
616 #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,11,0) \
617 || LTTNG_KERNEL_RANGE(5,10,137, 5,11,0) \
618 || LTTNG_RHEL_KERNEL_RANGE(4,18,0,372,0,0, 4,19,0,0,0,0))
619 LTTNG_TRACEPOINT_EVENT_CLASS(block_rq
,
621 TP_PROTO(struct request
*rq
),
626 ctf_integer(dev_t
, dev
,
627 rq
->rq_disk
? disk_devt(rq
->rq_disk
) : 0)
628 ctf_integer(sector_t
, sector
, blk_rq_trace_sector(rq
))
629 ctf_integer(unsigned int, nr_sector
, blk_rq_trace_nr_sectors(rq
))
630 ctf_integer(unsigned int, bytes
, blk_rq_bytes(rq
))
631 ctf_integer(pid_t
, tid
, current
->pid
)
632 blk_rwbs_ctf_integer(unsigned int, rwbs
,
633 lttng_req_op(rq
), lttng_req_rw(rq
), blk_rq_bytes(rq
))
634 ctf_array_text(char, comm
, current
->comm
, TASK_COMM_LEN
)
637 #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,12,0))
638 LTTNG_TRACEPOINT_EVENT_CLASS(block_rq
,
640 TP_PROTO(struct request_queue
*q
, struct request
*rq
),
645 ctf_integer(dev_t
, dev
,
646 rq
->rq_disk
? disk_devt(rq
->rq_disk
) : 0)
647 ctf_integer(sector_t
, sector
, blk_rq_trace_sector(rq
))
648 ctf_integer(unsigned int, nr_sector
, blk_rq_trace_nr_sectors(rq
))
649 ctf_integer(unsigned int, bytes
, blk_rq_bytes(rq
))
650 ctf_integer(pid_t
, tid
, current
->pid
)
651 blk_rwbs_ctf_integer(unsigned int, rwbs
,
652 lttng_req_op(rq
), lttng_req_rw(rq
), blk_rq_bytes(rq
))
653 ctf_array_text(char, comm
, current
->comm
, TASK_COMM_LEN
)
656 #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,11,0))
657 LTTNG_TRACEPOINT_EVENT_CLASS_CODE(block_rq
,
659 TP_PROTO(struct request_queue
*q
, struct request
*rq
),
665 unsigned int nr_sector
;
672 if (blk_rq_is_scsi(rq
)) {
673 struct scsi_request
*scsi_rq
= scsi_req(rq
);
674 tp_locvar
->sector
= 0;
675 tp_locvar
->nr_sector
= 0;
676 tp_locvar
->bytes
= scsi_rq
->resid_len
;
677 tp_locvar
->cmd
= scsi_rq
->cmd
;
678 tp_locvar
->cmd_len
= scsi_rq
->cmd_len
;
680 tp_locvar
->sector
= blk_rq_pos(rq
);
681 tp_locvar
->nr_sector
= blk_rq_sectors(rq
);
682 tp_locvar
->bytes
= 0;
683 tp_locvar
->cmd
= NULL
;
684 tp_locvar
->cmd_len
= 0;
689 ctf_integer(dev_t
, dev
,
690 rq
->rq_disk
? disk_devt(rq
->rq_disk
) : 0)
691 ctf_integer(sector_t
, sector
, tp_locvar
->sector
)
692 ctf_integer(unsigned int, nr_sector
, tp_locvar
->nr_sector
)
693 ctf_integer(unsigned int, bytes
, tp_locvar
->bytes
)
694 ctf_integer(pid_t
, tid
, current
->pid
)
695 blk_rwbs_ctf_integer(unsigned int, rwbs
,
696 lttng_req_op(rq
), lttng_req_rw(rq
), blk_rq_bytes(rq
))
697 ctf_sequence_hex(unsigned char, cmd
,
698 tp_locvar
->cmd
, size_t, tp_locvar
->cmd_len
)
699 ctf_array_text(char, comm
, current
->comm
, TASK_COMM_LEN
)
704 #else /* #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,11,0)) */
705 LTTNG_TRACEPOINT_EVENT_CLASS_CODE(block_rq
,
707 TP_PROTO(struct request_queue
*q
, struct request
*rq
),
713 unsigned int nr_sector
;
720 if (rq
->cmd_type
== REQ_TYPE_BLOCK_PC
) {
721 tp_locvar
->sector
= 0;
722 tp_locvar
->nr_sector
= 0;
723 tp_locvar
->bytes
= blk_rq_bytes(rq
);
724 tp_locvar
->cmd
= rq
->cmd
;
725 tp_locvar
->cmd_len
= rq
->cmd_len
;
727 tp_locvar
->sector
= blk_rq_pos(rq
);
728 tp_locvar
->nr_sector
= blk_rq_sectors(rq
);
729 tp_locvar
->bytes
= 0;
730 tp_locvar
->cmd
= NULL
;
731 tp_locvar
->cmd_len
= 0;
736 ctf_integer(dev_t
, dev
,
737 rq
->rq_disk
? disk_devt(rq
->rq_disk
) : 0)
738 ctf_integer(sector_t
, sector
, tp_locvar
->sector
)
739 ctf_integer(unsigned int, nr_sector
, tp_locvar
->nr_sector
)
740 ctf_integer(unsigned int, bytes
, tp_locvar
->bytes
)
741 ctf_integer(pid_t
, tid
, current
->pid
)
742 blk_rwbs_ctf_integer(unsigned int, rwbs
,
743 lttng_req_op(rq
), lttng_req_rw(rq
), blk_rq_bytes(rq
))
744 ctf_sequence_hex(unsigned char, cmd
,
745 tp_locvar
->cmd
, size_t, tp_locvar
->cmd_len
)
746 ctf_array_text(char, comm
, current
->comm
, TASK_COMM_LEN
)
751 #endif /* #else #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,11,0)) */
753 #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,11,0) \
754 || LTTNG_KERNEL_RANGE(5,10,137, 5,11,0) \
755 || LTTNG_RHEL_KERNEL_RANGE(4,18,0,372,0,0, 4,19,0,0,0,0))
757 * block_rq_insert - insert block operation request into queue
758 * @rq: block IO operation request
760 * Called immediately before block operation request @rq is inserted
761 * into queue @q. The fields in the operation request @rq struct can
762 * be examined to determine which device and sectors the pending
763 * operation would access.
765 LTTNG_TRACEPOINT_EVENT_INSTANCE(block_rq
, block_rq_insert
,
767 TP_PROTO(struct request
*rq
),
773 * block_rq_insert - insert block operation request into queue
775 * @rq: block IO operation request
777 * Called immediately before block operation request @rq is inserted
778 * into queue @q. The fields in the operation request @rq struct can
779 * be examined to determine which device and sectors the pending
780 * operation would access.
782 LTTNG_TRACEPOINT_EVENT_INSTANCE(block_rq
, block_rq_insert
,
784 TP_PROTO(struct request_queue
*q
, struct request
*rq
),
790 #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,11,0) \
791 || LTTNG_KERNEL_RANGE(5,10,137, 5,11,0) \
792 || LTTNG_RHEL_KERNEL_RANGE(4,18,0,372,0,0, 4,19,0,0,0,0))
794 * block_rq_issue - issue pending block IO request operation to device driver
795 * @rq: block IO operation operation request
797 * Called when block operation request @rq from queue @q is sent to a
798 * device driver for processing.
800 LTTNG_TRACEPOINT_EVENT_INSTANCE(block_rq
, block_rq_issue
,
802 TP_PROTO(struct request
*rq
),
808 * block_rq_issue - issue pending block IO request operation to device driver
809 * @q: queue holding operation
810 * @rq: block IO operation operation request
812 * Called when block operation request @rq from queue @q is sent to a
813 * device driver for processing.
815 LTTNG_TRACEPOINT_EVENT_INSTANCE(block_rq
, block_rq_issue
,
817 TP_PROTO(struct request_queue
*q
, struct request
*rq
),
823 #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,11,0) \
824 || LTTNG_KERNEL_RANGE(5,10,137, 5,11,0))
826 * block_rq_merge - merge request with another one in the elevator
827 * @rq: block IO operation operation request
829 * Called when block operation request @rq from queue @q is merged to another
830 * request queued in the elevator.
832 LTTNG_TRACEPOINT_EVENT_INSTANCE(block_rq
, block_rq_merge
,
834 TP_PROTO(struct request
*rq
),
838 #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,9,0))
840 * block_rq_merge - merge request with another one in the elevator
841 * @q: queue holding operation
842 * @rq: block IO operation operation request
844 * Called when block operation request @rq from queue @q is merged to another
845 * request queued in the elevator.
847 LTTNG_TRACEPOINT_EVENT_INSTANCE(block_rq
, block_rq_merge
,
849 TP_PROTO(struct request_queue
*q
, struct request
*rq
),
855 #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,8,0) || \
856 LTTNG_RHEL_KERNEL_RANGE(4,18,0,305,0,0, 4,19,0,0,0,0))
859 * block_bio_complete - completed all work on the block operation
860 * @q: queue holding the block operation
861 * @bio: block operation completed
862 * @error: io error value
864 * This tracepoint indicates there is no further work to do on this
865 * block IO operation @bio.
867 LTTNG_TRACEPOINT_EVENT(block_bio_complete
,
869 TP_PROTO(struct request_queue
*q
, struct bio
*bio
),
874 ctf_integer(dev_t
, dev
, bio_dev(bio
))
875 ctf_integer(sector_t
, sector
, bio
->bi_iter
.bi_sector
)
876 ctf_integer(unsigned int, nr_sector
, bio_sectors(bio
))
877 ctf_integer(int, error
, blk_status_to_errno(bio
->bi_status
))
878 blk_rwbs_ctf_integer(unsigned int, rwbs
,
879 lttng_bio_op(bio
), lttng_bio_rw(bio
),
880 bio
->bi_iter
.bi_size
)
883 #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,14,0))
885 * block_bio_complete - completed all work on the block operation
886 * @q: queue holding the block operation
887 * @bio: block operation completed
888 * @error: io error value
890 * This tracepoint indicates there is no further work to do on this
891 * block IO operation @bio.
893 LTTNG_TRACEPOINT_EVENT(block_bio_complete
,
895 TP_PROTO(struct request_queue
*q
, struct bio
*bio
, int error
),
897 TP_ARGS(q
, bio
, error
),
900 ctf_integer(dev_t
, dev
, bio_dev(bio
))
901 ctf_integer(sector_t
, sector
, bio
->bi_iter
.bi_sector
)
902 ctf_integer(unsigned int, nr_sector
, bio_sectors(bio
))
903 ctf_integer(int, error
, error
)
904 blk_rwbs_ctf_integer(unsigned int, rwbs
,
905 lttng_bio_op(bio
), lttng_bio_rw(bio
),
906 bio
->bi_iter
.bi_size
)
909 #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,14,0))
911 * block_bio_complete - completed all work on the block operation
912 * @q: queue holding the block operation
913 * @bio: block operation completed
914 * @error: io error value
916 * This tracepoint indicates there is no further work to do on this
917 * block IO operation @bio.
919 LTTNG_TRACEPOINT_EVENT(block_bio_complete
,
921 TP_PROTO(struct request_queue
*q
, struct bio
*bio
, int error
),
923 TP_ARGS(q
, bio
, error
),
926 ctf_integer(dev_t
, dev
, bio
->bi_bdev
->bd_dev
)
927 ctf_integer(sector_t
, sector
, bio
->bi_iter
.bi_sector
)
928 ctf_integer(unsigned int, nr_sector
, bio_sectors(bio
))
929 ctf_integer(int, error
, error
)
930 blk_rwbs_ctf_integer(unsigned int, rwbs
,
931 lttng_bio_op(bio
), lttng_bio_rw(bio
),
932 bio
->bi_iter
.bi_size
)
937 * block_bio_complete - completed all work on the block operation
938 * @q: queue holding the block operation
939 * @bio: block operation completed
940 * @error: io error value
942 * This tracepoint indicates there is no further work to do on this
943 * block IO operation @bio.
945 LTTNG_TRACEPOINT_EVENT(block_bio_complete
,
947 TP_PROTO(struct request_queue
*q
, struct bio
*bio
, int error
),
949 TP_ARGS(q
, bio
, error
),
952 ctf_integer(dev_t
, dev
, bio
->bi_bdev
->bd_dev
)
953 ctf_integer(sector_t
, sector
, bio
->bi_sector
)
954 ctf_integer(unsigned int, nr_sector
, bio
->bi_size
>> 9)
955 ctf_integer(int, error
, error
)
956 blk_rwbs_ctf_integer(unsigned int, rwbs
,
957 lttng_bio_op(bio
), lttng_bio_rw(bio
), bio
->bi_size
)
962 #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,11,0))
963 LTTNG_TRACEPOINT_EVENT_CLASS(block_bio
,
965 TP_PROTO(struct bio
*bio
),
970 ctf_integer(dev_t
, dev
, bio_dev(bio
))
971 ctf_integer(sector_t
, sector
, bio
->bi_iter
.bi_sector
)
972 ctf_integer(unsigned int, nr_sector
, bio_sectors(bio
))
973 blk_rwbs_ctf_integer(unsigned int, rwbs
,
974 lttng_bio_op(bio
), lttng_bio_rw(bio
),
975 bio
->bi_iter
.bi_size
)
976 ctf_integer(pid_t
, tid
, current
->pid
)
977 ctf_array_text(char, comm
, current
->comm
, TASK_COMM_LEN
)
980 #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,14,0))
981 LTTNG_TRACEPOINT_EVENT_CLASS(block_bio_merge
,
983 TP_PROTO(struct request_queue
*q
, struct request
*rq
, struct bio
*bio
),
988 ctf_integer(dev_t
, dev
, bio_dev(bio
))
989 ctf_integer(sector_t
, sector
, bio
->bi_iter
.bi_sector
)
990 ctf_integer(unsigned int, nr_sector
, bio_sectors(bio
))
991 blk_rwbs_ctf_integer(unsigned int, rwbs
,
992 lttng_bio_op(bio
), lttng_bio_rw(bio
),
993 bio
->bi_iter
.bi_size
)
994 ctf_integer(pid_t
, tid
, current
->pid
)
995 ctf_array_text(char, comm
, current
->comm
, TASK_COMM_LEN
)
998 #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,14,0))
999 LTTNG_TRACEPOINT_EVENT_CLASS(block_bio_merge
,
1001 TP_PROTO(struct request_queue
*q
, struct request
*rq
, struct bio
*bio
),
1003 TP_ARGS(q
, rq
, bio
),
1006 ctf_integer(dev_t
, dev
, bio
->bi_bdev
->bd_dev
)
1007 ctf_integer(sector_t
, sector
, bio
->bi_iter
.bi_sector
)
1008 ctf_integer(unsigned int, nr_sector
, bio_sectors(bio
))
1009 blk_rwbs_ctf_integer(unsigned int, rwbs
,
1010 lttng_bio_op(bio
), lttng_bio_rw(bio
),
1011 bio
->bi_iter
.bi_size
)
1012 ctf_integer(pid_t
, tid
, current
->pid
)
1013 ctf_array_text(char, comm
, current
->comm
, TASK_COMM_LEN
)
1016 #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,9,0))
1017 LTTNG_TRACEPOINT_EVENT_CLASS(block_bio_merge
,
1019 TP_PROTO(struct request_queue
*q
, struct request
*rq
, struct bio
*bio
),
1021 TP_ARGS(q
, rq
, bio
),
1024 ctf_integer(dev_t
, dev
, bio
->bi_bdev
->bd_dev
)
1025 ctf_integer(sector_t
, sector
, bio
->bi_sector
)
1026 ctf_integer(unsigned int, nr_sector
, bio
->bi_size
>> 9)
1027 blk_rwbs_ctf_integer(unsigned int, rwbs
,
1028 lttng_bio_op(bio
), lttng_bio_rw(bio
), bio
->bi_size
)
1029 ctf_integer(pid_t
, tid
, current
->pid
)
1030 ctf_array_text(char, comm
, current
->comm
, TASK_COMM_LEN
)
1037 #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,11,0))
1039 * block_bio_bounce - used bounce buffer when processing block operation
1040 * @bio: block operation
1042 * A bounce buffer was used to handle the block operation @bio in @q.
1043 * This occurs when hardware limitations prevent a direct transfer of
1044 * data between the @bio data memory area and the IO device. Use of a
1045 * bounce buffer requires extra copying of data and decreases
1048 LTTNG_TRACEPOINT_EVENT_INSTANCE(block_bio
, block_bio_bounce
,
1050 TP_PROTO(struct bio
*bio
),
1054 #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,14,0))
1056 * block_bio_bounce - used bounce buffer when processing block operation
1057 * @q: queue holding the block operation
1058 * @bio: block operation
1060 * A bounce buffer was used to handle the block operation @bio in @q.
1061 * This occurs when hardware limitations prevent a direct transfer of
1062 * data between the @bio data memory area and the IO device. Use of a
1063 * bounce buffer requires extra copying of data and decreases
1066 LTTNG_TRACEPOINT_EVENT(block_bio_bounce
,
1068 TP_PROTO(struct request_queue
*q
, struct bio
*bio
),
1073 ctf_integer(dev_t
, dev
, bio_dev(bio
))
1074 ctf_integer(sector_t
, sector
, bio
->bi_iter
.bi_sector
)
1075 ctf_integer(unsigned int, nr_sector
, bio_sectors(bio
))
1076 blk_rwbs_ctf_integer(unsigned int, rwbs
,
1077 lttng_bio_op(bio
), lttng_bio_rw(bio
),
1078 bio
->bi_iter
.bi_size
)
1079 ctf_integer(pid_t
, tid
, current
->pid
)
1080 ctf_array_text(char, comm
, current
->comm
, TASK_COMM_LEN
)
1083 #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,14,0))
1084 LTTNG_TRACEPOINT_EVENT(block_bio_bounce
,
1086 TP_PROTO(struct request_queue
*q
, struct bio
*bio
),
1091 ctf_integer(dev_t
, dev
, bio
->bi_bdev
? bio
->bi_bdev
->bd_dev
: 0)
1092 ctf_integer(sector_t
, sector
, bio
->bi_iter
.bi_sector
)
1093 ctf_integer(unsigned int, nr_sector
, bio_sectors(bio
))
1094 blk_rwbs_ctf_integer(unsigned int, rwbs
,
1095 lttng_bio_op(bio
), lttng_bio_rw(bio
),
1096 bio
->bi_iter
.bi_size
)
1097 ctf_integer(pid_t
, tid
, current
->pid
)
1098 ctf_array_text(char, comm
, current
->comm
, TASK_COMM_LEN
)
1102 LTTNG_TRACEPOINT_EVENT(block_bio_bounce
,
1104 TP_PROTO(struct request_queue
*q
, struct bio
*bio
),
1109 ctf_integer(dev_t
, dev
, bio
->bi_bdev
? bio
->bi_bdev
->bd_dev
: 0)
1110 ctf_integer(sector_t
, sector
, bio
->bi_sector
)
1111 ctf_integer(unsigned int, nr_sector
, bio
->bi_size
>> 9)
1112 blk_rwbs_ctf_integer(unsigned int, rwbs
,
1113 lttng_bio_op(bio
), lttng_bio_rw(bio
),
1115 ctf_integer(pid_t
, tid
, current
->pid
)
1116 ctf_array_text(char, comm
, current
->comm
, TASK_COMM_LEN
)
1122 #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,11,0))
1124 * block_bio_backmerge - merging block operation to the end of an existing operation
1125 * @bio: new block operation to merge
1127 * Merging block request @bio to the end of an existing block request.
1129 LTTNG_TRACEPOINT_EVENT_INSTANCE(block_bio
, block_bio_backmerge
,
1131 TP_PROTO(struct bio
*bio
),
1137 * block_bio_frontmerge - merging block operation to the beginning of an existing operation
1138 * @bio: new block operation to merge
1140 * Merging block IO operation @bio to the beginning of an existing block request.
1142 LTTNG_TRACEPOINT_EVENT_INSTANCE(block_bio
, block_bio_frontmerge
,
1144 TP_PROTO(struct bio
*bio
),
1150 * block_bio_queue - putting new block IO operation in queue
1151 * @bio: new block operation
1153 * About to place the block IO operation @bio into queue @q.
1155 LTTNG_TRACEPOINT_EVENT_INSTANCE(block_bio
, block_bio_queue
,
1157 TP_PROTO(struct bio
*bio
),
1161 #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,9,0))
1163 * block_bio_backmerge - merging block operation to the end of an existing operation
1164 * @q: queue holding operation
1165 * @rq: request bio is being merged into
1166 * @bio: new block operation to merge
1168 * Merging block request @bio to the end of an existing block request
1171 LTTNG_TRACEPOINT_EVENT_INSTANCE(block_bio_merge
, block_bio_backmerge
,
1173 TP_PROTO(struct request_queue
*q
, struct request
*rq
, struct bio
*bio
),
1179 * block_bio_frontmerge - merging block operation to the beginning of an existing operation
1180 * @q: queue holding operation
1181 * @rq: request bio is being merged into
1182 * @bio: new block operation to merge
1184 * Merging block IO operation @bio to the beginning of an existing block
1185 * operation in queue @q.
1187 LTTNG_TRACEPOINT_EVENT_INSTANCE(block_bio_merge
, block_bio_frontmerge
,
1189 TP_PROTO(struct request_queue
*q
, struct request
*rq
, struct bio
*bio
),
1195 * block_bio_queue - putting new block IO operation in queue
1196 * @q: queue holding operation
1197 * @bio: new block operation
1199 * About to place the block IO operation @bio into queue @q.
1201 LTTNG_TRACEPOINT_EVENT(block_bio_queue
,
1203 TP_PROTO(struct request_queue
*q
, struct bio
*bio
),
1208 #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,14,0))
1209 ctf_integer(dev_t
, dev
, bio_dev(bio
))
1211 ctf_integer(dev_t
, dev
, bio
->bi_bdev
->bd_dev
)
1213 #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,14,0))
1214 ctf_integer(sector_t
, sector
, bio
->bi_iter
.bi_sector
)
1215 ctf_integer(unsigned int, nr_sector
, bio_sectors(bio
))
1216 blk_rwbs_ctf_integer(unsigned int, rwbs
,
1217 lttng_bio_op(bio
), lttng_bio_rw(bio
),
1218 bio
->bi_iter
.bi_size
)
1219 #else /* #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,14,0)) */
1220 ctf_integer(sector_t
, sector
, bio
->bi_sector
)
1221 ctf_integer(unsigned int, nr_sector
, bio
->bi_size
>> 9)
1222 blk_rwbs_ctf_integer(unsigned int, rwbs
,
1223 lttng_bio_op(bio
), lttng_bio_rw(bio
), bio
->bi_size
)
1224 #endif /* #else #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,14,0)) */
1225 ctf_integer(pid_t
, tid
, current
->pid
)
1226 ctf_array_text(char, comm
, current
->comm
, TASK_COMM_LEN
)
1229 #else /* if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,9,0)) */
1230 LTTNG_TRACEPOINT_EVENT_CLASS(block_bio
,
1232 TP_PROTO(struct request_queue
*q
, struct bio
*bio
),
1237 ctf_integer(dev_t
, dev
, bio
->bi_bdev
? bio
->bi_bdev
->bd_dev
: 0)
1238 ctf_integer(sector_t
, sector
, bio
->bi_sector
)
1239 ctf_integer(unsigned int, nr_sector
, bio
->bi_size
>> 9)
1240 blk_rwbs_ctf_integer(unsigned int, rwbs
,
1241 lttng_bio_op(bio
), lttng_bio_rw(bio
), bio
->bi_size
)
1242 ctf_integer(pid_t
, tid
, current
->pid
)
1243 ctf_array_text(char, comm
, current
->comm
, TASK_COMM_LEN
)
1248 * block_bio_backmerge - merging block operation to the end of an existing operation
1249 * @q: queue holding operation
1250 * @bio: new block operation to merge
1252 * Merging block request @bio to the end of an existing block request
1255 LTTNG_TRACEPOINT_EVENT_INSTANCE(block_bio
, block_bio_backmerge
,
1257 TP_PROTO(struct request_queue
*q
, struct bio
*bio
),
1263 * block_bio_frontmerge - merging block operation to the beginning of an existing operation
1264 * @q: queue holding operation
1265 * @bio: new block operation to merge
1267 * Merging block IO operation @bio to the beginning of an existing block
1268 * operation in queue @q.
1270 LTTNG_TRACEPOINT_EVENT_INSTANCE(block_bio
, block_bio_frontmerge
,
1272 TP_PROTO(struct request_queue
*q
, struct bio
*bio
),
1278 * block_bio_queue - putting new block IO operation in queue
1279 * @q: queue holding operation
1280 * @bio: new block operation
1282 * About to place the block IO operation @bio into queue @q.
1284 LTTNG_TRACEPOINT_EVENT_INSTANCE(block_bio
, block_bio_queue
,
1286 TP_PROTO(struct request_queue
*q
, struct bio
*bio
),
1290 #endif /* #else #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,9,0)) */
1292 #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,11,0))
1294 * block_getrq - get a free request entry in queue for block IO operations
1295 * @bio: pending block IO operation (can be %NULL)
1297 * A request struct has been allocated to handle the block IO operation @bio.
1299 LTTNG_TRACEPOINT_EVENT_INSTANCE(block_bio
, block_getrq
,
1301 TP_PROTO(struct bio
*bio
),
1306 LTTNG_TRACEPOINT_EVENT_CLASS(block_get_rq
,
1308 TP_PROTO(struct request_queue
*q
, struct bio
*bio
, int rw
),
1310 TP_ARGS(q
, bio
, rw
),
1313 #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,14,0))
1314 ctf_integer(dev_t
, dev
, bio
? bio_dev(bio
) : 0)
1316 ctf_integer(dev_t
, dev
, bio
? bio
->bi_bdev
->bd_dev
: 0)
1318 #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,14,0))
1319 ctf_integer(sector_t
, sector
, bio
? bio
->bi_iter
.bi_sector
: 0)
1320 ctf_integer(unsigned int, nr_sector
,
1321 bio
? bio_sectors(bio
) : 0)
1322 blk_rwbs_ctf_integer(unsigned int, rwbs
,
1323 bio
? lttng_bio_op(bio
) : 0,
1324 bio
? lttng_bio_rw(bio
) : 0,
1325 bio
? bio
->bi_iter
.bi_size
: 0)
1326 #else /* #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,14,0)) */
1327 ctf_integer(sector_t
, sector
, bio
? bio
->bi_sector
: 0)
1328 ctf_integer(unsigned int, nr_sector
,
1329 bio
? bio
->bi_size
>> 9 : 0)
1330 blk_rwbs_ctf_integer(unsigned int, rwbs
,
1331 bio
? lttng_bio_op(bio
) : 0,
1332 bio
? lttng_bio_rw(bio
) : 0,
1333 bio
? bio
->bi_size
: 0)
1334 #endif /* #else #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,14,0)) */
1335 ctf_integer(pid_t
, tid
, current
->pid
)
1336 ctf_array_text(char, comm
, current
->comm
, TASK_COMM_LEN
)
1341 * block_getrq - get a free request entry in queue for block IO operations
1342 * @q: queue for operations
1343 * @bio: pending block IO operation (can be %NULL)
1344 * @rw: low bit indicates a read (%0) or a write (%1)
1346 * A request struct for queue @q has been allocated to handle the
1347 * block IO operation @bio.
1349 LTTNG_TRACEPOINT_EVENT_INSTANCE(block_get_rq
, block_getrq
,
1351 TP_PROTO(struct request_queue
*q
, struct bio
*bio
, int rw
),
1357 * block_sleeprq - waiting to get a free request entry in queue for block IO operation
1358 * @q: queue for operation
1359 * @bio: pending block IO operation (can be %NULL)
1360 * @rw: low bit indicates a read (%0) or a write (%1)
1362 * In the case where a request struct cannot be provided for queue @q
1363 * the process needs to wait for an request struct to become
1364 * available. This tracepoint event is generated each time the
1365 * process goes to sleep waiting for request struct become available.
1367 LTTNG_TRACEPOINT_EVENT_INSTANCE(block_get_rq
, block_sleeprq
,
1369 TP_PROTO(struct request_queue
*q
, struct bio
*bio
, int rw
),
1376 * block_plug - keep operations requests in request queue
1377 * @q: request queue to plug
1379 * Plug the request queue @q. Do not allow block operation requests
1380 * to be sent to the device driver. Instead, accumulate requests in
1381 * the queue to improve throughput performance of the block device.
1383 LTTNG_TRACEPOINT_EVENT(block_plug
,
1385 TP_PROTO(struct request_queue
*q
),
1390 ctf_integer(pid_t
, tid
, current
->pid
)
1391 ctf_array_text(char, comm
, current
->comm
, TASK_COMM_LEN
)
1395 LTTNG_TRACEPOINT_EVENT_CLASS(block_unplug
,
1397 TP_PROTO(struct request_queue
*q
, unsigned int depth
, bool explicit),
1399 TP_ARGS(q
, depth
, explicit),
1402 ctf_integer(int, nr_rq
, depth
)
1403 ctf_integer(pid_t
, tid
, current
->pid
)
1404 ctf_array_text(char, comm
, current
->comm
, TASK_COMM_LEN
)
1409 * block_unplug - release of operations requests in request queue
1410 * @q: request queue to unplug
1411 * @depth: number of requests just added to the queue
1412 * @explicit: whether this was an explicit unplug, or one from schedule()
1414 * Unplug request queue @q because device driver is scheduled to work
1415 * on elements in the request queue.
1417 LTTNG_TRACEPOINT_EVENT_INSTANCE(block_unplug
, block_unplug
,
1419 TP_PROTO(struct request_queue
*q
, unsigned int depth
, bool explicit),
1421 TP_ARGS(q
, depth
, explicit)
1424 #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,11,0))
1426 * block_split - split a single bio struct into two bio structs
1427 * @bio: block operation being split
1428 * @new_sector: The starting sector for the new bio
1430 * The bio request @bio needs to be split into two bio requests. The newly
1431 * created @bio request starts at @new_sector. This split may be required due to
1432 * hardware limitations such as operation crossing device boundaries in a RAID
1435 LTTNG_TRACEPOINT_EVENT(block_split
,
1437 TP_PROTO(struct bio
*bio
, unsigned int new_sector
),
1439 TP_ARGS(bio
, new_sector
),
1442 ctf_integer(dev_t
, dev
, bio_dev(bio
))
1443 ctf_integer(sector_t
, sector
, bio
->bi_iter
.bi_sector
)
1444 blk_rwbs_ctf_integer(unsigned int, rwbs
,
1445 lttng_bio_op(bio
), lttng_bio_rw(bio
),
1446 bio
->bi_iter
.bi_size
)
1447 ctf_integer(sector_t
, new_sector
, new_sector
)
1448 ctf_integer(pid_t
, tid
, current
->pid
)
1449 ctf_array_text(char, comm
, current
->comm
, TASK_COMM_LEN
)
1453 #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,14,0))
1455 * block_split - split a single bio struct into two bio structs
1456 * @q: queue containing the bio
1457 * @bio: block operation being split
1458 * @new_sector: The starting sector for the new bio
1460 * The bio request @bio in request queue @q needs to be split into two
1461 * bio requests. The newly created @bio request starts at
1462 * @new_sector. This split may be required due to hardware limitation
1463 * such as operation crossing device boundaries in a RAID system.
1465 LTTNG_TRACEPOINT_EVENT(block_split
,
1467 TP_PROTO(struct request_queue
*q
, struct bio
*bio
,
1468 unsigned int new_sector
),
1470 TP_ARGS(q
, bio
, new_sector
),
1473 ctf_integer(dev_t
, dev
, bio_dev(bio
))
1474 ctf_integer(sector_t
, sector
, bio
->bi_iter
.bi_sector
)
1475 blk_rwbs_ctf_integer(unsigned int, rwbs
,
1476 lttng_bio_op(bio
), lttng_bio_rw(bio
),
1477 bio
->bi_iter
.bi_size
)
1478 ctf_integer(sector_t
, new_sector
, new_sector
)
1479 ctf_integer(pid_t
, tid
, current
->pid
)
1480 ctf_array_text(char, comm
, current
->comm
, TASK_COMM_LEN
)
1483 #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,14,0))
1484 LTTNG_TRACEPOINT_EVENT(block_split
,
1486 TP_PROTO(struct request_queue
*q
, struct bio
*bio
,
1487 unsigned int new_sector
),
1489 TP_ARGS(q
, bio
, new_sector
),
1492 ctf_integer(dev_t
, dev
, bio
->bi_bdev
->bd_dev
)
1493 ctf_integer(sector_t
, sector
, bio
->bi_iter
.bi_sector
)
1494 blk_rwbs_ctf_integer(unsigned int, rwbs
,
1495 lttng_bio_op(bio
), lttng_bio_rw(bio
),
1496 bio
->bi_iter
.bi_size
)
1497 ctf_integer(sector_t
, new_sector
, new_sector
)
1498 ctf_integer(pid_t
, tid
, current
->pid
)
1499 ctf_array_text(char, comm
, current
->comm
, TASK_COMM_LEN
)
1503 LTTNG_TRACEPOINT_EVENT(block_split
,
1505 TP_PROTO(struct request_queue
*q
, struct bio
*bio
,
1506 unsigned int new_sector
),
1508 TP_ARGS(q
, bio
, new_sector
),
1511 ctf_integer(dev_t
, dev
, bio
->bi_bdev
->bd_dev
)
1512 ctf_integer(sector_t
, sector
, bio
->bi_sector
)
1513 blk_rwbs_ctf_integer(unsigned int, rwbs
,
1514 lttng_bio_op(bio
), lttng_bio_rw(bio
), bio
->bi_size
)
1515 ctf_integer(sector_t
, new_sector
, new_sector
)
1516 ctf_integer(pid_t
, tid
, current
->pid
)
1517 ctf_array_text(char, comm
, current
->comm
, TASK_COMM_LEN
)
1522 #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,11,0))
1524 * block_bio_remap - map request for a logical device to the raw device
1525 * @bio: revised operation
1526 * @dev: original device for the operation
1527 * @from: original sector for the operation
1529 * An operation for a logical device has been mapped to the
1532 LTTNG_TRACEPOINT_EVENT(block_bio_remap
,
1534 TP_PROTO(struct bio
*bio
, dev_t dev
, sector_t from
),
1536 TP_ARGS(bio
, dev
, from
),
1539 ctf_integer(dev_t
, dev
, bio_dev(bio
))
1540 ctf_integer(sector_t
, sector
, bio
->bi_iter
.bi_sector
)
1541 ctf_integer(unsigned int, nr_sector
, bio_sectors(bio
))
1542 blk_rwbs_ctf_integer(unsigned int, rwbs
,
1543 lttng_bio_op(bio
), lttng_bio_rw(bio
),
1544 bio
->bi_iter
.bi_size
)
1545 ctf_integer(dev_t
, old_dev
, dev
)
1546 ctf_integer(sector_t
, old_sector
, from
)
1549 #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,14,0))
1551 * block_bio_remap - map request for a logical device to the raw device
1552 * @q: queue holding the operation
1553 * @bio: revised operation
1554 * @dev: device for the operation
1555 * @from: original sector for the operation
1557 * An operation for a logical device has been mapped to the
1560 LTTNG_TRACEPOINT_EVENT(block_bio_remap
,
1562 TP_PROTO(struct request_queue
*q
, struct bio
*bio
, dev_t dev
,
1565 TP_ARGS(q
, bio
, dev
, from
),
1568 ctf_integer(dev_t
, dev
, bio_dev(bio
))
1569 ctf_integer(sector_t
, sector
, bio
->bi_iter
.bi_sector
)
1570 ctf_integer(unsigned int, nr_sector
, bio_sectors(bio
))
1571 blk_rwbs_ctf_integer(unsigned int, rwbs
,
1572 lttng_bio_op(bio
), lttng_bio_rw(bio
),
1573 bio
->bi_iter
.bi_size
)
1574 ctf_integer(dev_t
, old_dev
, dev
)
1575 ctf_integer(sector_t
, old_sector
, from
)
1578 #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,14,0))
1579 LTTNG_TRACEPOINT_EVENT(block_bio_remap
,
1581 TP_PROTO(struct request_queue
*q
, struct bio
*bio
, dev_t dev
,
1584 TP_ARGS(q
, bio
, dev
, from
),
1587 ctf_integer(dev_t
, dev
, bio
->bi_bdev
->bd_dev
)
1588 ctf_integer(sector_t
, sector
, bio
->bi_iter
.bi_sector
)
1589 ctf_integer(unsigned int, nr_sector
, bio_sectors(bio
))
1590 blk_rwbs_ctf_integer(unsigned int, rwbs
,
1591 lttng_bio_op(bio
), lttng_bio_rw(bio
),
1592 bio
->bi_iter
.bi_size
)
1593 ctf_integer(dev_t
, old_dev
, dev
)
1594 ctf_integer(sector_t
, old_sector
, from
)
1598 LTTNG_TRACEPOINT_EVENT(block_bio_remap
,
1600 TP_PROTO(struct request_queue
*q
, struct bio
*bio
, dev_t dev
,
1603 TP_ARGS(q
, bio
, dev
, from
),
1606 ctf_integer(dev_t
, dev
, bio
->bi_bdev
->bd_dev
)
1607 ctf_integer(sector_t
, sector
, bio
->bi_sector
)
1608 ctf_integer(unsigned int, nr_sector
, bio
->bi_size
>> 9)
1609 blk_rwbs_ctf_integer(unsigned int, rwbs
,
1610 lttng_bio_op(bio
), lttng_bio_rw(bio
), bio
->bi_size
)
1611 ctf_integer(dev_t
, old_dev
, dev
)
1612 ctf_integer(sector_t
, old_sector
, from
)
1617 #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,17,0))
1619 * block_rq_remap - map request for a block operation request
1620 * @rq: block IO operation request
1621 * @dev: device for the operation
1622 * @from: original sector for the operation
1624 * The block operation request @rq in @q has been remapped. The block
1625 * operation request @rq holds the current information and @from hold
1626 * the original sector.
1628 LTTNG_TRACEPOINT_EVENT(block_rq_remap
,
1630 TP_PROTO(struct request
*rq
, dev_t dev
, sector_t from
),
1632 TP_ARGS(rq
, dev
, from
),
1635 ctf_integer(dev_t
, dev
, disk_devt(rq
->q
->disk
))
1636 ctf_integer(sector_t
, sector
, blk_rq_pos(rq
))
1637 ctf_integer(unsigned int, nr_sector
, blk_rq_sectors(rq
))
1638 ctf_integer(dev_t
, old_dev
, dev
)
1639 ctf_integer(sector_t
, old_sector
, from
)
1640 blk_rwbs_ctf_integer(unsigned int, rwbs
,
1641 lttng_req_op(rq
), lttng_req_rw(rq
), blk_rq_bytes(rq
))
1644 #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,11,0) \
1645 || LTTNG_KERNEL_RANGE(5,10,137, 5,11,0) \
1646 || LTTNG_RHEL_KERNEL_RANGE(4,18,0,372,0,0, 4,19,0,0,0,0))
1648 * block_rq_remap - map request for a block operation request
1649 * @rq: block IO operation request
1650 * @dev: device for the operation
1651 * @from: original sector for the operation
1653 * The block operation request @rq in @q has been remapped. The block
1654 * operation request @rq holds the current information and @from hold
1655 * the original sector.
1657 LTTNG_TRACEPOINT_EVENT(block_rq_remap
,
1659 TP_PROTO(struct request
*rq
, dev_t dev
, sector_t from
),
1661 TP_ARGS(rq
, dev
, from
),
1664 ctf_integer(dev_t
, dev
, disk_devt(rq
->rq_disk
))
1665 ctf_integer(sector_t
, sector
, blk_rq_pos(rq
))
1666 ctf_integer(unsigned int, nr_sector
, blk_rq_sectors(rq
))
1667 ctf_integer(dev_t
, old_dev
, dev
)
1668 ctf_integer(sector_t
, old_sector
, from
)
1669 blk_rwbs_ctf_integer(unsigned int, rwbs
,
1670 lttng_req_op(rq
), lttng_req_rw(rq
), blk_rq_bytes(rq
))
1675 * block_rq_remap - map request for a block operation request
1676 * @q: queue holding the operation
1677 * @rq: block IO operation request
1678 * @dev: device for the operation
1679 * @from: original sector for the operation
1681 * The block operation request @rq in @q has been remapped. The block
1682 * operation request @rq holds the current information and @from hold
1683 * the original sector.
1685 LTTNG_TRACEPOINT_EVENT(block_rq_remap
,
1687 TP_PROTO(struct request_queue
*q
, struct request
*rq
, dev_t dev
,
1690 TP_ARGS(q
, rq
, dev
, from
),
1693 ctf_integer(dev_t
, dev
, disk_devt(rq
->rq_disk
))
1694 ctf_integer(sector_t
, sector
, blk_rq_pos(rq
))
1695 ctf_integer(unsigned int, nr_sector
, blk_rq_sectors(rq
))
1696 ctf_integer(dev_t
, old_dev
, dev
)
1697 ctf_integer(sector_t
, old_sector
, from
)
1698 blk_rwbs_ctf_integer(unsigned int, rwbs
,
1699 lttng_req_op(rq
), lttng_req_rw(rq
), blk_rq_bytes(rq
))
1704 #undef __print_rwbs_flags
1705 #undef blk_fill_rwbs
1707 #endif /* LTTNG_TRACE_BLOCK_H */
1709 /* This part must be outside protection */
1710 #include <lttng/define_trace.h>
This page took 0.061847 seconds and 3 git commands to generate.