1 /* SPDX-License-Identifier: GPL-2.0 */
3 #define TRACE_SYSTEM ext4
5 #if !defined(LTTNG_TRACE_EXT4_H) || defined(TRACE_HEADER_MULTI_READ)
6 #define LTTNG_TRACE_EXT4_H
8 #include <probes/lttng-tracepoint-event.h>
9 #include <linux/writeback.h>
10 #include <linux/version.h>
12 #ifndef _TRACE_EXT4_DEF_
13 #define _TRACE_EXT4_DEF_
14 struct ext4_allocation_context
;
15 struct ext4_allocation_request
;
16 struct ext4_prealloc_space
;
17 struct ext4_inode_info
;
19 struct ext4_map_blocks
;
20 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,2,0))
25 #define EXT4_I(inode) (container_of(inode, struct ext4_inode_info, vfs_inode))
26 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,1,0))
27 #define TP_MODE_T __u16
29 #define TP_MODE_T umode_t
32 LTTNG_TRACEPOINT_EVENT(ext4_free_inode
,
33 TP_PROTO(struct inode
*inode
),
38 ctf_integer(dev_t
, dev
, inode
->i_sb
->s_dev
)
39 ctf_integer(ino_t
, ino
, inode
->i_ino
)
40 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,0))
41 ctf_integer(uid_t
, uid
, i_uid_read(inode
))
42 ctf_integer(gid_t
, gid
, i_gid_read(inode
))
44 ctf_integer(uid_t
, uid
, inode
->i_uid
)
45 ctf_integer(gid_t
, gid
, inode
->i_gid
)
47 ctf_integer(__u64
, blocks
, inode
->i_blocks
)
48 ctf_integer(TP_MODE_T
, mode
, inode
->i_mode
)
52 LTTNG_TRACEPOINT_EVENT(ext4_request_inode
,
53 TP_PROTO(struct inode
*dir
, int mode
),
58 ctf_integer(dev_t
, dev
, dir
->i_sb
->s_dev
)
59 ctf_integer(ino_t
, dir
, dir
->i_ino
)
60 ctf_integer(TP_MODE_T
, mode
, mode
)
64 LTTNG_TRACEPOINT_EVENT(ext4_allocate_inode
,
65 TP_PROTO(struct inode
*inode
, struct inode
*dir
, int mode
),
67 TP_ARGS(inode
, dir
, mode
),
70 ctf_integer(dev_t
, dev
, inode
->i_sb
->s_dev
)
71 ctf_integer(ino_t
, ino
, inode
->i_ino
)
72 ctf_integer(ino_t
, dir
, dir
->i_ino
)
73 ctf_integer(TP_MODE_T
, mode
, mode
)
77 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37))
78 LTTNG_TRACEPOINT_EVENT(ext4_evict_inode
,
79 TP_PROTO(struct inode
*inode
),
84 ctf_integer(dev_t
, dev
, inode
->i_sb
->s_dev
)
85 ctf_integer(ino_t
, ino
, inode
->i_ino
)
86 ctf_integer(int, nlink
, inode
->i_nlink
)
90 LTTNG_TRACEPOINT_EVENT(ext4_drop_inode
,
91 TP_PROTO(struct inode
*inode
, int drop
),
96 ctf_integer(dev_t
, dev
, inode
->i_sb
->s_dev
)
97 ctf_integer(ino_t
, ino
, inode
->i_ino
)
98 ctf_integer(int, drop
, drop
)
102 LTTNG_TRACEPOINT_EVENT(ext4_mark_inode_dirty
,
103 TP_PROTO(struct inode
*inode
, unsigned long IP
),
108 ctf_integer(dev_t
, dev
, inode
->i_sb
->s_dev
)
109 ctf_integer(ino_t
, ino
, inode
->i_ino
)
110 ctf_integer(unsigned long, ip
, IP
)
114 LTTNG_TRACEPOINT_EVENT(ext4_begin_ordered_truncate
,
115 TP_PROTO(struct inode
*inode
, loff_t new_size
),
117 TP_ARGS(inode
, new_size
),
120 ctf_integer(dev_t
, dev
, inode
->i_sb
->s_dev
)
121 ctf_integer(ino_t
, ino
, inode
->i_ino
)
122 ctf_integer(loff_t
, new_size
, new_size
)
127 LTTNG_TRACEPOINT_EVENT_CLASS(ext4__write_begin
,
129 TP_PROTO(struct inode
*inode
, loff_t pos
, unsigned int len
,
132 TP_ARGS(inode
, pos
, len
, flags
),
135 ctf_integer(dev_t
, dev
, inode
->i_sb
->s_dev
)
136 ctf_integer(ino_t
, ino
, inode
->i_ino
)
137 ctf_integer(loff_t
, pos
, pos
)
138 ctf_integer(unsigned int, len
, len
)
139 ctf_integer(unsigned int, flags
, flags
)
143 LTTNG_TRACEPOINT_EVENT_INSTANCE(ext4__write_begin
, ext4_write_begin
,
145 TP_PROTO(struct inode
*inode
, loff_t pos
, unsigned int len
,
148 TP_ARGS(inode
, pos
, len
, flags
)
151 LTTNG_TRACEPOINT_EVENT_INSTANCE(ext4__write_begin
, ext4_da_write_begin
,
153 TP_PROTO(struct inode
*inode
, loff_t pos
, unsigned int len
,
156 TP_ARGS(inode
, pos
, len
, flags
)
159 LTTNG_TRACEPOINT_EVENT_CLASS(ext4__write_end
,
160 TP_PROTO(struct inode
*inode
, loff_t pos
, unsigned int len
,
161 unsigned int copied
),
163 TP_ARGS(inode
, pos
, len
, copied
),
166 ctf_integer(dev_t
, dev
, inode
->i_sb
->s_dev
)
167 ctf_integer(ino_t
, ino
, inode
->i_ino
)
168 ctf_integer(loff_t
, pos
, pos
)
169 ctf_integer(unsigned int, len
, len
)
170 ctf_integer(unsigned int, copied
, copied
)
174 LTTNG_TRACEPOINT_EVENT_INSTANCE(ext4__write_end
, ext4_ordered_write_end
,
176 TP_PROTO(struct inode
*inode
, loff_t pos
, unsigned int len
,
177 unsigned int copied
),
179 TP_ARGS(inode
, pos
, len
, copied
)
182 LTTNG_TRACEPOINT_EVENT_INSTANCE(ext4__write_end
, ext4_writeback_write_end
,
184 TP_PROTO(struct inode
*inode
, loff_t pos
, unsigned int len
,
185 unsigned int copied
),
187 TP_ARGS(inode
, pos
, len
, copied
)
190 LTTNG_TRACEPOINT_EVENT_INSTANCE(ext4__write_end
, ext4_journalled_write_end
,
192 TP_PROTO(struct inode
*inode
, loff_t pos
, unsigned int len
,
193 unsigned int copied
),
195 TP_ARGS(inode
, pos
, len
, copied
)
198 LTTNG_TRACEPOINT_EVENT_INSTANCE(ext4__write_end
, ext4_da_write_end
,
200 TP_PROTO(struct inode
*inode
, loff_t pos
, unsigned int len
,
201 unsigned int copied
),
203 TP_ARGS(inode
, pos
, len
, copied
)
206 #if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,40))
207 LTTNG_TRACEPOINT_EVENT(ext4_writepage
,
208 TP_PROTO(struct inode
*inode
, struct page
*page
),
210 TP_ARGS(inode
, page
),
213 ctf_integer(dev_t
, dev
, inode
->i_sb
->s_dev
)
214 ctf_integer(ino_t
, ino
, inode
->i_ino
)
215 ctf_integer(pgoff_t
, index
, page
->index
)
220 LTTNG_TRACEPOINT_EVENT(ext4_da_writepages
,
221 TP_PROTO(struct inode
*inode
, struct writeback_control
*wbc
),
226 ctf_integer(dev_t
, dev
, inode
->i_sb
->s_dev
)
227 ctf_integer(ino_t
, ino
, inode
->i_ino
)
228 ctf_integer(long, nr_to_write
, wbc
->nr_to_write
)
229 ctf_integer(long, pages_skipped
, wbc
->pages_skipped
)
230 ctf_integer(loff_t
, range_start
, wbc
->range_start
)
231 ctf_integer(loff_t
, range_end
, wbc
->range_end
)
232 ctf_integer(pgoff_t
, writeback_index
, inode
->i_mapping
->writeback_index
)
233 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,39))
234 ctf_integer(int, sync_mode
, wbc
->sync_mode
)
236 #if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,37))
237 ctf_integer(char, nonblocking
, wbc
->nonblocking
)
239 ctf_integer(char, for_kupdate
, wbc
->for_kupdate
)
240 #if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,39))
241 ctf_integer(char, for_reclaim
, wbc
->for_reclaim
)
243 ctf_integer(char, range_cyclic
, wbc
->range_cyclic
)
247 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,11,0))
249 LTTNG_TRACEPOINT_EVENT(ext4_da_write_pages
,
250 TP_PROTO(struct inode
*inode
, pgoff_t first_page
,
251 struct writeback_control
*wbc
),
253 TP_ARGS(inode
, first_page
, wbc
),
256 ctf_integer(dev_t
, dev
, inode
->i_sb
->s_dev
)
257 ctf_integer(ino_t
, ino
, inode
->i_ino
)
258 ctf_integer(pgoff_t
, first_page
, first_page
)
259 ctf_integer(long, nr_to_write
, wbc
->nr_to_write
)
260 ctf_integer(int, sync_mode
, wbc
->sync_mode
)
266 LTTNG_TRACEPOINT_EVENT(ext4_da_write_pages
,
267 TP_PROTO(struct inode
*inode
, struct mpage_da_data
*mpd
),
272 ctf_integer(dev_t
, dev
, inode
->i_sb
->s_dev
)
273 ctf_integer(ino_t
, ino
, inode
->i_ino
)
274 ctf_integer(__u64
, b_blocknr
, mpd
->b_blocknr
)
275 ctf_integer(__u32
, b_size
, mpd
->b_size
)
276 ctf_integer(__u32
, b_state
, mpd
->b_state
)
277 ctf_integer(unsigned long, first_page
, mpd
->first_page
)
278 ctf_integer(int, io_done
, mpd
->io_done
)
279 ctf_integer(int, pages_written
, mpd
->pages_written
)
280 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,39))
281 ctf_integer(int, sync_mode
, mpd
->wbc
->sync_mode
)
288 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,11,0))
290 LTTNG_TRACEPOINT_EVENT(ext4_da_write_pages_extent
,
291 TP_PROTO(struct inode
*inode
, struct ext4_map_blocks
*map
),
296 ctf_integer(dev_t
, dev
, inode
->i_sb
->s_dev
)
297 ctf_integer(ino_t
, ino
, inode
->i_ino
)
298 ctf_integer(__u64
, lblk
, map
->m_lblk
)
299 ctf_integer(__u32
, len
, map
->m_len
)
300 ctf_integer(__u32
, flags
, map
->m_flags
)
306 LTTNG_TRACEPOINT_EVENT(ext4_da_writepages_result
,
307 TP_PROTO(struct inode
*inode
, struct writeback_control
*wbc
,
308 int ret
, int pages_written
),
310 TP_ARGS(inode
, wbc
, ret
, pages_written
),
313 ctf_integer(dev_t
, dev
, inode
->i_sb
->s_dev
)
314 ctf_integer(ino_t
, ino
, inode
->i_ino
)
315 ctf_integer(int, ret
, ret
)
316 ctf_integer(int, pages_written
, pages_written
)
317 ctf_integer(long, pages_skipped
, wbc
->pages_skipped
)
318 ctf_integer(pgoff_t
, writeback_index
, inode
->i_mapping
->writeback_index
)
319 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,39))
320 ctf_integer(int, sync_mode
, wbc
->sync_mode
)
322 #if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,33))
323 ctf_integer(char, encountered_congestion
, wbc
->encountered_congestion
)
325 #if (LINUX_VERSION_CODE < KERNEL_VERSION(3,1,0))
326 ctf_integer(char, more_io
, wbc
->more_io
)
328 #if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,35))
329 ctf_integer(char, no_nrwrite_index_update
, wbc
->no_nrwrite_index_update
)
334 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,39))
335 LTTNG_TRACEPOINT_EVENT_CLASS(ext4__page_op
,
336 TP_PROTO(struct page
*page
),
341 ctf_integer(dev_t
, dev
, page
->mapping
->host
->i_sb
->s_dev
)
342 ctf_integer(ino_t
, ino
, page
->mapping
->host
->i_ino
)
343 ctf_integer(pgoff_t
, index
, page
->index
)
347 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,40))
348 LTTNG_TRACEPOINT_EVENT_INSTANCE(ext4__page_op
, ext4_writepage
,
350 TP_PROTO(struct page
*page
),
356 LTTNG_TRACEPOINT_EVENT_INSTANCE(ext4__page_op
, ext4_readpage
,
358 TP_PROTO(struct page
*page
),
363 LTTNG_TRACEPOINT_EVENT_INSTANCE(ext4__page_op
, ext4_releasepage
,
365 TP_PROTO(struct page
*page
),
370 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,11,0))
372 LTTNG_TRACEPOINT_EVENT_CLASS(ext4_invalidatepage_op
,
373 TP_PROTO(struct page
*page
, unsigned int offset
, unsigned int length
),
375 TP_ARGS(page
, offset
, length
),
378 ctf_integer(dev_t
, dev
, page
->mapping
->host
->i_sb
->s_dev
)
379 ctf_integer(ino_t
, ino
, page
->mapping
->host
->i_ino
)
380 ctf_integer(pgoff_t
, index
, page
->index
)
381 ctf_integer(unsigned int, offset
, offset
)
382 ctf_integer(unsigned int, length
, length
)
386 LTTNG_TRACEPOINT_EVENT_INSTANCE(ext4_invalidatepage_op
, ext4_invalidatepage
,
387 TP_PROTO(struct page
*page
, unsigned int offset
, unsigned int length
),
389 TP_ARGS(page
, offset
, length
)
392 LTTNG_TRACEPOINT_EVENT_INSTANCE(ext4_invalidatepage_op
, ext4_journalled_invalidatepage
,
393 TP_PROTO(struct page
*page
, unsigned int offset
, unsigned int length
),
395 TP_ARGS(page
, offset
, length
)
400 LTTNG_TRACEPOINT_EVENT(ext4_invalidatepage
,
401 TP_PROTO(struct page
*page
, unsigned long offset
),
403 TP_ARGS(page
, offset
),
406 ctf_integer(dev_t
, dev
, page
->mapping
->host
->i_sb
->s_dev
)
407 ctf_integer(ino_t
, ino
, page
->mapping
->host
->i_ino
)
408 ctf_integer(pgoff_t
, index
, page
->index
)
409 ctf_integer(unsigned long, offset
, offset
)
418 LTTNG_TRACEPOINT_EVENT(ext4_discard_blocks
,
419 TP_PROTO(struct super_block
*sb
, unsigned long long blk
,
420 unsigned long long count
),
422 TP_ARGS(sb
, blk
, count
),
425 ctf_integer(dev_t
, dev
, sb
->s_dev
)
426 ctf_integer(__u64
, blk
, blk
)
427 ctf_integer(__u64
, count
, count
)
431 LTTNG_TRACEPOINT_EVENT_CLASS(ext4__mb_new_pa
,
432 TP_PROTO(struct ext4_allocation_context
*ac
,
433 struct ext4_prealloc_space
*pa
),
438 ctf_integer(dev_t
, dev
, ac
->ac_sb
->s_dev
)
439 ctf_integer(ino_t
, ino
, ac
->ac_inode
->i_ino
)
440 ctf_integer(__u64
, pa_pstart
, pa
->pa_pstart
)
441 ctf_integer(__u64
, pa_lstart
, pa
->pa_lstart
)
442 ctf_integer(__u32
, pa_len
, pa
->pa_len
)
446 LTTNG_TRACEPOINT_EVENT_INSTANCE(ext4__mb_new_pa
, ext4_mb_new_inode_pa
,
448 TP_PROTO(struct ext4_allocation_context
*ac
,
449 struct ext4_prealloc_space
*pa
),
454 LTTNG_TRACEPOINT_EVENT_INSTANCE(ext4__mb_new_pa
, ext4_mb_new_group_pa
,
456 TP_PROTO(struct ext4_allocation_context
*ac
,
457 struct ext4_prealloc_space
*pa
),
462 LTTNG_TRACEPOINT_EVENT(ext4_mb_release_inode_pa
,
464 #if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,40))
465 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37))
466 struct super_block
*sb
,
468 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36))
469 struct super_block
*sb
,
470 struct ext4_allocation_context
*ac
,
472 struct ext4_allocation_context
*ac
,
475 struct ext4_prealloc_space
*pa
,
476 unsigned long long block
, unsigned int count
),
478 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,40))
479 TP_ARGS(pa
, block
, count
),
480 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37))
481 TP_ARGS(sb
, inode
, pa
, block
, count
),
482 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36))
483 TP_ARGS(sb
, ac
, pa
, block
, count
),
485 TP_ARGS(ac
, pa
, block
, count
),
489 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,40))
490 ctf_integer(dev_t
, dev
, pa
->pa_inode
->i_sb
->s_dev
)
491 ctf_integer(ino_t
, ino
, pa
->pa_inode
->i_ino
)
493 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36))
494 ctf_integer(dev_t
, dev
, sb
->s_dev
)
496 ctf_integer(dev_t
, dev
, ac
->ac_sb
->s_dev
)
498 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37))
499 ctf_integer(ino_t
, ino
, inode
->i_ino
)
501 ctf_integer(ino_t
, ino
,
502 (ac
&& ac
->ac_inode
) ? ac
->ac_inode
->i_ino
: 0)
505 ctf_integer(__u64
, block
, block
)
506 ctf_integer(__u32
, count
, count
)
510 LTTNG_TRACEPOINT_EVENT(ext4_mb_release_group_pa
,
512 #if (LTTNG_KERNEL_RANGE(2,6,40, 3,3,0))
513 TP_PROTO(struct ext4_prealloc_space
*pa
),
516 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37))
517 TP_PROTO(struct super_block
*sb
, struct ext4_prealloc_space
*pa
),
520 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36))
521 TP_PROTO(struct super_block
*sb
,
522 struct ext4_allocation_context
*ac
,
523 struct ext4_prealloc_space
*pa
),
527 TP_PROTO(struct ext4_allocation_context
*ac
,
528 struct ext4_prealloc_space
*pa
),
534 #if (LTTNG_KERNEL_RANGE(2,6,40, 3,3,0))
535 ctf_integer(dev_t
, dev
, pa
->pa_inode
->i_sb
->s_dev
)
536 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36))
537 ctf_integer(dev_t
, dev
, sb
->s_dev
)
539 ctf_integer(dev_t
, dev
, ac
->ac_sb
->s_dev
)
541 #if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,37))
542 ctf_integer(ino_t
, ino
,
543 (ac
&& ac
->ac_inode
) ? ac
->ac_inode
->i_ino
: 0)
545 ctf_integer(__u64
, pa_pstart
, pa
->pa_pstart
)
546 ctf_integer(__u32
, pa_len
, pa
->pa_len
)
550 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,9,0) || \
551 LTTNG_KERNEL_RANGE(5,8,6, 5,9,0))
552 LTTNG_TRACEPOINT_EVENT(ext4_discard_preallocations
,
553 TP_PROTO(struct inode
*inode
, unsigned int len
, unsigned int needed
),
555 TP_ARGS(inode
, len
, needed
),
558 ctf_integer(dev_t
, dev
, inode
->i_sb
->s_dev
)
559 ctf_integer(ino_t
, ino
, inode
->i_ino
)
560 ctf_integer(unsigned int, len
, len
)
561 ctf_integer(unsigned int, needed
, needed
)
565 LTTNG_TRACEPOINT_EVENT(ext4_discard_preallocations
,
566 TP_PROTO(struct inode
*inode
),
571 ctf_integer(dev_t
, dev
, inode
->i_sb
->s_dev
)
572 ctf_integer(ino_t
, ino
, inode
->i_ino
)
577 LTTNG_TRACEPOINT_EVENT(ext4_mb_discard_preallocations
,
578 TP_PROTO(struct super_block
*sb
, int needed
),
583 ctf_integer(dev_t
, dev
, sb
->s_dev
)
584 ctf_integer(int, needed
, needed
)
588 LTTNG_TRACEPOINT_EVENT(ext4_request_blocks
,
589 TP_PROTO(struct ext4_allocation_request
*ar
),
594 ctf_integer(dev_t
, dev
, ar
->inode
->i_sb
->s_dev
)
595 ctf_integer(ino_t
, ino
, ar
->inode
->i_ino
)
596 ctf_integer(unsigned int, len
, ar
->len
)
597 ctf_integer(__u32
, logical
, ar
->logical
)
598 ctf_integer(__u32
, lleft
, ar
->lleft
)
599 ctf_integer(__u32
, lright
, ar
->lright
)
600 ctf_integer(__u64
, goal
, ar
->goal
)
601 ctf_integer(__u64
, pleft
, ar
->pleft
)
602 ctf_integer(__u64
, pright
, ar
->pright
)
603 ctf_integer(unsigned int, flags
, ar
->flags
)
607 LTTNG_TRACEPOINT_EVENT(ext4_allocate_blocks
,
608 TP_PROTO(struct ext4_allocation_request
*ar
, unsigned long long block
),
613 ctf_integer(dev_t
, dev
, ar
->inode
->i_sb
->s_dev
)
614 ctf_integer(ino_t
, ino
, ar
->inode
->i_ino
)
615 ctf_integer(__u64
, block
, block
)
616 ctf_integer(unsigned int, len
, ar
->len
)
617 ctf_integer(__u32
, logical
, ar
->logical
)
618 ctf_integer(__u32
, lleft
, ar
->lleft
)
619 ctf_integer(__u32
, lright
, ar
->lright
)
620 ctf_integer(__u64
, goal
, ar
->goal
)
621 ctf_integer(__u64
, pleft
, ar
->pleft
)
622 ctf_integer(__u64
, pright
, ar
->pright
)
623 ctf_integer(unsigned int, flags
, ar
->flags
)
627 LTTNG_TRACEPOINT_EVENT(ext4_free_blocks
,
628 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,33))
629 TP_PROTO(struct inode
*inode
, __u64 block
, unsigned long count
,
632 TP_ARGS(inode
, block
, count
, flags
),
634 TP_PROTO(struct inode
*inode
, __u64 block
, unsigned long count
,
637 TP_ARGS(inode
, block
, count
, metadata
),
641 ctf_integer(dev_t
, dev
, inode
->i_sb
->s_dev
)
642 ctf_integer(ino_t
, ino
, inode
->i_ino
)
643 ctf_integer(__u64
, block
, block
)
644 ctf_integer(unsigned long, count
, count
)
645 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,33))
646 ctf_integer(int, flags
, flags
)
647 ctf_integer(TP_MODE_T
, mode
, inode
->i_mode
)
649 ctf_integer(int, metadata
, metadata
)
654 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,39))
655 LTTNG_TRACEPOINT_EVENT(ext4_sync_file_enter
,
657 LTTNG_TRACEPOINT_EVENT(ext4_sync_file
,
659 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35))
660 TP_PROTO(struct file
*file
, int datasync
),
662 TP_ARGS(file
, datasync
),
664 TP_PROTO(struct file
*file
, struct dentry
*dentry
, int datasync
),
666 TP_ARGS(file
, dentry
, datasync
),
670 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35))
671 ctf_integer(dev_t
, dev
, file
->f_path
.dentry
->d_inode
->i_sb
->s_dev
)
672 ctf_integer(ino_t
, ino
, file
->f_path
.dentry
->d_inode
->i_ino
)
673 ctf_integer(ino_t
, parent
, file
->f_path
.dentry
->d_parent
->d_inode
->i_ino
)
675 ctf_integer(dev_t
, dev
, dentry
->d_inode
->i_sb
->s_dev
)
676 ctf_integer(ino_t
, ino
, dentry
->d_inode
->i_ino
)
677 ctf_integer(ino_t
, parent
, dentry
->d_parent
->d_inode
->i_ino
)
679 ctf_integer(int, datasync
, datasync
)
683 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,39))
684 LTTNG_TRACEPOINT_EVENT(ext4_sync_file_exit
,
685 TP_PROTO(struct inode
*inode
, int ret
),
690 ctf_integer(dev_t
, dev
, inode
->i_sb
->s_dev
)
691 ctf_integer(ino_t
, ino
, inode
->i_ino
)
692 ctf_integer(int, ret
, ret
)
697 LTTNG_TRACEPOINT_EVENT(ext4_sync_fs
,
698 TP_PROTO(struct super_block
*sb
, int wait
),
703 ctf_integer(dev_t
, dev
, sb
->s_dev
)
704 ctf_integer(int, wait
, wait
)
709 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,13,0))
710 LTTNG_TRACEPOINT_EVENT(ext4_alloc_da_blocks
,
711 TP_PROTO(struct inode
*inode
),
716 ctf_integer(dev_t
, dev
, inode
->i_sb
->s_dev
)
717 ctf_integer(ino_t
, ino
, inode
->i_ino
)
718 ctf_integer(unsigned int, data_blocks
, EXT4_I(inode
)->i_reserved_data_blocks
)
722 LTTNG_TRACEPOINT_EVENT(ext4_alloc_da_blocks
,
723 TP_PROTO(struct inode
*inode
),
728 ctf_integer(dev_t
, dev
, inode
->i_sb
->s_dev
)
729 ctf_integer(ino_t
, ino
, inode
->i_ino
)
730 ctf_integer(unsigned int, data_blocks
, EXT4_I(inode
)->i_reserved_data_blocks
)
731 ctf_integer(unsigned int, meta_blocks
, EXT4_I(inode
)->i_reserved_meta_blocks
)
736 LTTNG_TRACEPOINT_EVENT(ext4_mballoc_alloc
,
737 TP_PROTO(struct ext4_allocation_context
*ac
),
742 ctf_integer(dev_t
, dev
, ac
->ac_inode
->i_sb
->s_dev
)
743 ctf_integer(ino_t
, ino
, ac
->ac_inode
->i_ino
)
744 ctf_integer(__u32
, orig_logical
, ac
->ac_o_ex
.fe_logical
)
745 ctf_integer(int, orig_start
, ac
->ac_o_ex
.fe_start
)
746 ctf_integer(__u32
, orig_group
, ac
->ac_o_ex
.fe_group
)
747 ctf_integer(int, orig_len
, ac
->ac_o_ex
.fe_len
)
748 ctf_integer(__u32
, goal_logical
, ac
->ac_g_ex
.fe_logical
)
749 ctf_integer(int, goal_start
, ac
->ac_g_ex
.fe_start
)
750 ctf_integer(__u32
, goal_group
, ac
->ac_g_ex
.fe_group
)
751 ctf_integer(int, goal_len
, ac
->ac_g_ex
.fe_len
)
752 ctf_integer(__u32
, result_logical
, ac
->ac_f_ex
.fe_logical
)
753 ctf_integer(int, result_start
, ac
->ac_f_ex
.fe_start
)
754 ctf_integer(__u32
, result_group
, ac
->ac_f_ex
.fe_group
)
755 ctf_integer(int, result_len
, ac
->ac_f_ex
.fe_len
)
756 ctf_integer(__u16
, found
, ac
->ac_found
)
757 ctf_integer(__u16
, groups
, ac
->ac_groups_scanned
)
758 ctf_integer(__u16
, buddy
, ac
->ac_buddy
)
759 ctf_integer(__u16
, flags
, ac
->ac_flags
)
760 ctf_integer(__u16
, tail
, ac
->ac_tail
)
761 ctf_integer(__u8
, cr
, ac
->ac_criteria
)
765 LTTNG_TRACEPOINT_EVENT(ext4_mballoc_prealloc
,
766 TP_PROTO(struct ext4_allocation_context
*ac
),
771 ctf_integer(dev_t
, dev
, ac
->ac_inode
->i_sb
->s_dev
)
772 ctf_integer(ino_t
, ino
, ac
->ac_inode
->i_ino
)
773 ctf_integer(__u32
, orig_logical
, ac
->ac_o_ex
.fe_logical
)
774 ctf_integer(int, orig_start
, ac
->ac_o_ex
.fe_start
)
775 ctf_integer(__u32
, orig_group
, ac
->ac_o_ex
.fe_group
)
776 ctf_integer(int, orig_len
, ac
->ac_o_ex
.fe_len
)
777 ctf_integer(__u32
, result_logical
, ac
->ac_b_ex
.fe_logical
)
778 ctf_integer(int, result_start
, ac
->ac_b_ex
.fe_start
)
779 ctf_integer(__u32
, result_group
, ac
->ac_b_ex
.fe_group
)
780 ctf_integer(int, result_len
, ac
->ac_b_ex
.fe_len
)
784 LTTNG_TRACEPOINT_EVENT_CLASS(ext4__mballoc
,
785 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37))
786 TP_PROTO(struct super_block
*sb
,
792 TP_ARGS(sb
, inode
, group
, start
, len
),
794 TP_PROTO(struct ext4_allocation_context
*ac
),
800 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37))
801 ctf_integer(dev_t
, dev
, sb
->s_dev
)
802 ctf_integer(ino_t
, ino
, inode
? inode
->i_ino
: 0)
803 ctf_integer(int, result_start
, start
)
804 ctf_integer(__u32
, result_group
, group
)
805 ctf_integer(int, result_len
, len
)
807 ctf_integer(dev_t
, dev
, ac
->ac_sb
->s_dev
)
808 ctf_integer(ino_t
, ino
, ac
->ac_inode
? ac
->ac_inode
->i_ino
: 0)
809 ctf_integer(__u32
, result_logical
, ac
->ac_b_ex
.fe_logical
)
810 ctf_integer(int, result_start
, ac
->ac_b_ex
.fe_start
)
811 ctf_integer(__u32
, result_group
, ac
->ac_b_ex
.fe_group
)
812 ctf_integer(int, result_len
, ac
->ac_b_ex
.fe_len
)
817 LTTNG_TRACEPOINT_EVENT_INSTANCE(ext4__mballoc
, ext4_mballoc_discard
,
819 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37))
820 TP_PROTO(struct super_block
*sb
,
826 TP_ARGS(sb
, inode
, group
, start
, len
)
828 TP_PROTO(struct ext4_allocation_context
*ac
),
834 LTTNG_TRACEPOINT_EVENT_INSTANCE(ext4__mballoc
, ext4_mballoc_free
,
836 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37))
837 TP_PROTO(struct super_block
*sb
,
843 TP_ARGS(sb
, inode
, group
, start
, len
)
845 TP_PROTO(struct ext4_allocation_context
*ac
),
851 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,33))
852 LTTNG_TRACEPOINT_EVENT(ext4_forget
,
853 TP_PROTO(struct inode
*inode
, int is_metadata
, __u64 block
),
855 TP_ARGS(inode
, is_metadata
, block
),
858 ctf_integer(dev_t
, dev
, inode
->i_sb
->s_dev
)
859 ctf_integer(ino_t
, ino
, inode
->i_ino
)
860 ctf_integer(__u64
, block
, block
)
861 ctf_integer(int, is_metadata
, is_metadata
)
862 ctf_integer(TP_MODE_T
, mode
, inode
->i_mode
)
867 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,13,0))
868 LTTNG_TRACEPOINT_EVENT(ext4_da_update_reserve_space
,
869 TP_PROTO(struct inode
*inode
, int used_blocks
, int quota_claim
),
871 TP_ARGS(inode
, used_blocks
, quota_claim
),
874 ctf_integer(dev_t
, dev
, inode
->i_sb
->s_dev
)
875 ctf_integer(ino_t
, ino
, inode
->i_ino
)
876 ctf_integer(__u64
, i_blocks
, inode
->i_blocks
)
877 ctf_integer(int, used_blocks
, used_blocks
)
878 ctf_integer(int, reserved_data_blocks
,
879 EXT4_I(inode
)->i_reserved_data_blocks
)
880 ctf_integer(int, quota_claim
, quota_claim
)
881 ctf_integer(TP_MODE_T
, mode
, inode
->i_mode
)
884 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,2,0))
885 LTTNG_TRACEPOINT_EVENT(ext4_da_update_reserve_space
,
886 TP_PROTO(struct inode
*inode
, int used_blocks
, int quota_claim
),
888 TP_ARGS(inode
, used_blocks
, quota_claim
),
891 ctf_integer(dev_t
, dev
, inode
->i_sb
->s_dev
)
892 ctf_integer(ino_t
, ino
, inode
->i_ino
)
893 ctf_integer(__u64
, i_blocks
, inode
->i_blocks
)
894 ctf_integer(int, used_blocks
, used_blocks
)
895 ctf_integer(int, reserved_data_blocks
,
896 EXT4_I(inode
)->i_reserved_data_blocks
)
897 ctf_integer(int, reserved_meta_blocks
,
898 EXT4_I(inode
)->i_reserved_meta_blocks
)
899 ctf_integer(int, allocated_meta_blocks
,
900 EXT4_I(inode
)->i_allocated_meta_blocks
)
901 ctf_integer(int, quota_claim
, quota_claim
)
902 ctf_integer(TP_MODE_T
, mode
, inode
->i_mode
)
905 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,34))
906 LTTNG_TRACEPOINT_EVENT(ext4_da_update_reserve_space
,
907 TP_PROTO(struct inode
*inode
, int used_blocks
),
909 TP_ARGS(inode
, used_blocks
),
912 ctf_integer(dev_t
, dev
, inode
->i_sb
->s_dev
)
913 ctf_integer(ino_t
, ino
, inode
->i_ino
)
914 ctf_integer(__u64
, i_blocks
, inode
->i_blocks
)
915 ctf_integer(int, used_blocks
, used_blocks
)
916 ctf_integer(int, reserved_data_blocks
,
917 EXT4_I(inode
)->i_reserved_data_blocks
)
918 ctf_integer(int, reserved_meta_blocks
,
919 EXT4_I(inode
)->i_reserved_meta_blocks
)
920 ctf_integer(int, allocated_meta_blocks
,
921 EXT4_I(inode
)->i_allocated_meta_blocks
)
922 ctf_integer(TP_MODE_T
, mode
, inode
->i_mode
)
927 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,13,0))
928 LTTNG_TRACEPOINT_EVENT(ext4_da_reserve_space
,
929 TP_PROTO(struct inode
*inode
),
934 ctf_integer(dev_t
, dev
, inode
->i_sb
->s_dev
)
935 ctf_integer(ino_t
, ino
, inode
->i_ino
)
936 ctf_integer(__u64
, i_blocks
, inode
->i_blocks
)
937 ctf_integer(int, reserved_data_blocks
,
938 EXT4_I(inode
)->i_reserved_data_blocks
)
939 ctf_integer(TP_MODE_T
, mode
, inode
->i_mode
)
942 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,2,0))
943 LTTNG_TRACEPOINT_EVENT(ext4_da_reserve_space
,
944 TP_PROTO(struct inode
*inode
),
949 ctf_integer(dev_t
, dev
, inode
->i_sb
->s_dev
)
950 ctf_integer(ino_t
, ino
, inode
->i_ino
)
951 ctf_integer(__u64
, i_blocks
, inode
->i_blocks
)
952 ctf_integer(int, reserved_data_blocks
,
953 EXT4_I(inode
)->i_reserved_data_blocks
)
954 ctf_integer(int, reserved_meta_blocks
,
955 EXT4_I(inode
)->i_reserved_meta_blocks
)
956 ctf_integer(TP_MODE_T
, mode
, inode
->i_mode
)
959 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,34))
960 LTTNG_TRACEPOINT_EVENT(ext4_da_reserve_space
,
961 TP_PROTO(struct inode
*inode
, int md_needed
),
963 TP_ARGS(inode
, md_needed
),
966 ctf_integer(dev_t
, dev
, inode
->i_sb
->s_dev
)
967 ctf_integer(ino_t
, ino
, inode
->i_ino
)
968 ctf_integer(__u64
, i_blocks
, inode
->i_blocks
)
969 ctf_integer(int, md_needed
, md_needed
)
970 ctf_integer(int, reserved_data_blocks
,
971 EXT4_I(inode
)->i_reserved_data_blocks
)
972 ctf_integer(int, reserved_meta_blocks
,
973 EXT4_I(inode
)->i_reserved_meta_blocks
)
974 ctf_integer(TP_MODE_T
, mode
, inode
->i_mode
)
979 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,13,0))
980 LTTNG_TRACEPOINT_EVENT(ext4_da_release_space
,
981 TP_PROTO(struct inode
*inode
, int freed_blocks
),
983 TP_ARGS(inode
, freed_blocks
),
986 ctf_integer(dev_t
, dev
, inode
->i_sb
->s_dev
)
987 ctf_integer(ino_t
, ino
, inode
->i_ino
)
988 ctf_integer(__u64
, i_blocks
, inode
->i_blocks
)
989 ctf_integer(int, freed_blocks
, freed_blocks
)
990 ctf_integer(int, reserved_data_blocks
,
991 EXT4_I(inode
)->i_reserved_data_blocks
)
992 ctf_integer(TP_MODE_T
, mode
, inode
->i_mode
)
995 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,34))
996 LTTNG_TRACEPOINT_EVENT(ext4_da_release_space
,
997 TP_PROTO(struct inode
*inode
, int freed_blocks
),
999 TP_ARGS(inode
, freed_blocks
),
1002 ctf_integer(dev_t
, dev
, inode
->i_sb
->s_dev
)
1003 ctf_integer(ino_t
, ino
, inode
->i_ino
)
1004 ctf_integer(__u64
, i_blocks
, inode
->i_blocks
)
1005 ctf_integer(int, freed_blocks
, freed_blocks
)
1006 ctf_integer(int, reserved_data_blocks
,
1007 EXT4_I(inode
)->i_reserved_data_blocks
)
1008 ctf_integer(int, reserved_meta_blocks
,
1009 EXT4_I(inode
)->i_reserved_meta_blocks
)
1010 ctf_integer(int, allocated_meta_blocks
,
1011 EXT4_I(inode
)->i_allocated_meta_blocks
)
1012 ctf_integer(TP_MODE_T
, mode
, inode
->i_mode
)
1017 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35))
1018 LTTNG_TRACEPOINT_EVENT_CLASS(ext4__bitmap_load
,
1019 TP_PROTO(struct super_block
*sb
, unsigned long group
),
1024 ctf_integer(dev_t
, dev
, sb
->s_dev
)
1025 ctf_integer(__u32
, group
, group
)
1029 LTTNG_TRACEPOINT_EVENT_INSTANCE(ext4__bitmap_load
, ext4_mb_bitmap_load
,
1031 TP_PROTO(struct super_block
*sb
, unsigned long group
),
1036 LTTNG_TRACEPOINT_EVENT_INSTANCE(ext4__bitmap_load
, ext4_mb_buddy_bitmap_load
,
1038 TP_PROTO(struct super_block
*sb
, unsigned long group
),
1044 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,39))
1046 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,9,0))
1047 LTTNG_TRACEPOINT_EVENT(ext4_read_block_bitmap_load
,
1048 TP_PROTO(struct super_block
*sb
, unsigned long group
, bool prefetch
),
1050 TP_ARGS(sb
, group
, prefetch
),
1053 ctf_integer(dev_t
, dev
, sb
->s_dev
)
1054 ctf_integer(__u32
, group
, group
)
1055 ctf_integer(bool, prefetch
, prefetch
)
1059 LTTNG_TRACEPOINT_EVENT_INSTANCE(ext4__bitmap_load
, ext4_read_block_bitmap_load
,
1061 TP_PROTO(struct super_block
*sb
, unsigned long group
),
1067 LTTNG_TRACEPOINT_EVENT_INSTANCE(ext4__bitmap_load
, ext4_load_inode_bitmap
,
1069 TP_PROTO(struct super_block
*sb
, unsigned long group
),
1074 LTTNG_TRACEPOINT_EVENT(ext4_direct_IO_enter
,
1075 TP_PROTO(struct inode
*inode
, loff_t offset
, unsigned long len
, int rw
),
1077 TP_ARGS(inode
, offset
, len
, rw
),
1080 ctf_integer(dev_t
, dev
, inode
->i_sb
->s_dev
)
1081 ctf_integer(ino_t
, ino
, inode
->i_ino
)
1082 ctf_integer(loff_t
, pos
, offset
)
1083 ctf_integer(unsigned long, len
, len
)
1084 ctf_integer(int, rw
, rw
)
1088 LTTNG_TRACEPOINT_EVENT(ext4_direct_IO_exit
,
1089 TP_PROTO(struct inode
*inode
, loff_t offset
, unsigned long len
,
1092 TP_ARGS(inode
, offset
, len
, rw
, ret
),
1095 ctf_integer(dev_t
, dev
, inode
->i_sb
->s_dev
)
1096 ctf_integer(ino_t
, ino
, inode
->i_ino
)
1097 ctf_integer(loff_t
, pos
, offset
)
1098 ctf_integer(unsigned long, len
, len
)
1099 ctf_integer(int, rw
, rw
)
1100 ctf_integer(int, ret
, ret
)
1104 LTTNG_TRACEPOINT_EVENT(ext4_fallocate_exit
,
1105 TP_PROTO(struct inode
*inode
, loff_t offset
,
1106 unsigned int max_blocks
, int ret
),
1108 TP_ARGS(inode
, offset
, max_blocks
, ret
),
1111 ctf_integer(dev_t
, dev
, inode
->i_sb
->s_dev
)
1112 ctf_integer(ino_t
, ino
, inode
->i_ino
)
1113 ctf_integer(loff_t
, pos
, offset
)
1114 ctf_integer(unsigned int, blocks
, max_blocks
)
1115 ctf_integer(int, ret
, ret
)
1119 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,15,0))
1121 LTTNG_TRACEPOINT_EVENT_CLASS(ext4__fallocate_mode
,
1122 TP_PROTO(struct inode
*inode
, loff_t offset
, loff_t len
, int mode
),
1124 TP_ARGS(inode
, offset
, len
, mode
),
1127 ctf_integer(dev_t
, dev
, inode
->i_sb
->s_dev
)
1128 ctf_integer(ino_t
, ino
, inode
->i_ino
)
1129 ctf_integer(loff_t
, pos
, offset
)
1130 ctf_integer(loff_t
, len
, len
)
1131 ctf_integer(int, mode
, mode
)
1135 LTTNG_TRACEPOINT_EVENT_INSTANCE(ext4__fallocate_mode
, ext4_fallocate_enter
,
1137 TP_PROTO(struct inode
*inode
, loff_t offset
, loff_t len
, int mode
),
1139 TP_ARGS(inode
, offset
, len
, mode
)
1142 LTTNG_TRACEPOINT_EVENT_INSTANCE(ext4__fallocate_mode
, ext4_punch_hole
,
1144 TP_PROTO(struct inode
*inode
, loff_t offset
, loff_t len
, int mode
),
1146 TP_ARGS(inode
, offset
, len
, mode
)
1149 LTTNG_TRACEPOINT_EVENT_INSTANCE(ext4__fallocate_mode
, ext4_zero_range
,
1151 TP_PROTO(struct inode
*inode
, loff_t offset
, loff_t len
, int mode
),
1153 TP_ARGS(inode
, offset
, len
, mode
)
1156 #else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,15,0)) */
1158 LTTNG_TRACEPOINT_EVENT(ext4_fallocate_enter
,
1159 TP_PROTO(struct inode
*inode
, loff_t offset
, loff_t len
, int mode
),
1161 TP_ARGS(inode
, offset
, len
, mode
),
1164 ctf_integer(dev_t
, dev
, inode
->i_sb
->s_dev
)
1165 ctf_integer(ino_t
, ino
, inode
->i_ino
)
1166 ctf_integer(loff_t
, pos
, offset
)
1167 ctf_integer(loff_t
, len
, len
)
1168 ctf_integer(int, mode
, mode
)
1172 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,11,0))
1174 LTTNG_TRACEPOINT_EVENT(ext4_punch_hole
,
1175 TP_PROTO(struct inode
*inode
, loff_t offset
, loff_t len
),
1177 TP_ARGS(inode
, offset
, len
),
1180 ctf_integer(dev_t
, dev
, inode
->i_sb
->s_dev
)
1181 ctf_integer(ino_t
, ino
, inode
->i_ino
)
1182 ctf_integer(loff_t
, pos
, offset
)
1183 ctf_integer(loff_t
, len
, len
)
1187 #endif /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,11,0)) */
1189 #endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,15,0)) */
1191 LTTNG_TRACEPOINT_EVENT(ext4_unlink_enter
,
1192 TP_PROTO(struct inode
*parent
, struct dentry
*dentry
),
1194 TP_ARGS(parent
, dentry
),
1197 ctf_integer(dev_t
, dev
, dentry
->d_inode
->i_sb
->s_dev
)
1198 ctf_integer(ino_t
, ino
, dentry
->d_inode
->i_ino
)
1199 ctf_integer(ino_t
, parent
, parent
->i_ino
)
1200 ctf_integer(loff_t
, size
, dentry
->d_inode
->i_size
)
1204 LTTNG_TRACEPOINT_EVENT(ext4_unlink_exit
,
1205 TP_PROTO(struct dentry
*dentry
, int ret
),
1207 TP_ARGS(dentry
, ret
),
1210 ctf_integer(dev_t
, dev
, dentry
->d_inode
->i_sb
->s_dev
)
1211 ctf_integer(ino_t
, ino
, dentry
->d_inode
->i_ino
)
1212 ctf_integer(int, ret
, ret
)
1216 LTTNG_TRACEPOINT_EVENT_CLASS(ext4__truncate
,
1217 TP_PROTO(struct inode
*inode
),
1222 ctf_integer(dev_t
, dev
, inode
->i_sb
->s_dev
)
1223 ctf_integer(ino_t
, ino
, inode
->i_ino
)
1224 ctf_integer(unsigned int, blocks
, inode
->i_blocks
)
1228 LTTNG_TRACEPOINT_EVENT_INSTANCE(ext4__truncate
, ext4_truncate_enter
,
1230 TP_PROTO(struct inode
*inode
),
1235 LTTNG_TRACEPOINT_EVENT_INSTANCE(ext4__truncate
, ext4_truncate_exit
,
1237 TP_PROTO(struct inode
*inode
),
1242 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,2,0))
1243 /* 'ux' is the uninitialized extent. */
1244 LTTNG_TRACEPOINT_EVENT(ext4_ext_convert_to_initialized_enter
,
1245 TP_PROTO(struct inode
*inode
, struct ext4_map_blocks
*map
,
1246 struct ext4_extent
*ux
),
1248 TP_ARGS(inode
, map
, ux
),
1251 ctf_integer(dev_t
, dev
, inode
->i_sb
->s_dev
)
1252 ctf_integer(ino_t
, ino
, inode
->i_ino
)
1253 ctf_integer(ext4_lblk_t
, m_lblk
, map
->m_lblk
)
1254 ctf_integer(unsigned, m_len
, map
->m_len
)
1255 ctf_integer(ext4_lblk_t
, u_lblk
, le32_to_cpu(ux
->ee_block
))
1256 ctf_integer(unsigned, u_len
, ext4_ext_get_actual_len(ux
))
1257 ctf_integer(ext4_fsblk_t
, u_pblk
, ext4_ext_pblock(ux
))
1262 * 'ux' is the uninitialized extent.
1263 * 'ix' is the initialized extent to which blocks are transferred.
1265 LTTNG_TRACEPOINT_EVENT(ext4_ext_convert_to_initialized_fastpath
,
1266 TP_PROTO(struct inode
*inode
, struct ext4_map_blocks
*map
,
1267 struct ext4_extent
*ux
, struct ext4_extent
*ix
),
1269 TP_ARGS(inode
, map
, ux
, ix
),
1272 ctf_integer(dev_t
, dev
, inode
->i_sb
->s_dev
)
1273 ctf_integer(ino_t
, ino
, inode
->i_ino
)
1274 ctf_integer(ext4_lblk_t
, m_lblk
, map
->m_lblk
)
1275 ctf_integer(unsigned, m_len
, map
->m_len
)
1276 ctf_integer(ext4_lblk_t
, u_lblk
, le32_to_cpu(ux
->ee_block
))
1277 ctf_integer(unsigned, u_len
, ext4_ext_get_actual_len(ux
))
1278 ctf_integer(ext4_fsblk_t
, u_pblk
, ext4_ext_pblock(ux
))
1279 ctf_integer(ext4_lblk_t
, i_lblk
, le32_to_cpu(ix
->ee_block
))
1280 ctf_integer(unsigned, i_len
, ext4_ext_get_actual_len(ix
))
1281 ctf_integer(ext4_fsblk_t
, i_pblk
, ext4_ext_pblock(ix
))
1286 LTTNG_TRACEPOINT_EVENT_CLASS(ext4__map_blocks_enter
,
1287 TP_PROTO(struct inode
*inode
, ext4_lblk_t lblk
,
1288 unsigned int len
, unsigned int flags
),
1290 TP_ARGS(inode
, lblk
, len
, flags
),
1293 ctf_integer(dev_t
, dev
, inode
->i_sb
->s_dev
)
1294 ctf_integer(ino_t
, ino
, inode
->i_ino
)
1295 ctf_integer(ext4_lblk_t
, lblk
, lblk
)
1296 ctf_integer(unsigned int, len
, len
)
1297 ctf_integer(unsigned int, flags
, flags
)
1301 LTTNG_TRACEPOINT_EVENT_INSTANCE(ext4__map_blocks_enter
, ext4_ext_map_blocks_enter
,
1302 TP_PROTO(struct inode
*inode
, ext4_lblk_t lblk
,
1303 unsigned len
, unsigned flags
),
1305 TP_ARGS(inode
, lblk
, len
, flags
)
1308 LTTNG_TRACEPOINT_EVENT_INSTANCE(ext4__map_blocks_enter
, ext4_ind_map_blocks_enter
,
1309 TP_PROTO(struct inode
*inode
, ext4_lblk_t lblk
,
1310 unsigned len
, unsigned flags
),
1312 TP_ARGS(inode
, lblk
, len
, flags
)
1315 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,11,0))
1317 LTTNG_TRACEPOINT_EVENT_CLASS(ext4__map_blocks_exit
,
1318 TP_PROTO(struct inode
*inode
, unsigned flags
, struct ext4_map_blocks
*map
,
1321 TP_ARGS(inode
, flags
, map
, ret
),
1324 ctf_integer(dev_t
, dev
, inode
->i_sb
->s_dev
)
1325 ctf_integer(ino_t
, ino
, inode
->i_ino
)
1326 ctf_integer(unsigned int, flags
, flags
)
1327 ctf_integer(ext4_fsblk_t
, pblk
, map
->m_pblk
)
1328 ctf_integer(ext4_lblk_t
, lblk
, map
->m_lblk
)
1329 ctf_integer(unsigned int, len
, map
->m_len
)
1330 ctf_integer(unsigned int, mflags
, map
->m_flags
)
1331 ctf_integer(int, ret
, ret
)
1335 LTTNG_TRACEPOINT_EVENT_INSTANCE(ext4__map_blocks_exit
, ext4_ext_map_blocks_exit
,
1336 TP_PROTO(struct inode
*inode
, unsigned flags
,
1337 struct ext4_map_blocks
*map
, int ret
),
1339 TP_ARGS(inode
, flags
, map
, ret
)
1342 LTTNG_TRACEPOINT_EVENT_INSTANCE(ext4__map_blocks_exit
, ext4_ind_map_blocks_exit
,
1343 TP_PROTO(struct inode
*inode
, unsigned flags
,
1344 struct ext4_map_blocks
*map
, int ret
),
1346 TP_ARGS(inode
, flags
, map
, ret
)
1349 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,8,0))
1351 LTTNG_TRACEPOINT_EVENT_CLASS(ext4__map_blocks_exit
,
1352 TP_PROTO(struct inode
*inode
, struct ext4_map_blocks
*map
, int ret
),
1354 TP_ARGS(inode
, map
, ret
),
1357 ctf_integer(dev_t
, dev
, inode
->i_sb
->s_dev
)
1358 ctf_integer(ino_t
, ino
, inode
->i_ino
)
1359 ctf_integer(ext4_fsblk_t
, pblk
, map
->m_pblk
)
1360 ctf_integer(ext4_lblk_t
, lblk
, map
->m_lblk
)
1361 ctf_integer(unsigned int, len
, map
->m_len
)
1362 ctf_integer(unsigned int, mflags
, map
->m_flags
)
1363 ctf_integer(int, ret
, ret
)
1367 LTTNG_TRACEPOINT_EVENT_INSTANCE(ext4__map_blocks_exit
, ext4_ext_map_blocks_exit
,
1368 TP_PROTO(struct inode
*inode
, struct ext4_map_blocks
*map
, int ret
),
1370 TP_ARGS(inode
, map
, ret
)
1373 LTTNG_TRACEPOINT_EVENT_INSTANCE(ext4__map_blocks_exit
, ext4_ind_map_blocks_exit
,
1374 TP_PROTO(struct inode
*inode
, struct ext4_map_blocks
*map
, int ret
),
1376 TP_ARGS(inode
, map
, ret
)
1379 #else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,8,0)) */
1381 LTTNG_TRACEPOINT_EVENT_CLASS(ext4__map_blocks_exit
,
1382 TP_PROTO(struct inode
*inode
, ext4_lblk_t lblk
,
1383 ext4_fsblk_t pblk
, unsigned int len
, int ret
),
1385 TP_ARGS(inode
, lblk
, pblk
, len
, ret
),
1388 ctf_integer(dev_t
, dev
, inode
->i_sb
->s_dev
)
1389 ctf_integer(ino_t
, ino
, inode
->i_ino
)
1390 ctf_integer(ext4_fsblk_t
, pblk
, pblk
)
1391 ctf_integer(ext4_lblk_t
, lblk
, lblk
)
1392 ctf_integer(unsigned int, len
, len
)
1393 ctf_integer(int, ret
, ret
)
1397 LTTNG_TRACEPOINT_EVENT_INSTANCE(ext4__map_blocks_exit
, ext4_ext_map_blocks_exit
,
1398 TP_PROTO(struct inode
*inode
, ext4_lblk_t lblk
,
1399 ext4_fsblk_t pblk
, unsigned len
, int ret
),
1401 TP_ARGS(inode
, lblk
, pblk
, len
, ret
)
1404 LTTNG_TRACEPOINT_EVENT_INSTANCE(ext4__map_blocks_exit
, ext4_ind_map_blocks_exit
,
1405 TP_PROTO(struct inode
*inode
, ext4_lblk_t lblk
,
1406 ext4_fsblk_t pblk
, unsigned len
, int ret
),
1408 TP_ARGS(inode
, lblk
, pblk
, len
, ret
)
1411 #endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,8,0)) */
1413 LTTNG_TRACEPOINT_EVENT(ext4_ext_load_extent
,
1414 TP_PROTO(struct inode
*inode
, ext4_lblk_t lblk
, ext4_fsblk_t pblk
),
1416 TP_ARGS(inode
, lblk
, pblk
),
1419 ctf_integer(dev_t
, dev
, inode
->i_sb
->s_dev
)
1420 ctf_integer(ino_t
, ino
, inode
->i_ino
)
1421 ctf_integer(ext4_fsblk_t
, pblk
, pblk
)
1422 ctf_integer(ext4_lblk_t
, lblk
, lblk
)
1426 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,10,0))
1427 LTTNG_TRACEPOINT_EVENT(ext4_load_inode
,
1428 TP_PROTO(struct super_block
*sb
, unsigned long ino
),
1433 ctf_integer(dev_t
, dev
, sb
->s_dev
)
1434 ctf_integer(ino_t
, ino
, ino
)
1438 LTTNG_TRACEPOINT_EVENT(ext4_load_inode
,
1439 TP_PROTO(struct inode
*inode
),
1444 ctf_integer(dev_t
, dev
, inode
->i_sb
->s_dev
)
1445 ctf_integer(ino_t
, ino
, inode
->i_ino
)
1450 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,5,0))
1452 LTTNG_TRACEPOINT_EVENT(ext4_journal_start
,
1453 TP_PROTO(struct super_block
*sb
, int blocks
, int rsv_blocks
,
1454 int revoke_creds
, unsigned long IP
),
1456 TP_ARGS(sb
, blocks
, rsv_blocks
, revoke_creds
, IP
),
1459 ctf_integer(dev_t
, dev
, sb
->s_dev
)
1460 ctf_integer(unsigned long, ip
, IP
)
1461 ctf_integer(int, blocks
, blocks
)
1462 ctf_integer(int, rsv_blocks
, rsv_blocks
)
1463 ctf_integer(int, revoke_creds
, revoke_creds
)
1467 LTTNG_TRACEPOINT_EVENT(ext4_journal_start_reserved
,
1468 TP_PROTO(struct super_block
*sb
, int blocks
, unsigned long IP
),
1470 TP_ARGS(sb
, blocks
, IP
),
1473 ctf_integer(dev_t
, dev
, sb
->s_dev
)
1474 ctf_integer(unsigned long, ip
, IP
)
1475 ctf_integer(int, blocks
, blocks
)
1479 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,11,0))
1481 LTTNG_TRACEPOINT_EVENT(ext4_journal_start
,
1482 TP_PROTO(struct super_block
*sb
, int blocks
, int rsv_blocks
,
1485 TP_ARGS(sb
, blocks
, rsv_blocks
, IP
),
1488 ctf_integer(dev_t
, dev
, sb
->s_dev
)
1489 ctf_integer(unsigned long, ip
, IP
)
1490 ctf_integer(int, blocks
, blocks
)
1491 ctf_integer(int, rsv_blocks
, rsv_blocks
)
1495 LTTNG_TRACEPOINT_EVENT(ext4_journal_start_reserved
,
1496 TP_PROTO(struct super_block
*sb
, int blocks
, unsigned long IP
),
1498 TP_ARGS(sb
, blocks
, IP
),
1501 ctf_integer(dev_t
, dev
, sb
->s_dev
)
1502 ctf_integer(unsigned long, ip
, IP
)
1503 ctf_integer(int, blocks
, blocks
)
1507 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,1,0))
1509 LTTNG_TRACEPOINT_EVENT(ext4_journal_start
,
1510 TP_PROTO(struct super_block
*sb
, int nblocks
, unsigned long IP
),
1512 TP_ARGS(sb
, nblocks
, IP
),
1515 ctf_integer(dev_t
, dev
, sb
->s_dev
)
1516 ctf_integer(unsigned long, ip
, IP
)
1517 ctf_integer(int, nblocks
, nblocks
)
1521 LTTNG_TRACEPOINT_EVENT_CLASS(ext4__trim
,
1522 TP_PROTO(struct super_block
*sb
,
1524 ext4_grpblk_t start
,
1527 TP_ARGS(sb
, group
, start
, len
),
1530 ctf_integer(int, dev_major
, MAJOR(sb
->s_dev
))
1531 ctf_integer(int, dev_minor
, MINOR(sb
->s_dev
))
1532 ctf_integer(__u32
, group
, group
)
1533 ctf_integer(int, start
, start
)
1534 ctf_integer(int, len
, len
)
1538 LTTNG_TRACEPOINT_EVENT_INSTANCE(ext4__trim
, ext4_trim_extent
,
1540 TP_PROTO(struct super_block
*sb
,
1542 ext4_grpblk_t start
,
1545 TP_ARGS(sb
, group
, start
, len
)
1548 LTTNG_TRACEPOINT_EVENT_INSTANCE(ext4__trim
, ext4_trim_all_free
,
1550 TP_PROTO(struct super_block
*sb
,
1552 ext4_grpblk_t start
,
1555 TP_ARGS(sb
, group
, start
, len
)
1559 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,2,0))
1561 LTTNG_TRACEPOINT_EVENT(ext4_ext_handle_uninitialized_extents
,
1562 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,8,0))
1563 TP_PROTO(struct inode
*inode
, struct ext4_map_blocks
*map
, int flags
,
1564 unsigned int allocated
, ext4_fsblk_t newblock
),
1566 TP_ARGS(inode
, map
, flags
, allocated
, newblock
),
1567 #else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,8,0)) */
1568 TP_PROTO(struct inode
*inode
, struct ext4_map_blocks
*map
,
1569 unsigned int allocated
, ext4_fsblk_t newblock
),
1571 TP_ARGS(inode
, map
, allocated
, newblock
),
1572 #endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,8,0)) */
1575 ctf_integer(dev_t
, dev
, inode
->i_sb
->s_dev
)
1576 ctf_integer(ino_t
, ino
, inode
->i_ino
)
1577 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,8,0))
1578 ctf_integer(int, flags
, flags
)
1579 #else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,8,0)) */
1580 ctf_integer(int, flags
, map
->m_flags
)
1581 #endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,8,0)) */
1582 ctf_integer(ext4_lblk_t
, lblk
, map
->m_lblk
)
1583 ctf_integer(ext4_fsblk_t
, pblk
, map
->m_pblk
)
1584 ctf_integer(unsigned int, len
, map
->m_len
)
1585 ctf_integer(unsigned int, allocated
, allocated
)
1586 ctf_integer(ext4_fsblk_t
, newblk
, newblock
)
1590 LTTNG_TRACEPOINT_EVENT(ext4_get_implied_cluster_alloc_exit
,
1591 TP_PROTO(struct super_block
*sb
, struct ext4_map_blocks
*map
, int ret
),
1593 TP_ARGS(sb
, map
, ret
),
1596 ctf_integer(dev_t
, dev
, sb
->s_dev
)
1597 ctf_integer(unsigned int, flags
, map
->m_flags
)
1598 ctf_integer(ext4_lblk_t
, lblk
, map
->m_lblk
)
1599 ctf_integer(ext4_fsblk_t
, pblk
, map
->m_pblk
)
1600 ctf_integer(unsigned int, len
, map
->m_len
)
1601 ctf_integer(int, ret
, ret
)
1605 LTTNG_TRACEPOINT_EVENT(ext4_ext_put_in_cache
,
1606 TP_PROTO(struct inode
*inode
, ext4_lblk_t lblk
, unsigned int len
,
1607 ext4_fsblk_t start
),
1609 TP_ARGS(inode
, lblk
, len
, start
),
1612 ctf_integer(dev_t
, dev
, inode
->i_sb
->s_dev
)
1613 ctf_integer(ino_t
, ino
, inode
->i_ino
)
1614 ctf_integer(ext4_lblk_t
, lblk
, lblk
)
1615 ctf_integer(unsigned int, len
, len
)
1616 ctf_integer(ext4_fsblk_t
, start
, start
)
1620 LTTNG_TRACEPOINT_EVENT(ext4_ext_in_cache
,
1621 TP_PROTO(struct inode
*inode
, ext4_lblk_t lblk
, int ret
),
1623 TP_ARGS(inode
, lblk
, ret
),
1626 ctf_integer(dev_t
, dev
, inode
->i_sb
->s_dev
)
1627 ctf_integer(ino_t
, ino
, inode
->i_ino
)
1628 ctf_integer(ext4_lblk_t
, lblk
, lblk
)
1629 ctf_integer(int, ret
, ret
)
1633 LTTNG_TRACEPOINT_EVENT(ext4_find_delalloc_range
,
1634 TP_PROTO(struct inode
*inode
, ext4_lblk_t from
, ext4_lblk_t to
,
1635 int reverse
, int found
, ext4_lblk_t found_blk
),
1637 TP_ARGS(inode
, from
, to
, reverse
, found
, found_blk
),
1640 ctf_integer(dev_t
, dev
, inode
->i_sb
->s_dev
)
1641 ctf_integer(ino_t
, ino
, inode
->i_ino
)
1642 ctf_integer(ext4_lblk_t
, from
, from
)
1643 ctf_integer(ext4_lblk_t
, to
, to
)
1644 ctf_integer(int, reverse
, reverse
)
1645 ctf_integer(int, found
, found
)
1646 ctf_integer(ext4_lblk_t
, found_blk
, found_blk
)
1650 LTTNG_TRACEPOINT_EVENT(ext4_get_reserved_cluster_alloc
,
1651 TP_PROTO(struct inode
*inode
, ext4_lblk_t lblk
, unsigned int len
),
1653 TP_ARGS(inode
, lblk
, len
),
1656 ctf_integer(dev_t
, dev
, inode
->i_sb
->s_dev
)
1657 ctf_integer(ino_t
, ino
, inode
->i_ino
)
1658 ctf_integer(ext4_lblk_t
, lblk
, lblk
)
1659 ctf_integer(unsigned int, len
, len
)
1663 LTTNG_TRACEPOINT_EVENT(ext4_ext_show_extent
,
1664 TP_PROTO(struct inode
*inode
, ext4_lblk_t lblk
, ext4_fsblk_t pblk
,
1665 unsigned short len
),
1667 TP_ARGS(inode
, lblk
, pblk
, len
),
1670 ctf_integer(dev_t
, dev
, inode
->i_sb
->s_dev
)
1671 ctf_integer(ino_t
, ino
, inode
->i_ino
)
1672 ctf_integer(ext4_fsblk_t
, pblk
, pblk
)
1673 ctf_integer(ext4_lblk_t
, lblk
, lblk
)
1674 ctf_integer(unsigned short, len
, len
)
1678 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,20,0) || \
1679 LTTNG_RHEL_KERNEL_RANGE(4,18,0,147,0,0, 4,19,0,0,0,0))
1681 LTTNG_TRACEPOINT_EVENT(ext4_remove_blocks
,
1682 TP_PROTO(struct inode
*inode
, struct ext4_extent
*ex
,
1683 ext4_lblk_t from
, ext4_fsblk_t to
,
1684 struct partial_cluster
*pc
),
1686 TP_ARGS(inode
, ex
, from
, to
, pc
),
1689 ctf_integer(dev_t
, dev
, inode
->i_sb
->s_dev
)
1690 ctf_integer(ino_t
, ino
, inode
->i_ino
)
1691 ctf_integer(ext4_lblk_t
, from
, from
)
1692 ctf_integer(ext4_lblk_t
, to
, to
)
1693 ctf_integer(ext4_fsblk_t
, ee_pblk
, ext4_ext_pblock(ex
))
1694 ctf_integer(ext4_lblk_t
, ee_lblk
, le32_to_cpu(ex
->ee_block
))
1695 ctf_integer(unsigned short, ee_len
, ext4_ext_get_actual_len(ex
))
1696 ctf_integer(ext4_fsblk_t
, pc_pclu
, pc
->pclu
)
1697 ctf_integer(ext4_lblk_t
, pc_lblk
, pc
->lblk
)
1698 ctf_integer(int, pc_state
, pc
->state
)
1702 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,11,0))
1704 LTTNG_TRACEPOINT_EVENT(ext4_remove_blocks
,
1705 TP_PROTO(struct inode
*inode
, struct ext4_extent
*ex
,
1706 ext4_lblk_t from
, ext4_fsblk_t to
,
1707 long long partial_cluster
),
1709 TP_ARGS(inode
, ex
, from
, to
, partial_cluster
),
1712 ctf_integer(dev_t
, dev
, inode
->i_sb
->s_dev
)
1713 ctf_integer(ino_t
, ino
, inode
->i_ino
)
1714 ctf_integer(ext4_lblk_t
, from
, from
)
1715 ctf_integer(ext4_lblk_t
, to
, to
)
1716 ctf_integer(long long, partial
, partial_cluster
)
1717 ctf_integer(ext4_fsblk_t
, ee_pblk
, ext4_ext_pblock(ex
))
1718 ctf_integer(ext4_lblk_t
, ee_lblk
, le32_to_cpu(ex
->ee_block
))
1719 ctf_integer(unsigned short, ee_len
, ext4_ext_get_actual_len(ex
))
1725 LTTNG_TRACEPOINT_EVENT(ext4_remove_blocks
,
1726 TP_PROTO(struct inode
*inode
, struct ext4_extent
*ex
,
1727 ext4_lblk_t from
, ext4_fsblk_t to
,
1728 ext4_fsblk_t partial_cluster
),
1730 TP_ARGS(inode
, ex
, from
, to
, partial_cluster
),
1733 ctf_integer(dev_t
, dev
, inode
->i_sb
->s_dev
)
1734 ctf_integer(ino_t
, ino
, inode
->i_ino
)
1735 ctf_integer(ext4_lblk_t
, from
, from
)
1736 ctf_integer(ext4_lblk_t
, to
, to
)
1737 ctf_integer(ext4_fsblk_t
, partial
, partial_cluster
)
1738 ctf_integer(ext4_fsblk_t
, ee_pblk
, ext4_ext_pblock(ex
))
1739 ctf_integer(ext4_lblk_t
, ee_lblk
, le32_to_cpu(ex
->ee_block
))
1740 ctf_integer(unsigned short, ee_len
, ext4_ext_get_actual_len(ex
))
1746 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,20,0) || \
1747 LTTNG_RHEL_KERNEL_RANGE(4,18,0,147,0,0, 4,19,0,0,0,0))
1749 LTTNG_TRACEPOINT_EVENT(ext4_ext_rm_leaf
,
1750 TP_PROTO(struct inode
*inode
, ext4_lblk_t start
,
1751 struct ext4_extent
*ex
,
1752 struct partial_cluster
*pc
),
1754 TP_ARGS(inode
, start
, ex
, pc
),
1757 ctf_integer(dev_t
, dev
, inode
->i_sb
->s_dev
)
1758 ctf_integer(ino_t
, ino
, inode
->i_ino
)
1759 ctf_integer(ext4_lblk_t
, start
, start
)
1760 ctf_integer(ext4_lblk_t
, ee_lblk
, le32_to_cpu(ex
->ee_block
))
1761 ctf_integer(ext4_fsblk_t
, ee_pblk
, ext4_ext_pblock(ex
))
1762 ctf_integer(short, ee_len
, ext4_ext_get_actual_len(ex
))
1763 ctf_integer(ext4_fsblk_t
, pc_pclu
, pc
->pclu
)
1764 ctf_integer(ext4_lblk_t
, pc_lblk
, pc
->lblk
)
1765 ctf_integer(int, pc_state
, pc
->state
)
1769 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,11,0))
1771 LTTNG_TRACEPOINT_EVENT(ext4_ext_rm_leaf
,
1772 TP_PROTO(struct inode
*inode
, ext4_lblk_t start
,
1773 struct ext4_extent
*ex
,
1774 long long partial_cluster
),
1776 TP_ARGS(inode
, start
, ex
, partial_cluster
),
1779 ctf_integer(dev_t
, dev
, inode
->i_sb
->s_dev
)
1780 ctf_integer(ino_t
, ino
, inode
->i_ino
)
1781 ctf_integer(long long, partial
, partial_cluster
)
1782 ctf_integer(ext4_lblk_t
, start
, start
)
1783 ctf_integer(ext4_lblk_t
, ee_lblk
, le32_to_cpu(ex
->ee_block
))
1784 ctf_integer(ext4_fsblk_t
, ee_pblk
, ext4_ext_pblock(ex
))
1785 ctf_integer(short, ee_len
, ext4_ext_get_actual_len(ex
))
1791 LTTNG_TRACEPOINT_EVENT(ext4_ext_rm_leaf
,
1792 TP_PROTO(struct inode
*inode
, ext4_lblk_t start
,
1793 struct ext4_extent
*ex
, ext4_fsblk_t partial_cluster
),
1795 TP_ARGS(inode
, start
, ex
, partial_cluster
),
1798 ctf_integer(dev_t
, dev
, inode
->i_sb
->s_dev
)
1799 ctf_integer(ino_t
, ino
, inode
->i_ino
)
1800 ctf_integer(long long, partial
, partial_cluster
)
1801 ctf_integer(ext4_lblk_t
, start
, start
)
1802 ctf_integer(ext4_lblk_t
, ee_lblk
, le32_to_cpu(ex
->ee_block
))
1803 ctf_integer(ext4_fsblk_t
, ee_pblk
, ext4_ext_pblock(ex
))
1804 ctf_integer(short, ee_len
, ext4_ext_get_actual_len(ex
))
1810 LTTNG_TRACEPOINT_EVENT(ext4_ext_rm_idx
,
1811 TP_PROTO(struct inode
*inode
, ext4_fsblk_t pblk
),
1813 TP_ARGS(inode
, pblk
),
1816 ctf_integer(dev_t
, dev
, inode
->i_sb
->s_dev
)
1817 ctf_integer(ino_t
, ino
, inode
->i_ino
)
1818 ctf_integer(ext4_fsblk_t
, pblk
, pblk
)
1822 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,11,0))
1824 LTTNG_TRACEPOINT_EVENT(ext4_ext_remove_space
,
1825 TP_PROTO(struct inode
*inode
, ext4_lblk_t start
,
1826 ext4_lblk_t end
, int depth
),
1828 TP_ARGS(inode
, start
, end
, depth
),
1831 ctf_integer(dev_t
, dev
, inode
->i_sb
->s_dev
)
1832 ctf_integer(ino_t
, ino
, inode
->i_ino
)
1833 ctf_integer(ext4_lblk_t
, start
, start
)
1834 ctf_integer(ext4_lblk_t
, end
, end
)
1835 ctf_integer(int, depth
, depth
)
1841 LTTNG_TRACEPOINT_EVENT(ext4_ext_remove_space
,
1842 TP_PROTO(struct inode
*inode
, ext4_lblk_t start
, int depth
),
1844 TP_ARGS(inode
, start
, depth
),
1847 ctf_integer(dev_t
, dev
, inode
->i_sb
->s_dev
)
1848 ctf_integer(ino_t
, ino
, inode
->i_ino
)
1849 ctf_integer(ext4_lblk_t
, start
, start
)
1850 ctf_integer(int, depth
, depth
)
1856 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,20,0) || \
1857 LTTNG_RHEL_KERNEL_RANGE(4,18,0,147,0,0, 4,19,0,0,0,0))
1859 LTTNG_TRACEPOINT_EVENT(ext4_ext_remove_space_done
,
1860 TP_PROTO(struct inode
*inode
, ext4_lblk_t start
, ext4_lblk_t end
,
1861 int depth
, struct partial_cluster
*pc
, __le16 eh_entries
),
1863 TP_ARGS(inode
, start
, end
, depth
, pc
, eh_entries
),
1866 ctf_integer(dev_t
, dev
, inode
->i_sb
->s_dev
)
1867 ctf_integer(ino_t
, ino
, inode
->i_ino
)
1868 ctf_integer(ext4_lblk_t
, start
, start
)
1869 ctf_integer(ext4_lblk_t
, end
, end
)
1870 ctf_integer(int, depth
, depth
)
1871 ctf_integer(unsigned short, eh_entries
, le16_to_cpu(eh_entries
))
1872 ctf_integer(ext4_fsblk_t
, pc_pclu
, pc
->pclu
)
1873 ctf_integer(ext4_lblk_t
, pc_lblk
, pc
->lblk
)
1874 ctf_integer(int, pc_state
, pc
->state
)
1878 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,11,0))
1880 LTTNG_TRACEPOINT_EVENT(ext4_ext_remove_space_done
,
1881 TP_PROTO(struct inode
*inode
, ext4_lblk_t start
, ext4_lblk_t end
,
1882 int depth
, long long partial
, __le16 eh_entries
),
1884 TP_ARGS(inode
, start
, end
, depth
, partial
, eh_entries
),
1887 ctf_integer(dev_t
, dev
, inode
->i_sb
->s_dev
)
1888 ctf_integer(ino_t
, ino
, inode
->i_ino
)
1889 ctf_integer(ext4_lblk_t
, start
, start
)
1890 ctf_integer(ext4_lblk_t
, end
, end
)
1891 ctf_integer(int, depth
, depth
)
1892 ctf_integer(long long, partial
, partial
)
1893 ctf_integer(unsigned short, eh_entries
, le16_to_cpu(eh_entries
))
1899 LTTNG_TRACEPOINT_EVENT(ext4_ext_remove_space_done
,
1900 TP_PROTO(struct inode
*inode
, ext4_lblk_t start
, int depth
,
1901 ext4_lblk_t partial
, unsigned short eh_entries
),
1903 TP_ARGS(inode
, start
, depth
, partial
, eh_entries
),
1906 ctf_integer(dev_t
, dev
, inode
->i_sb
->s_dev
)
1907 ctf_integer(ino_t
, ino
, inode
->i_ino
)
1908 ctf_integer(ext4_lblk_t
, start
, start
)
1909 ctf_integer(int, depth
, depth
)
1910 ctf_integer(ext4_lblk_t
, partial
, partial
)
1911 ctf_integer(unsigned short, eh_entries
, eh_entries
)
1919 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0))
1921 LTTNG_TRACEPOINT_EVENT_CLASS(ext4__es_extent
,
1922 TP_PROTO(struct inode
*inode
, struct extent_status
*es
),
1927 ctf_integer(dev_t
, dev
, inode
->i_sb
->s_dev
)
1928 ctf_integer(ino_t
, ino
, inode
->i_ino
)
1929 ctf_integer(ext4_lblk_t
, lblk
, es
->es_lblk
)
1930 ctf_integer(ext4_lblk_t
, len
, es
->es_len
)
1931 ctf_integer(ext4_fsblk_t
, pblk
, ext4_es_pblock(es
))
1932 ctf_integer(char, status
, ext4_es_status(es
))
1936 LTTNG_TRACEPOINT_EVENT_INSTANCE(ext4__es_extent
, ext4_es_insert_extent
,
1937 TP_PROTO(struct inode
*inode
, struct extent_status
*es
),
1942 LTTNG_TRACEPOINT_EVENT_INSTANCE(ext4__es_extent
, ext4_es_cache_extent
,
1943 TP_PROTO(struct inode
*inode
, struct extent_status
*es
),
1948 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,11,0))
1950 LTTNG_TRACEPOINT_EVENT(ext4_es_insert_extent
,
1951 TP_PROTO(struct inode
*inode
, struct extent_status
*es
),
1956 ctf_integer(dev_t
, dev
, inode
->i_sb
->s_dev
)
1957 ctf_integer(ino_t
, ino
, inode
->i_ino
)
1958 ctf_integer(ext4_lblk_t
, lblk
, es
->es_lblk
)
1959 ctf_integer(ext4_lblk_t
, len
, es
->es_len
)
1960 ctf_integer(ext4_fsblk_t
, pblk
, ext4_es_pblock(es
))
1961 ctf_integer(char, status
, ext4_es_status(es
) >> 60)
1965 LTTNG_TRACEPOINT_EVENT(ext4_es_remove_extent
,
1966 TP_PROTO(struct inode
*inode
, ext4_lblk_t lblk
, ext4_lblk_t len
),
1968 TP_ARGS(inode
, lblk
, len
),
1971 ctf_integer(dev_t
, dev
, inode
->i_sb
->s_dev
)
1972 ctf_integer(ino_t
, ino
, inode
->i_ino
)
1973 ctf_integer(loff_t
, lblk
, lblk
)
1974 ctf_integer(loff_t
, len
, len
)
1978 LTTNG_TRACEPOINT_EVENT(ext4_es_find_delayed_extent_range_enter
,
1979 TP_PROTO(struct inode
*inode
, ext4_lblk_t lblk
),
1981 TP_ARGS(inode
, lblk
),
1984 ctf_integer(dev_t
, dev
, inode
->i_sb
->s_dev
)
1985 ctf_integer(ino_t
, ino
, inode
->i_ino
)
1986 ctf_integer(ext4_lblk_t
, lblk
, lblk
)
1990 LTTNG_TRACEPOINT_EVENT(ext4_es_find_delayed_extent_range_exit
,
1991 TP_PROTO(struct inode
*inode
, struct extent_status
*es
),
1996 ctf_integer(dev_t
, dev
, inode
->i_sb
->s_dev
)
1997 ctf_integer(ino_t
, ino
, inode
->i_ino
)
1998 ctf_integer(ext4_lblk_t
, lblk
, es
->es_lblk
)
1999 ctf_integer(ext4_lblk_t
, len
, es
->es_len
)
2000 ctf_integer(ext4_fsblk_t
, pblk
, ext4_es_pblock(es
))
2001 ctf_integer(char, status
, ext4_es_status(es
) >> 60)
2005 LTTNG_TRACEPOINT_EVENT(ext4_es_lookup_extent_enter
,
2006 TP_PROTO(struct inode
*inode
, ext4_lblk_t lblk
),
2008 TP_ARGS(inode
, lblk
),
2011 ctf_integer(dev_t
, dev
, inode
->i_sb
->s_dev
)
2012 ctf_integer(ino_t
, ino
, inode
->i_ino
)
2013 ctf_integer(ext4_lblk_t
, lblk
, lblk
)
2017 LTTNG_TRACEPOINT_EVENT(ext4_es_lookup_extent_exit
,
2018 TP_PROTO(struct inode
*inode
, struct extent_status
*es
,
2021 TP_ARGS(inode
, es
, found
),
2024 ctf_integer(dev_t
, dev
, inode
->i_sb
->s_dev
)
2025 ctf_integer(ino_t
, ino
, inode
->i_ino
)
2026 ctf_integer(ext4_lblk_t
, lblk
, es
->es_lblk
)
2027 ctf_integer(ext4_lblk_t
, len
, es
->es_len
)
2028 ctf_integer(ext4_fsblk_t
, pblk
, ext4_es_pblock(es
))
2029 ctf_integer(char, status
, ext4_es_status(es
) >> 60)
2030 ctf_integer(int, found
, found
)
2034 LTTNG_TRACEPOINT_EVENT(ext4_es_shrink_enter
,
2035 TP_PROTO(struct super_block
*sb
, int nr_to_scan
, int cache_cnt
),
2037 TP_ARGS(sb
, nr_to_scan
, cache_cnt
),
2040 ctf_integer(dev_t
, dev
, sb
->s_dev
)
2041 ctf_integer(int, nr_to_scan
, nr_to_scan
)
2042 ctf_integer(int, cache_cnt
, cache_cnt
)
2046 LTTNG_TRACEPOINT_EVENT(ext4_es_shrink_exit
,
2047 TP_PROTO(struct super_block
*sb
, int shrunk_nr
, int cache_cnt
),
2049 TP_ARGS(sb
, shrunk_nr
, cache_cnt
),
2052 ctf_integer(dev_t
, dev
, sb
->s_dev
)
2053 ctf_integer(int, shrunk_nr
, shrunk_nr
)
2054 ctf_integer(int, cache_cnt
, cache_cnt
)
2060 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,10,0))
2061 LTTNG_TRACEPOINT_EVENT(ext4_fc_replay_scan
,
2062 TP_PROTO(struct super_block
*sb
, int error
, int off
),
2064 TP_ARGS(sb
, error
, off
),
2067 ctf_integer(dev_t
, dev
, sb
->s_dev
)
2068 ctf_integer(int, error
, error
)
2069 ctf_integer(int, off
, off
)
2073 LTTNG_TRACEPOINT_EVENT(ext4_fc_replay
,
2074 TP_PROTO(struct super_block
*sb
, int tag
, int ino
, int priv1
, int priv2
),
2076 TP_ARGS(sb
, tag
, ino
, priv1
, priv2
),
2079 ctf_integer(dev_t
, dev
, sb
->s_dev
)
2080 ctf_integer(int, tag
, tag
)
2081 ctf_integer(int, ino
, ino
)
2082 ctf_integer(int, priv1
, priv1
)
2083 ctf_integer(int, priv2
, priv2
)
2088 #endif /* LTTNG_TRACE_EXT4_H */
2090 /* This part must be outside protection */
2091 #include <probes/define_trace.h>