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_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 || LTTNG_RHEL_KERNEL_RANGE(5,14,0,162,0,0, 5,15,0,0,0,0))
71 #ifdef CONFIG_LTTNG_EXPERIMENTAL_BITWISE_ENUM
72 #define blk_rwbs_ctf_integer(type, rwbs, op, rw, bytes) \
73 ctf_enum(block_rq_type, type, rwbs, \
74 ( (op) == REQ_OP_WRITE ? RWBS_FLAG_WRITE : \
75 ( (op) == REQ_OP_DISCARD ? RWBS_FLAG_DISCARD : \
76 ( (op) == REQ_OP_SECURE_ERASE ? (RWBS_FLAG_DISCARD | RWBS_FLAG_SECURE) : \
77 ( (op) == REQ_OP_FLUSH ? RWBS_FLAG_FLUSH : \
78 ( (op) == REQ_OP_READ ? RWBS_FLAG_READ : \
80 | ((rw) & REQ_RAHEAD ? RWBS_FLAG_RAHEAD : 0) \
81 | ((rw) & REQ_SYNC ? RWBS_FLAG_SYNC : 0) \
82 | ((rw) & REQ_META ? RWBS_FLAG_META : 0) \
83 | ((rw) & REQ_PREFLUSH ? RWBS_FLAG_PREFLUSH : 0) \
84 | ((rw) & REQ_FUA ? RWBS_FLAG_FUA : 0))
86 #define blk_rwbs_ctf_integer(type, rwbs, op, rw, bytes) \
87 ctf_integer(type, rwbs, \
88 ( (op) == REQ_OP_WRITE ? RWBS_FLAG_WRITE : \
89 ( (op) == REQ_OP_DISCARD ? RWBS_FLAG_DISCARD : \
90 ( (op) == REQ_OP_SECURE_ERASE ? (RWBS_FLAG_DISCARD | RWBS_FLAG_SECURE) : \
91 ( (op) == REQ_OP_FLUSH ? RWBS_FLAG_FLUSH : \
92 ( (op) == REQ_OP_READ ? RWBS_FLAG_READ : \
94 | ((rw) & REQ_RAHEAD ? RWBS_FLAG_RAHEAD : 0) \
95 | ((rw) & REQ_SYNC ? RWBS_FLAG_SYNC : 0) \
96 | ((rw) & REQ_META ? RWBS_FLAG_META : 0) \
97 | ((rw) & REQ_PREFLUSH ? RWBS_FLAG_PREFLUSH : 0) \
98 | ((rw) & REQ_FUA ? RWBS_FLAG_FUA : 0))
99 #endif /* CONFIG_LTTNG_EXPERIMENTAL_BITWISE_ENUM */
101 #ifdef CONFIG_LTTNG_EXPERIMENTAL_BITWISE_ENUM
102 #define blk_rwbs_ctf_integer(type, rwbs, op, rw, bytes) \
103 ctf_enum(block_rq_type, type, rwbs, \
104 (((op) == REQ_OP_WRITE || (op) == REQ_OP_WRITE_SAME) ? RWBS_FLAG_WRITE : \
105 ( (op) == REQ_OP_DISCARD ? RWBS_FLAG_DISCARD : \
106 ( (op) == REQ_OP_SECURE_ERASE ? (RWBS_FLAG_DISCARD | RWBS_FLAG_SECURE) : \
107 ( (op) == REQ_OP_FLUSH ? RWBS_FLAG_FLUSH : \
108 ( (op) == REQ_OP_READ ? RWBS_FLAG_READ : \
110 | ((rw) & REQ_RAHEAD ? RWBS_FLAG_RAHEAD : 0) \
111 | ((rw) & REQ_SYNC ? RWBS_FLAG_SYNC : 0) \
112 | ((rw) & REQ_META ? RWBS_FLAG_META : 0) \
113 | ((rw) & REQ_PREFLUSH ? RWBS_FLAG_PREFLUSH : 0) \
114 | ((rw) & REQ_FUA ? RWBS_FLAG_FUA : 0))
116 #define blk_rwbs_ctf_integer(type, rwbs, op, rw, bytes) \
117 ctf_integer(type, rwbs, \
118 (((op) == REQ_OP_WRITE || (op) == REQ_OP_WRITE_SAME) ? RWBS_FLAG_WRITE : \
119 ( (op) == REQ_OP_DISCARD ? RWBS_FLAG_DISCARD : \
120 ( (op) == REQ_OP_SECURE_ERASE ? (RWBS_FLAG_DISCARD | RWBS_FLAG_SECURE) : \
121 ( (op) == REQ_OP_FLUSH ? RWBS_FLAG_FLUSH : \
122 ( (op) == REQ_OP_READ ? RWBS_FLAG_READ : \
124 | ((rw) & REQ_RAHEAD ? RWBS_FLAG_RAHEAD : 0) \
125 | ((rw) & REQ_SYNC ? RWBS_FLAG_SYNC : 0) \
126 | ((rw) & REQ_META ? RWBS_FLAG_META : 0) \
127 | ((rw) & REQ_PREFLUSH ? RWBS_FLAG_PREFLUSH : 0) \
128 | ((rw) & REQ_FUA ? RWBS_FLAG_FUA : 0))
129 #endif /* CONFIG_LTTNG_EXPERIMENTAL_BITWISE_ENUM */
132 #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,1,0))
134 #define lttng_req_op(rq)
135 #define lttng_req_rw(rq) ((rq)->cmd_flags)
136 #define lttng_bio_op(bio)
137 #define lttng_bio_rw(bio) ((bio)->bi_rw)
139 #ifdef CONFIG_LTTNG_EXPERIMENTAL_BITWISE_ENUM
140 #define blk_rwbs_ctf_integer(type, rwbs, op, rw, bytes) \
141 ctf_enum(block_rq_type, type, rwbs, ((rw) & WRITE ? RWBS_FLAG_WRITE : \
142 ( (rw) & REQ_DISCARD ? RWBS_FLAG_DISCARD : \
143 ( (bytes) ? RWBS_FLAG_READ : \
145 | ((rw) & REQ_RAHEAD ? RWBS_FLAG_RAHEAD : 0) \
146 | ((rw) & REQ_SYNC ? RWBS_FLAG_SYNC : 0) \
147 | ((rw) & REQ_META ? RWBS_FLAG_META : 0) \
148 | ((rw) & REQ_SECURE ? RWBS_FLAG_SECURE : 0) \
149 | ((rw) & REQ_FLUSH ? RWBS_FLAG_FLUSH : 0) \
150 | ((rw) & REQ_FUA ? RWBS_FLAG_FUA : 0))
152 #define blk_rwbs_ctf_integer(type, rwbs, op, rw, bytes) \
153 ctf_integer(type, rwbs, ((rw) & WRITE ? RWBS_FLAG_WRITE : \
154 ( (rw) & REQ_DISCARD ? RWBS_FLAG_DISCARD : \
155 ( (bytes) ? RWBS_FLAG_READ : \
157 | ((rw) & REQ_RAHEAD ? RWBS_FLAG_RAHEAD : 0) \
158 | ((rw) & REQ_SYNC ? RWBS_FLAG_SYNC : 0) \
159 | ((rw) & REQ_META ? RWBS_FLAG_META : 0) \
160 | ((rw) & REQ_SECURE ? RWBS_FLAG_SECURE : 0) \
161 | ((rw) & REQ_FLUSH ? RWBS_FLAG_FLUSH : 0) \
162 | ((rw) & REQ_FUA ? RWBS_FLAG_FUA : 0))
163 #endif /* CONFIG_LTTNG_EXPERIMENTAL_BITWISE_ENUM */
167 #define lttng_req_op(rq)
168 #define lttng_req_rw(rq) ((rq)->cmd_flags)
169 #define lttng_bio_op(bio)
170 #define lttng_bio_rw(bio) ((bio)->bi_rw)
172 #ifdef CONFIG_LTTNG_EXPERIMENTAL_BITWISE_ENUM
173 #define blk_rwbs_ctf_integer(type, rwbs, op, rw, bytes) \
174 ctf_enum(block_rq_type, type, rwbs, ((rw) & WRITE ? RWBS_FLAG_WRITE : \
175 ( (rw) & REQ_DISCARD ? RWBS_FLAG_DISCARD : \
176 ( (bytes) ? RWBS_FLAG_READ : \
178 | ((rw) & REQ_RAHEAD ? RWBS_FLAG_RAHEAD : 0) \
179 | ((rw) & REQ_SYNC ? RWBS_FLAG_SYNC : 0) \
180 | ((rw) & REQ_META ? RWBS_FLAG_META : 0) \
181 | ((rw) & REQ_SECURE ? RWBS_FLAG_SECURE : 0))
183 #define blk_rwbs_ctf_integer(type, rwbs, op, rw, bytes) \
184 ctf_integer(type, rwbs, ((rw) & WRITE ? RWBS_FLAG_WRITE : \
185 ( (rw) & REQ_DISCARD ? RWBS_FLAG_DISCARD : \
186 ( (bytes) ? RWBS_FLAG_READ : \
188 | ((rw) & REQ_RAHEAD ? RWBS_FLAG_RAHEAD : 0) \
189 | ((rw) & REQ_SYNC ? RWBS_FLAG_SYNC : 0) \
190 | ((rw) & REQ_META ? RWBS_FLAG_META : 0) \
191 | ((rw) & REQ_SECURE ? RWBS_FLAG_SECURE : 0))
192 #endif /* CONFIG_LTTNG_EXPERIMENTAL_BITWISE_ENUM */
196 #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,9,0))
197 LTTNG_TRACEPOINT_EVENT_CLASS(block_buffer
,
199 TP_PROTO(struct buffer_head
*bh
),
204 ctf_integer(dev_t
, dev
, bh
->b_bdev
->bd_dev
)
205 ctf_integer(sector_t
, sector
, bh
->b_blocknr
)
206 ctf_integer(size_t, size
, bh
->b_size
)
211 * block_touch_buffer - mark a buffer accessed
212 * @bh: buffer_head being touched
214 * Called from touch_buffer().
216 LTTNG_TRACEPOINT_EVENT_INSTANCE(block_buffer
, block_touch_buffer
,
218 TP_PROTO(struct buffer_head
*bh
),
224 * block_dirty_buffer - mark a buffer dirty
225 * @bh: buffer_head being dirtied
227 * Called from mark_buffer_dirty().
229 LTTNG_TRACEPOINT_EVENT_INSTANCE(block_buffer
, block_dirty_buffer
,
231 TP_PROTO(struct buffer_head
*bh
),
237 #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,12,0))
238 /* block_rq_with_error event class removed in kernel 4.12 */
239 #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,11,0))
240 LTTNG_TRACEPOINT_EVENT_CLASS_CODE(block_rq_with_error
,
242 TP_PROTO(struct request_queue
*q
, struct request
*rq
),
248 unsigned int nr_sector
;
254 if (blk_rq_is_scsi(rq
)) {
255 struct scsi_request
*scsi_rq
= scsi_req(rq
);
256 tp_locvar
->sector
= 0;
257 tp_locvar
->nr_sector
= 0;
258 tp_locvar
->cmd
= scsi_rq
->cmd
;
259 tp_locvar
->cmd_len
= scsi_rq
->cmd_len
;
261 tp_locvar
->sector
= blk_rq_pos(rq
);
262 tp_locvar
->nr_sector
= blk_rq_sectors(rq
);
263 tp_locvar
->cmd
= NULL
;
264 tp_locvar
->cmd_len
= 0;
269 ctf_integer(dev_t
, dev
,
270 rq
->rq_disk
? disk_devt(rq
->rq_disk
) : 0)
271 ctf_integer(sector_t
, sector
, tp_locvar
->sector
)
272 ctf_integer(unsigned int, nr_sector
, tp_locvar
->nr_sector
)
273 ctf_integer(int, errors
, rq
->errors
)
274 blk_rwbs_ctf_integer(unsigned int, rwbs
,
275 lttng_req_op(rq
), lttng_req_rw(rq
), blk_rq_bytes(rq
))
276 ctf_sequence_hex(unsigned char, cmd
,
277 tp_locvar
->cmd
, size_t, tp_locvar
->cmd_len
)
282 #else /* #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,11,0)) */
283 LTTNG_TRACEPOINT_EVENT_CLASS_CODE(block_rq_with_error
,
285 TP_PROTO(struct request_queue
*q
, struct request
*rq
),
291 unsigned int nr_sector
;
298 if (rq
->cmd_type
== REQ_TYPE_BLOCK_PC
) {
299 tp_locvar
->sector
= 0;
300 tp_locvar
->nr_sector
= 0;
301 tp_locvar
->cmd
= rq
->cmd
;
302 tp_locvar
->cmd_len
= rq
->cmd_len
;
304 tp_locvar
->sector
= blk_rq_pos(rq
);
305 tp_locvar
->nr_sector
= blk_rq_sectors(rq
);
306 tp_locvar
->cmd
= NULL
;
307 tp_locvar
->cmd_len
= 0;
312 ctf_integer(dev_t
, dev
,
313 rq
->rq_disk
? disk_devt(rq
->rq_disk
) : 0)
314 ctf_integer(sector_t
, sector
, tp_locvar
->sector
)
315 ctf_integer(unsigned int, nr_sector
, tp_locvar
->nr_sector
)
316 ctf_integer(int, errors
, rq
->errors
)
317 blk_rwbs_ctf_integer(unsigned int, rwbs
,
318 lttng_req_op(rq
), lttng_req_rw(rq
), blk_rq_bytes(rq
))
319 ctf_sequence_hex(unsigned char, cmd
,
320 tp_locvar
->cmd
, size_t, tp_locvar
->cmd_len
)
325 #endif /* #else #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,11,0)) */
327 #if (LTTNG_LINUX_VERSION_CODE < LTTNG_KERNEL_VERSION(4,12,0))
329 * block_rq_abort - abort block operation request
330 * @q: queue containing the block operation request
331 * @rq: block IO operation request
333 * Called immediately after pending block IO operation request @rq in
334 * queue @q is aborted. The fields in the operation request @rq
335 * can be examined to determine which device and sectors the pending
336 * operation would access.
338 LTTNG_TRACEPOINT_EVENT_INSTANCE(block_rq_with_error
, block_rq_abort
,
340 TP_PROTO(struct request_queue
*q
, struct request
*rq
),
346 #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,17,0) \
347 || LTTNG_RHEL_KERNEL_RANGE(5,14,0,162,0,0, 5,15,0,0,0,0))
349 * block_rq_requeue - place block IO request back on a queue
350 * @rq: block IO operation request
352 * The block operation request @rq is being placed back into queue
353 * @q. For some reason the request was not completed and needs to be
354 * put back in the queue.
356 LTTNG_TRACEPOINT_EVENT(block_rq_requeue
,
358 TP_PROTO(struct request
*rq
),
363 ctf_integer(dev_t
, dev
,
364 rq
->q
->disk
? disk_devt(rq
->q
->disk
) : 0)
365 ctf_integer(sector_t
, sector
, blk_rq_trace_sector(rq
))
366 ctf_integer(unsigned int, nr_sector
, blk_rq_trace_nr_sectors(rq
))
367 blk_rwbs_ctf_integer(unsigned int, rwbs
,
368 lttng_req_op(rq
), lttng_req_rw(rq
), blk_rq_bytes(rq
))
371 #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,11,0) \
372 || LTTNG_KERNEL_RANGE(5,10,137, 5,11,0) \
373 || LTTNG_RHEL_KERNEL_RANGE(4,18,0,372,0,0, 4,19,0,0,0,0))
375 * block_rq_requeue - place block IO request back on a queue
376 * @rq: block IO operation request
378 * The block operation request @rq is being placed back into queue
379 * @q. For some reason the request was not completed and needs to be
380 * put back in the queue.
382 LTTNG_TRACEPOINT_EVENT(block_rq_requeue
,
384 TP_PROTO(struct request
*rq
),
389 ctf_integer(dev_t
, dev
,
390 rq
->rq_disk
? disk_devt(rq
->rq_disk
) : 0)
391 ctf_integer(sector_t
, sector
, blk_rq_trace_sector(rq
))
392 ctf_integer(unsigned int, nr_sector
, blk_rq_trace_nr_sectors(rq
))
393 blk_rwbs_ctf_integer(unsigned int, rwbs
,
394 lttng_req_op(rq
), lttng_req_rw(rq
), blk_rq_bytes(rq
))
397 #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,12,0))
399 * block_rq_requeue - place block IO request back on a queue
400 * @q: queue holding operation
401 * @rq: block IO operation request
403 * The block operation request @rq is being placed back into queue
404 * @q. For some reason the request was not completed and needs to be
405 * put back in the queue.
407 LTTNG_TRACEPOINT_EVENT(block_rq_requeue
,
409 TP_PROTO(struct request_queue
*q
, struct request
*rq
),
414 ctf_integer(dev_t
, dev
,
415 rq
->rq_disk
? disk_devt(rq
->rq_disk
) : 0)
416 ctf_integer(sector_t
, sector
, blk_rq_trace_sector(rq
))
417 ctf_integer(unsigned int, nr_sector
, blk_rq_trace_nr_sectors(rq
))
418 blk_rwbs_ctf_integer(unsigned int, rwbs
,
419 lttng_req_op(rq
), lttng_req_rw(rq
), blk_rq_bytes(rq
))
423 LTTNG_TRACEPOINT_EVENT_INSTANCE(block_rq_with_error
, block_rq_requeue
,
425 TP_PROTO(struct request_queue
*q
, struct request
*rq
),
432 * block_rq_complete - block IO operation completed by device driver
433 * @q: queue containing the block operation request
434 * @rq: block operations request
435 * @nr_bytes: number of completed bytes
437 * The block_rq_complete tracepoint event indicates that some portion
438 * of operation request has been completed by the device driver. If
439 * the @rq->bio is %NULL, then there is absolutely no additional work to
440 * do for the request. If @rq->bio is non-NULL then there is
441 * additional work required to complete the request.
443 #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,17,0) \
444 || LTTNG_RHEL_KERNEL_RANGE(5,14,0,162,0,0, 5,15,0,0,0,0))
445 LTTNG_TRACEPOINT_EVENT(block_rq_complete
,
447 TP_PROTO(struct request
*rq
, blk_status_t error
, unsigned int nr_bytes
),
449 TP_ARGS(rq
, error
, nr_bytes
),
452 ctf_integer(dev_t
, dev
,
453 rq
->q
->disk
? disk_devt(rq
->q
->disk
) : 0)
454 ctf_integer(sector_t
, sector
, blk_rq_pos(rq
))
455 ctf_integer(unsigned int, nr_sector
, nr_bytes
>> 9)
456 ctf_integer(int, error
, blk_status_to_errno(error
))
457 blk_rwbs_ctf_integer(unsigned int, rwbs
,
458 lttng_req_op(rq
), lttng_req_rw(rq
), nr_bytes
)
461 #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,16,0) \
462 || LTTNG_RHEL_KERNEL_RANGE(5,14,0,70,0,0, 5,15,0,0,0,0))
463 LTTNG_TRACEPOINT_EVENT(block_rq_complete
,
465 TP_PROTO(struct request
*rq
, blk_status_t error
, unsigned int nr_bytes
),
467 TP_ARGS(rq
, error
, nr_bytes
),
470 ctf_integer(dev_t
, dev
,
471 rq
->rq_disk
? disk_devt(rq
->rq_disk
) : 0)
472 ctf_integer(sector_t
, sector
, blk_rq_pos(rq
))
473 ctf_integer(unsigned int, nr_sector
, nr_bytes
>> 9)
474 ctf_integer(int, error
, blk_status_to_errno(error
))
475 blk_rwbs_ctf_integer(unsigned int, rwbs
,
476 lttng_req_op(rq
), lttng_req_rw(rq
), nr_bytes
)
479 #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,12,0))
480 LTTNG_TRACEPOINT_EVENT(block_rq_complete
,
482 TP_PROTO(struct request
*rq
, int error
, unsigned int nr_bytes
),
484 TP_ARGS(rq
, error
, nr_bytes
),
487 ctf_integer(dev_t
, dev
,
488 rq
->rq_disk
? disk_devt(rq
->rq_disk
) : 0)
489 ctf_integer(sector_t
, sector
, blk_rq_pos(rq
))
490 ctf_integer(unsigned int, nr_sector
, nr_bytes
>> 9)
491 ctf_integer(int, error
, error
)
492 blk_rwbs_ctf_integer(unsigned int, rwbs
,
493 lttng_req_op(rq
), lttng_req_rw(rq
), nr_bytes
)
496 #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,11,0))
497 LTTNG_TRACEPOINT_EVENT_CODE(block_rq_complete
,
499 TP_PROTO(struct request_queue
*q
, struct request
*rq
,
500 unsigned int nr_bytes
),
502 TP_ARGS(q
, rq
, nr_bytes
),
510 if (blk_rq_is_scsi(rq
)) {
511 struct scsi_request
*scsi_rq
= scsi_req(rq
);
512 tp_locvar
->cmd
= scsi_rq
->cmd
;
513 tp_locvar
->cmd_len
= scsi_rq
->cmd_len
;
515 tp_locvar
->cmd
= NULL
;
516 tp_locvar
->cmd_len
= 0;
521 ctf_integer(dev_t
, dev
,
522 rq
->rq_disk
? disk_devt(rq
->rq_disk
) : 0)
523 ctf_integer(sector_t
, sector
, blk_rq_pos(rq
))
524 ctf_integer(unsigned int, nr_sector
, nr_bytes
>> 9)
525 ctf_integer(int, errors
, rq
->errors
)
526 blk_rwbs_ctf_integer(unsigned int, rwbs
,
527 lttng_req_op(rq
), lttng_req_rw(rq
), nr_bytes
)
528 ctf_sequence_hex(unsigned char, cmd
,
529 tp_locvar
->cmd
, size_t, tp_locvar
->cmd_len
)
534 #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,14,5) \
535 || LTTNG_KERNEL_RANGE(3,12,21, 3,13,0) \
536 || LTTNG_KERNEL_RANGE(3,10,41, 3,11,0) \
537 || LTTNG_KERNEL_RANGE(3,4,91, 3,5,0) \
538 || LTTNG_KERNEL_RANGE(3,2,58, 3,3,0) \
539 || LTTNG_UBUNTU_KERNEL_RANGE(3,13,11,28, 3,14,0,0) \
540 || LTTNG_RHEL_KERNEL_RANGE(3,10,0,229,0,0, 3,11,0,0,0,0))
542 LTTNG_TRACEPOINT_EVENT_CODE(block_rq_complete
,
544 TP_PROTO(struct request_queue
*q
, struct request
*rq
,
545 unsigned int nr_bytes
),
547 TP_ARGS(q
, rq
, nr_bytes
),
555 if (rq
->cmd_type
== REQ_TYPE_BLOCK_PC
) {
556 tp_locvar
->cmd
= rq
->cmd
;
557 tp_locvar
->cmd_len
= rq
->cmd_len
;
559 tp_locvar
->cmd
= NULL
;
560 tp_locvar
->cmd_len
= 0;
565 ctf_integer(dev_t
, dev
,
566 rq
->rq_disk
? disk_devt(rq
->rq_disk
) : 0)
567 ctf_integer(sector_t
, sector
, blk_rq_pos(rq
))
568 ctf_integer(unsigned int, nr_sector
, nr_bytes
>> 9)
569 ctf_integer(int, errors
, rq
->errors
)
570 blk_rwbs_ctf_integer(unsigned int, rwbs
,
571 lttng_req_op(rq
), lttng_req_rw(rq
), nr_bytes
)
572 ctf_sequence_hex(unsigned char, cmd
,
573 tp_locvar
->cmd
, size_t, tp_locvar
->cmd_len
)
579 #else /* #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,15,0)) */
582 * block_rq_complete - block IO operation completed by device driver
583 * @q: queue containing the block operation request
584 * @rq: block operations request
586 * The block_rq_complete tracepoint event indicates that some portion
587 * of operation request has been completed by the device driver. If
588 * the @rq->bio is %NULL, then there is absolutely no additional work to
589 * do for the request. If @rq->bio is non-NULL then there is
590 * additional work required to complete the request.
592 LTTNG_TRACEPOINT_EVENT_INSTANCE(block_rq_with_error
, block_rq_complete
,
594 TP_PROTO(struct request_queue
*q
, struct request
*rq
),
599 #endif /* #else #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,15,0)) */
601 #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,17,0) \
602 || LTTNG_RHEL_KERNEL_RANGE(5,14,0,162,0,0, 5,15,0,0,0,0))
603 LTTNG_TRACEPOINT_EVENT_CLASS(block_rq
,
605 TP_PROTO(struct request
*rq
),
610 ctf_integer(dev_t
, dev
,
611 rq
->q
->disk
? disk_devt(rq
->q
->disk
) : 0)
612 ctf_integer(sector_t
, sector
, blk_rq_trace_sector(rq
))
613 ctf_integer(unsigned int, nr_sector
, blk_rq_trace_nr_sectors(rq
))
614 ctf_integer(unsigned int, bytes
, blk_rq_bytes(rq
))
615 ctf_integer(pid_t
, tid
, current
->pid
)
616 blk_rwbs_ctf_integer(unsigned int, rwbs
,
617 lttng_req_op(rq
), lttng_req_rw(rq
), blk_rq_bytes(rq
))
618 ctf_array_text(char, comm
, current
->comm
, TASK_COMM_LEN
)
621 #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,11,0) \
622 || LTTNG_KERNEL_RANGE(5,10,137, 5,11,0) \
623 || LTTNG_RHEL_KERNEL_RANGE(4,18,0,372,0,0, 4,19,0,0,0,0))
624 LTTNG_TRACEPOINT_EVENT_CLASS(block_rq
,
626 TP_PROTO(struct request
*rq
),
631 ctf_integer(dev_t
, dev
,
632 rq
->rq_disk
? disk_devt(rq
->rq_disk
) : 0)
633 ctf_integer(sector_t
, sector
, blk_rq_trace_sector(rq
))
634 ctf_integer(unsigned int, nr_sector
, blk_rq_trace_nr_sectors(rq
))
635 ctf_integer(unsigned int, bytes
, blk_rq_bytes(rq
))
636 ctf_integer(pid_t
, tid
, current
->pid
)
637 blk_rwbs_ctf_integer(unsigned int, rwbs
,
638 lttng_req_op(rq
), lttng_req_rw(rq
), blk_rq_bytes(rq
))
639 ctf_array_text(char, comm
, current
->comm
, TASK_COMM_LEN
)
642 #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,12,0))
643 LTTNG_TRACEPOINT_EVENT_CLASS(block_rq
,
645 TP_PROTO(struct request_queue
*q
, struct request
*rq
),
650 ctf_integer(dev_t
, dev
,
651 rq
->rq_disk
? disk_devt(rq
->rq_disk
) : 0)
652 ctf_integer(sector_t
, sector
, blk_rq_trace_sector(rq
))
653 ctf_integer(unsigned int, nr_sector
, blk_rq_trace_nr_sectors(rq
))
654 ctf_integer(unsigned int, bytes
, blk_rq_bytes(rq
))
655 ctf_integer(pid_t
, tid
, current
->pid
)
656 blk_rwbs_ctf_integer(unsigned int, rwbs
,
657 lttng_req_op(rq
), lttng_req_rw(rq
), blk_rq_bytes(rq
))
658 ctf_array_text(char, comm
, current
->comm
, TASK_COMM_LEN
)
661 #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,11,0))
662 LTTNG_TRACEPOINT_EVENT_CLASS_CODE(block_rq
,
664 TP_PROTO(struct request_queue
*q
, struct request
*rq
),
670 unsigned int nr_sector
;
677 if (blk_rq_is_scsi(rq
)) {
678 struct scsi_request
*scsi_rq
= scsi_req(rq
);
679 tp_locvar
->sector
= 0;
680 tp_locvar
->nr_sector
= 0;
681 tp_locvar
->bytes
= scsi_rq
->resid_len
;
682 tp_locvar
->cmd
= scsi_rq
->cmd
;
683 tp_locvar
->cmd_len
= scsi_rq
->cmd_len
;
685 tp_locvar
->sector
= blk_rq_pos(rq
);
686 tp_locvar
->nr_sector
= blk_rq_sectors(rq
);
687 tp_locvar
->bytes
= 0;
688 tp_locvar
->cmd
= NULL
;
689 tp_locvar
->cmd_len
= 0;
694 ctf_integer(dev_t
, dev
,
695 rq
->rq_disk
? disk_devt(rq
->rq_disk
) : 0)
696 ctf_integer(sector_t
, sector
, tp_locvar
->sector
)
697 ctf_integer(unsigned int, nr_sector
, tp_locvar
->nr_sector
)
698 ctf_integer(unsigned int, bytes
, tp_locvar
->bytes
)
699 ctf_integer(pid_t
, tid
, current
->pid
)
700 blk_rwbs_ctf_integer(unsigned int, rwbs
,
701 lttng_req_op(rq
), lttng_req_rw(rq
), blk_rq_bytes(rq
))
702 ctf_sequence_hex(unsigned char, cmd
,
703 tp_locvar
->cmd
, size_t, tp_locvar
->cmd_len
)
704 ctf_array_text(char, comm
, current
->comm
, TASK_COMM_LEN
)
709 #else /* #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,11,0)) */
710 LTTNG_TRACEPOINT_EVENT_CLASS_CODE(block_rq
,
712 TP_PROTO(struct request_queue
*q
, struct request
*rq
),
718 unsigned int nr_sector
;
725 if (rq
->cmd_type
== REQ_TYPE_BLOCK_PC
) {
726 tp_locvar
->sector
= 0;
727 tp_locvar
->nr_sector
= 0;
728 tp_locvar
->bytes
= blk_rq_bytes(rq
);
729 tp_locvar
->cmd
= rq
->cmd
;
730 tp_locvar
->cmd_len
= rq
->cmd_len
;
732 tp_locvar
->sector
= blk_rq_pos(rq
);
733 tp_locvar
->nr_sector
= blk_rq_sectors(rq
);
734 tp_locvar
->bytes
= 0;
735 tp_locvar
->cmd
= NULL
;
736 tp_locvar
->cmd_len
= 0;
741 ctf_integer(dev_t
, dev
,
742 rq
->rq_disk
? disk_devt(rq
->rq_disk
) : 0)
743 ctf_integer(sector_t
, sector
, tp_locvar
->sector
)
744 ctf_integer(unsigned int, nr_sector
, tp_locvar
->nr_sector
)
745 ctf_integer(unsigned int, bytes
, tp_locvar
->bytes
)
746 ctf_integer(pid_t
, tid
, current
->pid
)
747 blk_rwbs_ctf_integer(unsigned int, rwbs
,
748 lttng_req_op(rq
), lttng_req_rw(rq
), blk_rq_bytes(rq
))
749 ctf_sequence_hex(unsigned char, cmd
,
750 tp_locvar
->cmd
, size_t, tp_locvar
->cmd_len
)
751 ctf_array_text(char, comm
, current
->comm
, TASK_COMM_LEN
)
756 #endif /* #else #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,11,0)) */
758 #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,11,0) \
759 || LTTNG_KERNEL_RANGE(5,10,137, 5,11,0) \
760 || LTTNG_RHEL_KERNEL_RANGE(4,18,0,372,0,0, 4,19,0,0,0,0))
762 * block_rq_insert - insert block operation request into queue
763 * @rq: block IO operation request
765 * Called immediately before block operation request @rq is inserted
766 * into queue @q. The fields in the operation request @rq struct can
767 * be examined to determine which device and sectors the pending
768 * operation would access.
770 LTTNG_TRACEPOINT_EVENT_INSTANCE(block_rq
, block_rq_insert
,
772 TP_PROTO(struct request
*rq
),
778 * block_rq_insert - insert block operation request into queue
780 * @rq: block IO operation request
782 * Called immediately before block operation request @rq is inserted
783 * into queue @q. The fields in the operation request @rq struct can
784 * be examined to determine which device and sectors the pending
785 * operation would access.
787 LTTNG_TRACEPOINT_EVENT_INSTANCE(block_rq
, block_rq_insert
,
789 TP_PROTO(struct request_queue
*q
, struct request
*rq
),
795 #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,11,0) \
796 || LTTNG_KERNEL_RANGE(5,10,137, 5,11,0) \
797 || LTTNG_RHEL_KERNEL_RANGE(4,18,0,372,0,0, 4,19,0,0,0,0))
799 * block_rq_issue - issue pending block IO request operation to device driver
800 * @rq: block IO operation operation request
802 * Called when block operation request @rq from queue @q is sent to a
803 * device driver for processing.
805 LTTNG_TRACEPOINT_EVENT_INSTANCE(block_rq
, block_rq_issue
,
807 TP_PROTO(struct request
*rq
),
813 * block_rq_issue - issue pending block IO request operation to device driver
814 * @q: queue holding operation
815 * @rq: block IO operation operation request
817 * Called when block operation request @rq from queue @q is sent to a
818 * device driver for processing.
820 LTTNG_TRACEPOINT_EVENT_INSTANCE(block_rq
, block_rq_issue
,
822 TP_PROTO(struct request_queue
*q
, struct request
*rq
),
828 #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,11,0) \
829 || LTTNG_KERNEL_RANGE(5,10,137, 5,11,0))
831 * block_rq_merge - merge request with another one in the elevator
832 * @rq: block IO operation operation request
834 * Called when block operation request @rq from queue @q is merged to another
835 * request queued in the elevator.
837 LTTNG_TRACEPOINT_EVENT_INSTANCE(block_rq
, block_rq_merge
,
839 TP_PROTO(struct request
*rq
),
843 #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,9,0))
845 * block_rq_merge - merge request with another one in the elevator
846 * @q: queue holding operation
847 * @rq: block IO operation operation request
849 * Called when block operation request @rq from queue @q is merged to another
850 * request queued in the elevator.
852 LTTNG_TRACEPOINT_EVENT_INSTANCE(block_rq
, block_rq_merge
,
854 TP_PROTO(struct request_queue
*q
, struct request
*rq
),
860 #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,8,0) || \
861 LTTNG_RHEL_KERNEL_RANGE(4,18,0,305,0,0, 4,19,0,0,0,0))
864 * block_bio_complete - completed all work on the block operation
865 * @q: queue holding the block operation
866 * @bio: block operation completed
867 * @error: io error value
869 * This tracepoint indicates there is no further work to do on this
870 * block IO operation @bio.
872 LTTNG_TRACEPOINT_EVENT(block_bio_complete
,
874 TP_PROTO(struct request_queue
*q
, struct bio
*bio
),
879 ctf_integer(dev_t
, dev
, bio_dev(bio
))
880 ctf_integer(sector_t
, sector
, bio
->bi_iter
.bi_sector
)
881 ctf_integer(unsigned int, nr_sector
, bio_sectors(bio
))
882 ctf_integer(int, error
, blk_status_to_errno(bio
->bi_status
))
883 blk_rwbs_ctf_integer(unsigned int, rwbs
,
884 lttng_bio_op(bio
), lttng_bio_rw(bio
),
885 bio
->bi_iter
.bi_size
)
888 #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,14,0))
890 * block_bio_complete - completed all work on the block operation
891 * @q: queue holding the block operation
892 * @bio: block operation completed
893 * @error: io error value
895 * This tracepoint indicates there is no further work to do on this
896 * block IO operation @bio.
898 LTTNG_TRACEPOINT_EVENT(block_bio_complete
,
900 TP_PROTO(struct request_queue
*q
, struct bio
*bio
, int error
),
902 TP_ARGS(q
, bio
, error
),
905 ctf_integer(dev_t
, dev
, bio_dev(bio
))
906 ctf_integer(sector_t
, sector
, bio
->bi_iter
.bi_sector
)
907 ctf_integer(unsigned int, nr_sector
, bio_sectors(bio
))
908 ctf_integer(int, error
, error
)
909 blk_rwbs_ctf_integer(unsigned int, rwbs
,
910 lttng_bio_op(bio
), lttng_bio_rw(bio
),
911 bio
->bi_iter
.bi_size
)
914 #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,14,0))
916 * block_bio_complete - completed all work on the block operation
917 * @q: queue holding the block operation
918 * @bio: block operation completed
919 * @error: io error value
921 * This tracepoint indicates there is no further work to do on this
922 * block IO operation @bio.
924 LTTNG_TRACEPOINT_EVENT(block_bio_complete
,
926 TP_PROTO(struct request_queue
*q
, struct bio
*bio
, int error
),
928 TP_ARGS(q
, bio
, error
),
931 ctf_integer(dev_t
, dev
, bio
->bi_bdev
->bd_dev
)
932 ctf_integer(sector_t
, sector
, bio
->bi_iter
.bi_sector
)
933 ctf_integer(unsigned int, nr_sector
, bio_sectors(bio
))
934 ctf_integer(int, error
, error
)
935 blk_rwbs_ctf_integer(unsigned int, rwbs
,
936 lttng_bio_op(bio
), lttng_bio_rw(bio
),
937 bio
->bi_iter
.bi_size
)
942 * block_bio_complete - completed all work on the block operation
943 * @q: queue holding the block operation
944 * @bio: block operation completed
945 * @error: io error value
947 * This tracepoint indicates there is no further work to do on this
948 * block IO operation @bio.
950 LTTNG_TRACEPOINT_EVENT(block_bio_complete
,
952 TP_PROTO(struct request_queue
*q
, struct bio
*bio
, int error
),
954 TP_ARGS(q
, bio
, error
),
957 ctf_integer(dev_t
, dev
, bio
->bi_bdev
->bd_dev
)
958 ctf_integer(sector_t
, sector
, bio
->bi_sector
)
959 ctf_integer(unsigned int, nr_sector
, bio
->bi_size
>> 9)
960 ctf_integer(int, error
, error
)
961 blk_rwbs_ctf_integer(unsigned int, rwbs
,
962 lttng_bio_op(bio
), lttng_bio_rw(bio
), bio
->bi_size
)
967 #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,11,0))
968 LTTNG_TRACEPOINT_EVENT_CLASS(block_bio
,
970 TP_PROTO(struct bio
*bio
),
975 ctf_integer(dev_t
, dev
, bio_dev(bio
))
976 ctf_integer(sector_t
, sector
, bio
->bi_iter
.bi_sector
)
977 ctf_integer(unsigned int, nr_sector
, bio_sectors(bio
))
978 blk_rwbs_ctf_integer(unsigned int, rwbs
,
979 lttng_bio_op(bio
), lttng_bio_rw(bio
),
980 bio
->bi_iter
.bi_size
)
981 ctf_integer(pid_t
, tid
, current
->pid
)
982 ctf_array_text(char, comm
, current
->comm
, TASK_COMM_LEN
)
985 #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,14,0))
986 LTTNG_TRACEPOINT_EVENT_CLASS(block_bio_merge
,
988 TP_PROTO(struct request_queue
*q
, struct request
*rq
, struct bio
*bio
),
993 ctf_integer(dev_t
, dev
, bio_dev(bio
))
994 ctf_integer(sector_t
, sector
, bio
->bi_iter
.bi_sector
)
995 ctf_integer(unsigned int, nr_sector
, bio_sectors(bio
))
996 blk_rwbs_ctf_integer(unsigned int, rwbs
,
997 lttng_bio_op(bio
), lttng_bio_rw(bio
),
998 bio
->bi_iter
.bi_size
)
999 ctf_integer(pid_t
, tid
, current
->pid
)
1000 ctf_array_text(char, comm
, current
->comm
, TASK_COMM_LEN
)
1003 #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,14,0))
1004 LTTNG_TRACEPOINT_EVENT_CLASS(block_bio_merge
,
1006 TP_PROTO(struct request_queue
*q
, struct request
*rq
, struct bio
*bio
),
1008 TP_ARGS(q
, rq
, bio
),
1011 ctf_integer(dev_t
, dev
, bio
->bi_bdev
->bd_dev
)
1012 ctf_integer(sector_t
, sector
, bio
->bi_iter
.bi_sector
)
1013 ctf_integer(unsigned int, nr_sector
, bio_sectors(bio
))
1014 blk_rwbs_ctf_integer(unsigned int, rwbs
,
1015 lttng_bio_op(bio
), lttng_bio_rw(bio
),
1016 bio
->bi_iter
.bi_size
)
1017 ctf_integer(pid_t
, tid
, current
->pid
)
1018 ctf_array_text(char, comm
, current
->comm
, TASK_COMM_LEN
)
1021 #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,9,0))
1022 LTTNG_TRACEPOINT_EVENT_CLASS(block_bio_merge
,
1024 TP_PROTO(struct request_queue
*q
, struct request
*rq
, struct bio
*bio
),
1026 TP_ARGS(q
, rq
, bio
),
1029 ctf_integer(dev_t
, dev
, bio
->bi_bdev
->bd_dev
)
1030 ctf_integer(sector_t
, sector
, bio
->bi_sector
)
1031 ctf_integer(unsigned int, nr_sector
, bio
->bi_size
>> 9)
1032 blk_rwbs_ctf_integer(unsigned int, rwbs
,
1033 lttng_bio_op(bio
), lttng_bio_rw(bio
), bio
->bi_size
)
1034 ctf_integer(pid_t
, tid
, current
->pid
)
1035 ctf_array_text(char, comm
, current
->comm
, TASK_COMM_LEN
)
1042 #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,11,0))
1044 * block_bio_bounce - used bounce buffer when processing block operation
1045 * @bio: block operation
1047 * A bounce buffer was used to handle the block operation @bio in @q.
1048 * This occurs when hardware limitations prevent a direct transfer of
1049 * data between the @bio data memory area and the IO device. Use of a
1050 * bounce buffer requires extra copying of data and decreases
1053 LTTNG_TRACEPOINT_EVENT_INSTANCE(block_bio
, block_bio_bounce
,
1055 TP_PROTO(struct bio
*bio
),
1059 #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,14,0))
1061 * block_bio_bounce - used bounce buffer when processing block operation
1062 * @q: queue holding the block operation
1063 * @bio: block operation
1065 * A bounce buffer was used to handle the block operation @bio in @q.
1066 * This occurs when hardware limitations prevent a direct transfer of
1067 * data between the @bio data memory area and the IO device. Use of a
1068 * bounce buffer requires extra copying of data and decreases
1071 LTTNG_TRACEPOINT_EVENT(block_bio_bounce
,
1073 TP_PROTO(struct request_queue
*q
, struct bio
*bio
),
1078 ctf_integer(dev_t
, dev
, bio_dev(bio
))
1079 ctf_integer(sector_t
, sector
, bio
->bi_iter
.bi_sector
)
1080 ctf_integer(unsigned int, nr_sector
, bio_sectors(bio
))
1081 blk_rwbs_ctf_integer(unsigned int, rwbs
,
1082 lttng_bio_op(bio
), lttng_bio_rw(bio
),
1083 bio
->bi_iter
.bi_size
)
1084 ctf_integer(pid_t
, tid
, current
->pid
)
1085 ctf_array_text(char, comm
, current
->comm
, TASK_COMM_LEN
)
1088 #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,14,0))
1089 LTTNG_TRACEPOINT_EVENT(block_bio_bounce
,
1091 TP_PROTO(struct request_queue
*q
, struct bio
*bio
),
1096 ctf_integer(dev_t
, dev
, bio
->bi_bdev
? bio
->bi_bdev
->bd_dev
: 0)
1097 ctf_integer(sector_t
, sector
, bio
->bi_iter
.bi_sector
)
1098 ctf_integer(unsigned int, nr_sector
, bio_sectors(bio
))
1099 blk_rwbs_ctf_integer(unsigned int, rwbs
,
1100 lttng_bio_op(bio
), lttng_bio_rw(bio
),
1101 bio
->bi_iter
.bi_size
)
1102 ctf_integer(pid_t
, tid
, current
->pid
)
1103 ctf_array_text(char, comm
, current
->comm
, TASK_COMM_LEN
)
1107 LTTNG_TRACEPOINT_EVENT(block_bio_bounce
,
1109 TP_PROTO(struct request_queue
*q
, struct bio
*bio
),
1114 ctf_integer(dev_t
, dev
, bio
->bi_bdev
? bio
->bi_bdev
->bd_dev
: 0)
1115 ctf_integer(sector_t
, sector
, bio
->bi_sector
)
1116 ctf_integer(unsigned int, nr_sector
, bio
->bi_size
>> 9)
1117 blk_rwbs_ctf_integer(unsigned int, rwbs
,
1118 lttng_bio_op(bio
), lttng_bio_rw(bio
),
1120 ctf_integer(pid_t
, tid
, current
->pid
)
1121 ctf_array_text(char, comm
, current
->comm
, TASK_COMM_LEN
)
1127 #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,11,0))
1129 * block_bio_backmerge - merging block operation to the end of an existing operation
1130 * @bio: new block operation to merge
1132 * Merging block request @bio to the end of an existing block request.
1134 LTTNG_TRACEPOINT_EVENT_INSTANCE(block_bio
, block_bio_backmerge
,
1136 TP_PROTO(struct bio
*bio
),
1142 * block_bio_frontmerge - merging block operation to the beginning of an existing operation
1143 * @bio: new block operation to merge
1145 * Merging block IO operation @bio to the beginning of an existing block request.
1147 LTTNG_TRACEPOINT_EVENT_INSTANCE(block_bio
, block_bio_frontmerge
,
1149 TP_PROTO(struct bio
*bio
),
1155 * block_bio_queue - putting new block IO operation in queue
1156 * @bio: new block operation
1158 * About to place the block IO operation @bio into queue @q.
1160 LTTNG_TRACEPOINT_EVENT_INSTANCE(block_bio
, block_bio_queue
,
1162 TP_PROTO(struct bio
*bio
),
1166 #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,9,0))
1168 * block_bio_backmerge - merging block operation to the end of an existing operation
1169 * @q: queue holding operation
1170 * @rq: request bio is being merged into
1171 * @bio: new block operation to merge
1173 * Merging block request @bio to the end of an existing block request
1176 LTTNG_TRACEPOINT_EVENT_INSTANCE(block_bio_merge
, block_bio_backmerge
,
1178 TP_PROTO(struct request_queue
*q
, struct request
*rq
, struct bio
*bio
),
1184 * block_bio_frontmerge - merging block operation to the beginning of an existing operation
1185 * @q: queue holding operation
1186 * @rq: request bio is being merged into
1187 * @bio: new block operation to merge
1189 * Merging block IO operation @bio to the beginning of an existing block
1190 * operation in queue @q.
1192 LTTNG_TRACEPOINT_EVENT_INSTANCE(block_bio_merge
, block_bio_frontmerge
,
1194 TP_PROTO(struct request_queue
*q
, struct request
*rq
, struct bio
*bio
),
1200 * block_bio_queue - putting new block IO operation in queue
1201 * @q: queue holding operation
1202 * @bio: new block operation
1204 * About to place the block IO operation @bio into queue @q.
1206 LTTNG_TRACEPOINT_EVENT(block_bio_queue
,
1208 TP_PROTO(struct request_queue
*q
, struct bio
*bio
),
1213 #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,14,0))
1214 ctf_integer(dev_t
, dev
, bio_dev(bio
))
1216 ctf_integer(dev_t
, dev
, bio
->bi_bdev
->bd_dev
)
1218 #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,14,0))
1219 ctf_integer(sector_t
, sector
, bio
->bi_iter
.bi_sector
)
1220 ctf_integer(unsigned int, nr_sector
, bio_sectors(bio
))
1221 blk_rwbs_ctf_integer(unsigned int, rwbs
,
1222 lttng_bio_op(bio
), lttng_bio_rw(bio
),
1223 bio
->bi_iter
.bi_size
)
1224 #else /* #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,14,0)) */
1225 ctf_integer(sector_t
, sector
, bio
->bi_sector
)
1226 ctf_integer(unsigned int, nr_sector
, bio
->bi_size
>> 9)
1227 blk_rwbs_ctf_integer(unsigned int, rwbs
,
1228 lttng_bio_op(bio
), lttng_bio_rw(bio
), bio
->bi_size
)
1229 #endif /* #else #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,14,0)) */
1230 ctf_integer(pid_t
, tid
, current
->pid
)
1231 ctf_array_text(char, comm
, current
->comm
, TASK_COMM_LEN
)
1234 #else /* if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,9,0)) */
1235 LTTNG_TRACEPOINT_EVENT_CLASS(block_bio
,
1237 TP_PROTO(struct request_queue
*q
, struct bio
*bio
),
1242 ctf_integer(dev_t
, dev
, bio
->bi_bdev
? bio
->bi_bdev
->bd_dev
: 0)
1243 ctf_integer(sector_t
, sector
, bio
->bi_sector
)
1244 ctf_integer(unsigned int, nr_sector
, bio
->bi_size
>> 9)
1245 blk_rwbs_ctf_integer(unsigned int, rwbs
,
1246 lttng_bio_op(bio
), lttng_bio_rw(bio
), bio
->bi_size
)
1247 ctf_integer(pid_t
, tid
, current
->pid
)
1248 ctf_array_text(char, comm
, current
->comm
, TASK_COMM_LEN
)
1253 * block_bio_backmerge - merging block operation to the end of an existing operation
1254 * @q: queue holding operation
1255 * @bio: new block operation to merge
1257 * Merging block request @bio to the end of an existing block request
1260 LTTNG_TRACEPOINT_EVENT_INSTANCE(block_bio
, block_bio_backmerge
,
1262 TP_PROTO(struct request_queue
*q
, struct bio
*bio
),
1268 * block_bio_frontmerge - merging block operation to the beginning of an existing operation
1269 * @q: queue holding operation
1270 * @bio: new block operation to merge
1272 * Merging block IO operation @bio to the beginning of an existing block
1273 * operation in queue @q.
1275 LTTNG_TRACEPOINT_EVENT_INSTANCE(block_bio
, block_bio_frontmerge
,
1277 TP_PROTO(struct request_queue
*q
, struct bio
*bio
),
1283 * block_bio_queue - putting new block IO operation in queue
1284 * @q: queue holding operation
1285 * @bio: new block operation
1287 * About to place the block IO operation @bio into queue @q.
1289 LTTNG_TRACEPOINT_EVENT_INSTANCE(block_bio
, block_bio_queue
,
1291 TP_PROTO(struct request_queue
*q
, struct bio
*bio
),
1295 #endif /* #else #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,9,0)) */
1297 #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,11,0))
1299 * block_getrq - get a free request entry in queue for block IO operations
1300 * @bio: pending block IO operation (can be %NULL)
1302 * A request struct has been allocated to handle the block IO operation @bio.
1304 LTTNG_TRACEPOINT_EVENT_INSTANCE(block_bio
, block_getrq
,
1306 TP_PROTO(struct bio
*bio
),
1311 LTTNG_TRACEPOINT_EVENT_CLASS(block_get_rq
,
1313 TP_PROTO(struct request_queue
*q
, struct bio
*bio
, int rw
),
1315 TP_ARGS(q
, bio
, rw
),
1318 #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,14,0))
1319 ctf_integer(dev_t
, dev
, bio
? bio_dev(bio
) : 0)
1321 ctf_integer(dev_t
, dev
, bio
? bio
->bi_bdev
->bd_dev
: 0)
1323 #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,14,0))
1324 ctf_integer(sector_t
, sector
, bio
? bio
->bi_iter
.bi_sector
: 0)
1325 ctf_integer(unsigned int, nr_sector
,
1326 bio
? bio_sectors(bio
) : 0)
1327 blk_rwbs_ctf_integer(unsigned int, rwbs
,
1328 bio
? lttng_bio_op(bio
) : 0,
1329 bio
? lttng_bio_rw(bio
) : 0,
1330 bio
? bio
->bi_iter
.bi_size
: 0)
1331 #else /* #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,14,0)) */
1332 ctf_integer(sector_t
, sector
, bio
? bio
->bi_sector
: 0)
1333 ctf_integer(unsigned int, nr_sector
,
1334 bio
? bio
->bi_size
>> 9 : 0)
1335 blk_rwbs_ctf_integer(unsigned int, rwbs
,
1336 bio
? lttng_bio_op(bio
) : 0,
1337 bio
? lttng_bio_rw(bio
) : 0,
1338 bio
? bio
->bi_size
: 0)
1339 #endif /* #else #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,14,0)) */
1340 ctf_integer(pid_t
, tid
, current
->pid
)
1341 ctf_array_text(char, comm
, current
->comm
, TASK_COMM_LEN
)
1346 * block_getrq - get a free request entry in queue for block IO operations
1347 * @q: queue for operations
1348 * @bio: pending block IO operation (can be %NULL)
1349 * @rw: low bit indicates a read (%0) or a write (%1)
1351 * A request struct for queue @q has been allocated to handle the
1352 * block IO operation @bio.
1354 LTTNG_TRACEPOINT_EVENT_INSTANCE(block_get_rq
, block_getrq
,
1356 TP_PROTO(struct request_queue
*q
, struct bio
*bio
, int rw
),
1362 * block_sleeprq - waiting to get a free request entry in queue for block IO operation
1363 * @q: queue for operation
1364 * @bio: pending block IO operation (can be %NULL)
1365 * @rw: low bit indicates a read (%0) or a write (%1)
1367 * In the case where a request struct cannot be provided for queue @q
1368 * the process needs to wait for an request struct to become
1369 * available. This tracepoint event is generated each time the
1370 * process goes to sleep waiting for request struct become available.
1372 LTTNG_TRACEPOINT_EVENT_INSTANCE(block_get_rq
, block_sleeprq
,
1374 TP_PROTO(struct request_queue
*q
, struct bio
*bio
, int rw
),
1381 * block_plug - keep operations requests in request queue
1382 * @q: request queue to plug
1384 * Plug the request queue @q. Do not allow block operation requests
1385 * to be sent to the device driver. Instead, accumulate requests in
1386 * the queue to improve throughput performance of the block device.
1388 LTTNG_TRACEPOINT_EVENT(block_plug
,
1390 TP_PROTO(struct request_queue
*q
),
1395 ctf_integer(pid_t
, tid
, current
->pid
)
1396 ctf_array_text(char, comm
, current
->comm
, TASK_COMM_LEN
)
1400 LTTNG_TRACEPOINT_EVENT_CLASS(block_unplug
,
1402 TP_PROTO(struct request_queue
*q
, unsigned int depth
, bool explicit),
1404 TP_ARGS(q
, depth
, explicit),
1407 ctf_integer(int, nr_rq
, depth
)
1408 ctf_integer(pid_t
, tid
, current
->pid
)
1409 ctf_array_text(char, comm
, current
->comm
, TASK_COMM_LEN
)
1414 * block_unplug - release of operations requests in request queue
1415 * @q: request queue to unplug
1416 * @depth: number of requests just added to the queue
1417 * @explicit: whether this was an explicit unplug, or one from schedule()
1419 * Unplug request queue @q because device driver is scheduled to work
1420 * on elements in the request queue.
1422 LTTNG_TRACEPOINT_EVENT_INSTANCE(block_unplug
, block_unplug
,
1424 TP_PROTO(struct request_queue
*q
, unsigned int depth
, bool explicit),
1426 TP_ARGS(q
, depth
, explicit)
1429 #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,11,0))
1431 * block_split - split a single bio struct into two bio structs
1432 * @bio: block operation being split
1433 * @new_sector: The starting sector for the new bio
1435 * The bio request @bio needs to be split into two bio requests. The newly
1436 * created @bio request starts at @new_sector. This split may be required due to
1437 * hardware limitations such as operation crossing device boundaries in a RAID
1440 LTTNG_TRACEPOINT_EVENT(block_split
,
1442 TP_PROTO(struct bio
*bio
, unsigned int new_sector
),
1444 TP_ARGS(bio
, new_sector
),
1447 ctf_integer(dev_t
, dev
, bio_dev(bio
))
1448 ctf_integer(sector_t
, sector
, bio
->bi_iter
.bi_sector
)
1449 blk_rwbs_ctf_integer(unsigned int, rwbs
,
1450 lttng_bio_op(bio
), lttng_bio_rw(bio
),
1451 bio
->bi_iter
.bi_size
)
1452 ctf_integer(sector_t
, new_sector
, new_sector
)
1453 ctf_integer(pid_t
, tid
, current
->pid
)
1454 ctf_array_text(char, comm
, current
->comm
, TASK_COMM_LEN
)
1458 #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,14,0))
1460 * block_split - split a single bio struct into two bio structs
1461 * @q: queue containing the bio
1462 * @bio: block operation being split
1463 * @new_sector: The starting sector for the new bio
1465 * The bio request @bio in request queue @q needs to be split into two
1466 * bio requests. The newly created @bio request starts at
1467 * @new_sector. This split may be required due to hardware limitation
1468 * such as operation crossing device boundaries in a RAID system.
1470 LTTNG_TRACEPOINT_EVENT(block_split
,
1472 TP_PROTO(struct request_queue
*q
, struct bio
*bio
,
1473 unsigned int new_sector
),
1475 TP_ARGS(q
, bio
, new_sector
),
1478 ctf_integer(dev_t
, dev
, bio_dev(bio
))
1479 ctf_integer(sector_t
, sector
, bio
->bi_iter
.bi_sector
)
1480 blk_rwbs_ctf_integer(unsigned int, rwbs
,
1481 lttng_bio_op(bio
), lttng_bio_rw(bio
),
1482 bio
->bi_iter
.bi_size
)
1483 ctf_integer(sector_t
, new_sector
, new_sector
)
1484 ctf_integer(pid_t
, tid
, current
->pid
)
1485 ctf_array_text(char, comm
, current
->comm
, TASK_COMM_LEN
)
1488 #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,14,0))
1489 LTTNG_TRACEPOINT_EVENT(block_split
,
1491 TP_PROTO(struct request_queue
*q
, struct bio
*bio
,
1492 unsigned int new_sector
),
1494 TP_ARGS(q
, bio
, new_sector
),
1497 ctf_integer(dev_t
, dev
, bio
->bi_bdev
->bd_dev
)
1498 ctf_integer(sector_t
, sector
, bio
->bi_iter
.bi_sector
)
1499 blk_rwbs_ctf_integer(unsigned int, rwbs
,
1500 lttng_bio_op(bio
), lttng_bio_rw(bio
),
1501 bio
->bi_iter
.bi_size
)
1502 ctf_integer(sector_t
, new_sector
, new_sector
)
1503 ctf_integer(pid_t
, tid
, current
->pid
)
1504 ctf_array_text(char, comm
, current
->comm
, TASK_COMM_LEN
)
1508 LTTNG_TRACEPOINT_EVENT(block_split
,
1510 TP_PROTO(struct request_queue
*q
, struct bio
*bio
,
1511 unsigned int new_sector
),
1513 TP_ARGS(q
, bio
, new_sector
),
1516 ctf_integer(dev_t
, dev
, bio
->bi_bdev
->bd_dev
)
1517 ctf_integer(sector_t
, sector
, bio
->bi_sector
)
1518 blk_rwbs_ctf_integer(unsigned int, rwbs
,
1519 lttng_bio_op(bio
), lttng_bio_rw(bio
), bio
->bi_size
)
1520 ctf_integer(sector_t
, new_sector
, new_sector
)
1521 ctf_integer(pid_t
, tid
, current
->pid
)
1522 ctf_array_text(char, comm
, current
->comm
, TASK_COMM_LEN
)
1527 #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,11,0))
1529 * block_bio_remap - map request for a logical device to the raw device
1530 * @bio: revised operation
1531 * @dev: original device for the operation
1532 * @from: original sector for the operation
1534 * An operation for a logical device has been mapped to the
1537 LTTNG_TRACEPOINT_EVENT(block_bio_remap
,
1539 TP_PROTO(struct bio
*bio
, dev_t dev
, sector_t from
),
1541 TP_ARGS(bio
, dev
, from
),
1544 ctf_integer(dev_t
, dev
, bio_dev(bio
))
1545 ctf_integer(sector_t
, sector
, bio
->bi_iter
.bi_sector
)
1546 ctf_integer(unsigned int, nr_sector
, bio_sectors(bio
))
1547 blk_rwbs_ctf_integer(unsigned int, rwbs
,
1548 lttng_bio_op(bio
), lttng_bio_rw(bio
),
1549 bio
->bi_iter
.bi_size
)
1550 ctf_integer(dev_t
, old_dev
, dev
)
1551 ctf_integer(sector_t
, old_sector
, from
)
1554 #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,14,0))
1556 * block_bio_remap - map request for a logical device to the raw device
1557 * @q: queue holding the operation
1558 * @bio: revised operation
1559 * @dev: device for the operation
1560 * @from: original sector for the operation
1562 * An operation for a logical device has been mapped to the
1565 LTTNG_TRACEPOINT_EVENT(block_bio_remap
,
1567 TP_PROTO(struct request_queue
*q
, struct bio
*bio
, dev_t dev
,
1570 TP_ARGS(q
, bio
, dev
, from
),
1573 ctf_integer(dev_t
, dev
, bio_dev(bio
))
1574 ctf_integer(sector_t
, sector
, bio
->bi_iter
.bi_sector
)
1575 ctf_integer(unsigned int, nr_sector
, bio_sectors(bio
))
1576 blk_rwbs_ctf_integer(unsigned int, rwbs
,
1577 lttng_bio_op(bio
), lttng_bio_rw(bio
),
1578 bio
->bi_iter
.bi_size
)
1579 ctf_integer(dev_t
, old_dev
, dev
)
1580 ctf_integer(sector_t
, old_sector
, from
)
1583 #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,14,0))
1584 LTTNG_TRACEPOINT_EVENT(block_bio_remap
,
1586 TP_PROTO(struct request_queue
*q
, struct bio
*bio
, dev_t dev
,
1589 TP_ARGS(q
, bio
, dev
, from
),
1592 ctf_integer(dev_t
, dev
, bio
->bi_bdev
->bd_dev
)
1593 ctf_integer(sector_t
, sector
, bio
->bi_iter
.bi_sector
)
1594 ctf_integer(unsigned int, nr_sector
, bio_sectors(bio
))
1595 blk_rwbs_ctf_integer(unsigned int, rwbs
,
1596 lttng_bio_op(bio
), lttng_bio_rw(bio
),
1597 bio
->bi_iter
.bi_size
)
1598 ctf_integer(dev_t
, old_dev
, dev
)
1599 ctf_integer(sector_t
, old_sector
, from
)
1603 LTTNG_TRACEPOINT_EVENT(block_bio_remap
,
1605 TP_PROTO(struct request_queue
*q
, struct bio
*bio
, dev_t dev
,
1608 TP_ARGS(q
, bio
, dev
, from
),
1611 ctf_integer(dev_t
, dev
, bio
->bi_bdev
->bd_dev
)
1612 ctf_integer(sector_t
, sector
, bio
->bi_sector
)
1613 ctf_integer(unsigned int, nr_sector
, bio
->bi_size
>> 9)
1614 blk_rwbs_ctf_integer(unsigned int, rwbs
,
1615 lttng_bio_op(bio
), lttng_bio_rw(bio
), bio
->bi_size
)
1616 ctf_integer(dev_t
, old_dev
, dev
)
1617 ctf_integer(sector_t
, old_sector
, from
)
1622 #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,17,0) \
1623 || LTTNG_RHEL_KERNEL_RANGE(5,14,0,162,0,0, 5,15,0,0,0,0))
1625 * block_rq_remap - map request for a block operation request
1626 * @rq: block IO operation request
1627 * @dev: device for the operation
1628 * @from: original sector for the operation
1630 * The block operation request @rq in @q has been remapped. The block
1631 * operation request @rq holds the current information and @from hold
1632 * the original sector.
1634 LTTNG_TRACEPOINT_EVENT(block_rq_remap
,
1636 TP_PROTO(struct request
*rq
, dev_t dev
, sector_t from
),
1638 TP_ARGS(rq
, dev
, from
),
1641 ctf_integer(dev_t
, dev
, disk_devt(rq
->q
->disk
))
1642 ctf_integer(sector_t
, sector
, blk_rq_pos(rq
))
1643 ctf_integer(unsigned int, nr_sector
, blk_rq_sectors(rq
))
1644 ctf_integer(dev_t
, old_dev
, dev
)
1645 ctf_integer(sector_t
, old_sector
, from
)
1646 blk_rwbs_ctf_integer(unsigned int, rwbs
,
1647 lttng_req_op(rq
), lttng_req_rw(rq
), blk_rq_bytes(rq
))
1650 #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,11,0) \
1651 || LTTNG_KERNEL_RANGE(5,10,137, 5,11,0) \
1652 || LTTNG_RHEL_KERNEL_RANGE(4,18,0,372,0,0, 4,19,0,0,0,0))
1654 * block_rq_remap - map request for a block operation request
1655 * @rq: block IO operation request
1656 * @dev: device for the operation
1657 * @from: original sector for the operation
1659 * The block operation request @rq in @q has been remapped. The block
1660 * operation request @rq holds the current information and @from hold
1661 * the original sector.
1663 LTTNG_TRACEPOINT_EVENT(block_rq_remap
,
1665 TP_PROTO(struct request
*rq
, dev_t dev
, sector_t from
),
1667 TP_ARGS(rq
, dev
, from
),
1670 ctf_integer(dev_t
, dev
, disk_devt(rq
->rq_disk
))
1671 ctf_integer(sector_t
, sector
, blk_rq_pos(rq
))
1672 ctf_integer(unsigned int, nr_sector
, blk_rq_sectors(rq
))
1673 ctf_integer(dev_t
, old_dev
, dev
)
1674 ctf_integer(sector_t
, old_sector
, from
)
1675 blk_rwbs_ctf_integer(unsigned int, rwbs
,
1676 lttng_req_op(rq
), lttng_req_rw(rq
), blk_rq_bytes(rq
))
1681 * block_rq_remap - map request for a block operation request
1682 * @q: queue holding the operation
1683 * @rq: block IO operation request
1684 * @dev: device for the operation
1685 * @from: original sector for the operation
1687 * The block operation request @rq in @q has been remapped. The block
1688 * operation request @rq holds the current information and @from hold
1689 * the original sector.
1691 LTTNG_TRACEPOINT_EVENT(block_rq_remap
,
1693 TP_PROTO(struct request_queue
*q
, struct request
*rq
, dev_t dev
,
1696 TP_ARGS(q
, rq
, dev
, from
),
1699 ctf_integer(dev_t
, dev
, disk_devt(rq
->rq_disk
))
1700 ctf_integer(sector_t
, sector
, blk_rq_pos(rq
))
1701 ctf_integer(unsigned int, nr_sector
, blk_rq_sectors(rq
))
1702 ctf_integer(dev_t
, old_dev
, dev
)
1703 ctf_integer(sector_t
, old_sector
, from
)
1704 blk_rwbs_ctf_integer(unsigned int, rwbs
,
1705 lttng_req_op(rq
), lttng_req_rw(rq
), blk_rq_bytes(rq
))
1710 #undef __print_rwbs_flags
1711 #undef blk_fill_rwbs
1713 #endif /* LTTNG_TRACE_BLOCK_H */
1715 /* This part must be outside protection */
1716 #include <probes/define_trace.h>
This page took 0.064564 seconds and 4 git commands to generate.