fix: ext4: fast commit recovery path (v5.10)
[lttng-modules.git] / instrumentation / events / lttng-module / ext4.h
1 /* SPDX-License-Identifier: GPL-2.0 */
2 #undef TRACE_SYSTEM
3 #define TRACE_SYSTEM ext4
4
5 #if !defined(LTTNG_TRACE_EXT4_H) || defined(TRACE_HEADER_MULTI_READ)
6 #define LTTNG_TRACE_EXT4_H
7
8 #include <probes/lttng-tracepoint-event.h>
9 #include <linux/writeback.h>
10 #include <linux/version.h>
11
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;
18 struct mpage_da_data;
19 struct ext4_map_blocks;
20 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,2,0))
21 struct ext4_extent;
22 #endif
23 #endif
24
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
28 #else
29 #define TP_MODE_T umode_t
30 #endif
31
32 LTTNG_TRACEPOINT_EVENT(ext4_free_inode,
33 TP_PROTO(struct inode *inode),
34
35 TP_ARGS(inode),
36
37 TP_FIELDS(
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))
43 #else
44 ctf_integer(uid_t, uid, inode->i_uid)
45 ctf_integer(gid_t, gid, inode->i_gid)
46 #endif
47 ctf_integer(__u64, blocks, inode->i_blocks)
48 ctf_integer(TP_MODE_T, mode, inode->i_mode)
49 )
50 )
51
52 LTTNG_TRACEPOINT_EVENT(ext4_request_inode,
53 TP_PROTO(struct inode *dir, int mode),
54
55 TP_ARGS(dir, mode),
56
57 TP_FIELDS(
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)
61 )
62 )
63
64 LTTNG_TRACEPOINT_EVENT(ext4_allocate_inode,
65 TP_PROTO(struct inode *inode, struct inode *dir, int mode),
66
67 TP_ARGS(inode, dir, mode),
68
69 TP_FIELDS(
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)
74 )
75 )
76
77 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37))
78 LTTNG_TRACEPOINT_EVENT(ext4_evict_inode,
79 TP_PROTO(struct inode *inode),
80
81 TP_ARGS(inode),
82
83 TP_FIELDS(
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)
87 )
88 )
89
90 LTTNG_TRACEPOINT_EVENT(ext4_drop_inode,
91 TP_PROTO(struct inode *inode, int drop),
92
93 TP_ARGS(inode, drop),
94
95 TP_FIELDS(
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)
99 )
100 )
101
102 LTTNG_TRACEPOINT_EVENT(ext4_mark_inode_dirty,
103 TP_PROTO(struct inode *inode, unsigned long IP),
104
105 TP_ARGS(inode, IP),
106
107 TP_FIELDS(
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)
111 )
112 )
113
114 LTTNG_TRACEPOINT_EVENT(ext4_begin_ordered_truncate,
115 TP_PROTO(struct inode *inode, loff_t new_size),
116
117 TP_ARGS(inode, new_size),
118
119 TP_FIELDS(
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)
123 )
124 )
125 #endif
126
127 LTTNG_TRACEPOINT_EVENT_CLASS(ext4__write_begin,
128
129 TP_PROTO(struct inode *inode, loff_t pos, unsigned int len,
130 unsigned int flags),
131
132 TP_ARGS(inode, pos, len, flags),
133
134 TP_FIELDS(
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)
140 )
141 )
142
143 LTTNG_TRACEPOINT_EVENT_INSTANCE(ext4__write_begin, ext4_write_begin,
144
145 TP_PROTO(struct inode *inode, loff_t pos, unsigned int len,
146 unsigned int flags),
147
148 TP_ARGS(inode, pos, len, flags)
149 )
150
151 LTTNG_TRACEPOINT_EVENT_INSTANCE(ext4__write_begin, ext4_da_write_begin,
152
153 TP_PROTO(struct inode *inode, loff_t pos, unsigned int len,
154 unsigned int flags),
155
156 TP_ARGS(inode, pos, len, flags)
157 )
158
159 LTTNG_TRACEPOINT_EVENT_CLASS(ext4__write_end,
160 TP_PROTO(struct inode *inode, loff_t pos, unsigned int len,
161 unsigned int copied),
162
163 TP_ARGS(inode, pos, len, copied),
164
165 TP_FIELDS(
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)
171 )
172 )
173
174 LTTNG_TRACEPOINT_EVENT_INSTANCE(ext4__write_end, ext4_ordered_write_end,
175
176 TP_PROTO(struct inode *inode, loff_t pos, unsigned int len,
177 unsigned int copied),
178
179 TP_ARGS(inode, pos, len, copied)
180 )
181
182 LTTNG_TRACEPOINT_EVENT_INSTANCE(ext4__write_end, ext4_writeback_write_end,
183
184 TP_PROTO(struct inode *inode, loff_t pos, unsigned int len,
185 unsigned int copied),
186
187 TP_ARGS(inode, pos, len, copied)
188 )
189
190 LTTNG_TRACEPOINT_EVENT_INSTANCE(ext4__write_end, ext4_journalled_write_end,
191
192 TP_PROTO(struct inode *inode, loff_t pos, unsigned int len,
193 unsigned int copied),
194
195 TP_ARGS(inode, pos, len, copied)
196 )
197
198 LTTNG_TRACEPOINT_EVENT_INSTANCE(ext4__write_end, ext4_da_write_end,
199
200 TP_PROTO(struct inode *inode, loff_t pos, unsigned int len,
201 unsigned int copied),
202
203 TP_ARGS(inode, pos, len, copied)
204 )
205
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),
209
210 TP_ARGS(inode, page),
211
212 TP_FIELDS(
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)
216 )
217 )
218 #endif
219
220 LTTNG_TRACEPOINT_EVENT(ext4_da_writepages,
221 TP_PROTO(struct inode *inode, struct writeback_control *wbc),
222
223 TP_ARGS(inode, wbc),
224
225 TP_FIELDS(
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)
235 #endif
236 #if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,37))
237 ctf_integer(char, nonblocking, wbc->nonblocking)
238 #endif
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)
242 #endif
243 ctf_integer(char, range_cyclic, wbc->range_cyclic)
244 )
245 )
246
247 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,11,0))
248
249 LTTNG_TRACEPOINT_EVENT(ext4_da_write_pages,
250 TP_PROTO(struct inode *inode, pgoff_t first_page,
251 struct writeback_control *wbc),
252
253 TP_ARGS(inode, first_page, wbc),
254
255 TP_FIELDS(
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)
261 )
262 )
263
264 #else
265
266 LTTNG_TRACEPOINT_EVENT(ext4_da_write_pages,
267 TP_PROTO(struct inode *inode, struct mpage_da_data *mpd),
268
269 TP_ARGS(inode, mpd),
270
271 TP_FIELDS(
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)
282 #endif
283 )
284 )
285
286 #endif
287
288 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,11,0))
289
290 LTTNG_TRACEPOINT_EVENT(ext4_da_write_pages_extent,
291 TP_PROTO(struct inode *inode, struct ext4_map_blocks *map),
292
293 TP_ARGS(inode, map),
294
295 TP_FIELDS(
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)
301 )
302 )
303
304 #endif
305
306 LTTNG_TRACEPOINT_EVENT(ext4_da_writepages_result,
307 TP_PROTO(struct inode *inode, struct writeback_control *wbc,
308 int ret, int pages_written),
309
310 TP_ARGS(inode, wbc, ret, pages_written),
311
312 TP_FIELDS(
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)
321 #endif
322 #if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,33))
323 ctf_integer(char, encountered_congestion, wbc->encountered_congestion)
324 #endif
325 #if (LINUX_VERSION_CODE < KERNEL_VERSION(3,1,0))
326 ctf_integer(char, more_io, wbc->more_io)
327 #endif
328 #if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,35))
329 ctf_integer(char, no_nrwrite_index_update, wbc->no_nrwrite_index_update)
330 #endif
331 )
332 )
333
334 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,39))
335 LTTNG_TRACEPOINT_EVENT_CLASS(ext4__page_op,
336 TP_PROTO(struct page *page),
337
338 TP_ARGS(page),
339
340 TP_FIELDS(
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)
344 )
345 )
346
347 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,40))
348 LTTNG_TRACEPOINT_EVENT_INSTANCE(ext4__page_op, ext4_writepage,
349
350 TP_PROTO(struct page *page),
351
352 TP_ARGS(page)
353 )
354 #endif
355
356 LTTNG_TRACEPOINT_EVENT_INSTANCE(ext4__page_op, ext4_readpage,
357
358 TP_PROTO(struct page *page),
359
360 TP_ARGS(page)
361 )
362
363 LTTNG_TRACEPOINT_EVENT_INSTANCE(ext4__page_op, ext4_releasepage,
364
365 TP_PROTO(struct page *page),
366
367 TP_ARGS(page)
368 )
369
370 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,11,0))
371
372 LTTNG_TRACEPOINT_EVENT_CLASS(ext4_invalidatepage_op,
373 TP_PROTO(struct page *page, unsigned int offset, unsigned int length),
374
375 TP_ARGS(page, offset, length),
376
377 TP_FIELDS(
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)
383 )
384 )
385
386 LTTNG_TRACEPOINT_EVENT_INSTANCE(ext4_invalidatepage_op, ext4_invalidatepage,
387 TP_PROTO(struct page *page, unsigned int offset, unsigned int length),
388
389 TP_ARGS(page, offset, length)
390 )
391
392 LTTNG_TRACEPOINT_EVENT_INSTANCE(ext4_invalidatepage_op, ext4_journalled_invalidatepage,
393 TP_PROTO(struct page *page, unsigned int offset, unsigned int length),
394
395 TP_ARGS(page, offset, length)
396 )
397
398 #else
399
400 LTTNG_TRACEPOINT_EVENT(ext4_invalidatepage,
401 TP_PROTO(struct page *page, unsigned long offset),
402
403 TP_ARGS(page, offset),
404
405 TP_FIELDS(
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)
410
411 )
412 )
413
414 #endif
415
416 #endif
417
418 LTTNG_TRACEPOINT_EVENT(ext4_discard_blocks,
419 TP_PROTO(struct super_block *sb, unsigned long long blk,
420 unsigned long long count),
421
422 TP_ARGS(sb, blk, count),
423
424 TP_FIELDS(
425 ctf_integer(dev_t, dev, sb->s_dev)
426 ctf_integer(__u64, blk, blk)
427 ctf_integer(__u64, count, count)
428 )
429 )
430
431 LTTNG_TRACEPOINT_EVENT_CLASS(ext4__mb_new_pa,
432 TP_PROTO(struct ext4_allocation_context *ac,
433 struct ext4_prealloc_space *pa),
434
435 TP_ARGS(ac, pa),
436
437 TP_FIELDS(
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)
443 )
444 )
445
446 LTTNG_TRACEPOINT_EVENT_INSTANCE(ext4__mb_new_pa, ext4_mb_new_inode_pa,
447
448 TP_PROTO(struct ext4_allocation_context *ac,
449 struct ext4_prealloc_space *pa),
450
451 TP_ARGS(ac, pa)
452 )
453
454 LTTNG_TRACEPOINT_EVENT_INSTANCE(ext4__mb_new_pa, ext4_mb_new_group_pa,
455
456 TP_PROTO(struct ext4_allocation_context *ac,
457 struct ext4_prealloc_space *pa),
458
459 TP_ARGS(ac, pa)
460 )
461
462 LTTNG_TRACEPOINT_EVENT(ext4_mb_release_inode_pa,
463 TP_PROTO(
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,
467 struct inode *inode,
468 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36))
469 struct super_block *sb,
470 struct ext4_allocation_context *ac,
471 #else
472 struct ext4_allocation_context *ac,
473 #endif
474 #endif
475 struct ext4_prealloc_space *pa,
476 unsigned long long block, unsigned int count),
477
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),
484 #else
485 TP_ARGS(ac, pa, block, count),
486 #endif
487
488 TP_FIELDS(
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)
492 #else
493 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36))
494 ctf_integer(dev_t, dev, sb->s_dev)
495 #else
496 ctf_integer(dev_t, dev, ac->ac_sb->s_dev)
497 #endif
498 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37))
499 ctf_integer(ino_t, ino, inode->i_ino)
500 #else
501 ctf_integer(ino_t, ino,
502 (ac && ac->ac_inode) ? ac->ac_inode->i_ino : 0)
503 #endif
504 #endif
505 ctf_integer(__u64, block, block)
506 ctf_integer(__u32, count, count)
507 )
508 )
509
510 LTTNG_TRACEPOINT_EVENT(ext4_mb_release_group_pa,
511
512 #if (LTTNG_KERNEL_RANGE(2,6,40, 3,3,0))
513 TP_PROTO(struct ext4_prealloc_space *pa),
514
515 TP_ARGS(pa),
516 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37))
517 TP_PROTO(struct super_block *sb, struct ext4_prealloc_space *pa),
518
519 TP_ARGS(sb, 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),
524
525 TP_ARGS(sb, ac, pa),
526 #else
527 TP_PROTO(struct ext4_allocation_context *ac,
528 struct ext4_prealloc_space *pa),
529
530 TP_ARGS(ac, pa),
531 #endif
532
533 TP_FIELDS(
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)
538 #else
539 ctf_integer(dev_t, dev, ac->ac_sb->s_dev)
540 #endif
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)
544 #endif
545 ctf_integer(__u64, pa_pstart, pa->pa_pstart)
546 ctf_integer(__u32, pa_len, pa->pa_len)
547 )
548 )
549
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),
554
555 TP_ARGS(inode, len, needed),
556
557 TP_FIELDS(
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)
562 )
563 )
564 #else
565 LTTNG_TRACEPOINT_EVENT(ext4_discard_preallocations,
566 TP_PROTO(struct inode *inode),
567
568 TP_ARGS(inode),
569
570 TP_FIELDS(
571 ctf_integer(dev_t, dev, inode->i_sb->s_dev)
572 ctf_integer(ino_t, ino, inode->i_ino)
573 )
574 )
575 #endif
576
577 LTTNG_TRACEPOINT_EVENT(ext4_mb_discard_preallocations,
578 TP_PROTO(struct super_block *sb, int needed),
579
580 TP_ARGS(sb, needed),
581
582 TP_FIELDS(
583 ctf_integer(dev_t, dev, sb->s_dev)
584 ctf_integer(int, needed, needed)
585 )
586 )
587
588 LTTNG_TRACEPOINT_EVENT(ext4_request_blocks,
589 TP_PROTO(struct ext4_allocation_request *ar),
590
591 TP_ARGS(ar),
592
593 TP_FIELDS(
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)
604 )
605 )
606
607 LTTNG_TRACEPOINT_EVENT(ext4_allocate_blocks,
608 TP_PROTO(struct ext4_allocation_request *ar, unsigned long long block),
609
610 TP_ARGS(ar, block),
611
612 TP_FIELDS(
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)
624 )
625 )
626
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,
630 int flags),
631
632 TP_ARGS(inode, block, count, flags),
633 #else
634 TP_PROTO(struct inode *inode, __u64 block, unsigned long count,
635 int metadata),
636
637 TP_ARGS(inode, block, count, metadata),
638 #endif
639
640 TP_FIELDS(
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)
648 #else
649 ctf_integer(int, metadata, metadata)
650 #endif
651 )
652 )
653
654 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,39))
655 LTTNG_TRACEPOINT_EVENT(ext4_sync_file_enter,
656 #else
657 LTTNG_TRACEPOINT_EVENT(ext4_sync_file,
658 #endif
659 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35))
660 TP_PROTO(struct file *file, int datasync),
661
662 TP_ARGS(file, datasync),
663 #else
664 TP_PROTO(struct file *file, struct dentry *dentry, int datasync),
665
666 TP_ARGS(file, dentry, datasync),
667 #endif
668
669 TP_FIELDS(
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)
674 #else
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)
678 #endif
679 ctf_integer(int, datasync, datasync)
680 )
681 )
682
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),
686
687 TP_ARGS(inode, ret),
688
689 TP_FIELDS(
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)
693 )
694 )
695 #endif
696
697 LTTNG_TRACEPOINT_EVENT(ext4_sync_fs,
698 TP_PROTO(struct super_block *sb, int wait),
699
700 TP_ARGS(sb, wait),
701
702 TP_FIELDS(
703 ctf_integer(dev_t, dev, sb->s_dev)
704 ctf_integer(int, wait, wait)
705
706 )
707 )
708
709 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,13,0))
710 LTTNG_TRACEPOINT_EVENT(ext4_alloc_da_blocks,
711 TP_PROTO(struct inode *inode),
712
713 TP_ARGS(inode),
714
715 TP_FIELDS(
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)
719 )
720 )
721 #else
722 LTTNG_TRACEPOINT_EVENT(ext4_alloc_da_blocks,
723 TP_PROTO(struct inode *inode),
724
725 TP_ARGS(inode),
726
727 TP_FIELDS(
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)
732 )
733 )
734 #endif
735
736 LTTNG_TRACEPOINT_EVENT(ext4_mballoc_alloc,
737 TP_PROTO(struct ext4_allocation_context *ac),
738
739 TP_ARGS(ac),
740
741 TP_FIELDS(
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)
762 )
763 )
764
765 LTTNG_TRACEPOINT_EVENT(ext4_mballoc_prealloc,
766 TP_PROTO(struct ext4_allocation_context *ac),
767
768 TP_ARGS(ac),
769
770 TP_FIELDS(
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)
781 )
782 )
783
784 LTTNG_TRACEPOINT_EVENT_CLASS(ext4__mballoc,
785 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37))
786 TP_PROTO(struct super_block *sb,
787 struct inode *inode,
788 ext4_group_t group,
789 ext4_grpblk_t start,
790 ext4_grpblk_t len),
791
792 TP_ARGS(sb, inode, group, start, len),
793 #else
794 TP_PROTO(struct ext4_allocation_context *ac),
795
796 TP_ARGS(ac),
797 #endif
798
799 TP_FIELDS(
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)
806 #else
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)
813 #endif
814 )
815 )
816
817 LTTNG_TRACEPOINT_EVENT_INSTANCE(ext4__mballoc, ext4_mballoc_discard,
818
819 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37))
820 TP_PROTO(struct super_block *sb,
821 struct inode *inode,
822 ext4_group_t group,
823 ext4_grpblk_t start,
824 ext4_grpblk_t len),
825
826 TP_ARGS(sb, inode, group, start, len)
827 #else
828 TP_PROTO(struct ext4_allocation_context *ac),
829
830 TP_ARGS(ac)
831 #endif
832 )
833
834 LTTNG_TRACEPOINT_EVENT_INSTANCE(ext4__mballoc, ext4_mballoc_free,
835
836 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37))
837 TP_PROTO(struct super_block *sb,
838 struct inode *inode,
839 ext4_group_t group,
840 ext4_grpblk_t start,
841 ext4_grpblk_t len),
842
843 TP_ARGS(sb, inode, group, start, len)
844 #else
845 TP_PROTO(struct ext4_allocation_context *ac),
846
847 TP_ARGS(ac)
848 #endif
849 )
850
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),
854
855 TP_ARGS(inode, is_metadata, block),
856
857 TP_FIELDS(
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)
863 )
864 )
865 #endif
866
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),
870
871 TP_ARGS(inode, used_blocks, quota_claim),
872
873 TP_FIELDS(
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)
882 )
883 )
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),
887
888 TP_ARGS(inode, used_blocks, quota_claim),
889
890 TP_FIELDS(
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)
903 )
904 )
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),
908
909 TP_ARGS(inode, used_blocks),
910
911 TP_FIELDS(
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)
923 )
924 )
925 #endif
926
927 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,13,0))
928 LTTNG_TRACEPOINT_EVENT(ext4_da_reserve_space,
929 TP_PROTO(struct inode *inode),
930
931 TP_ARGS(inode),
932
933 TP_FIELDS(
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)
940 )
941 )
942 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,2,0))
943 LTTNG_TRACEPOINT_EVENT(ext4_da_reserve_space,
944 TP_PROTO(struct inode *inode),
945
946 TP_ARGS(inode),
947
948 TP_FIELDS(
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)
957 )
958 )
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),
962
963 TP_ARGS(inode, md_needed),
964
965 TP_FIELDS(
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)
975 )
976 )
977 #endif
978
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),
982
983 TP_ARGS(inode, freed_blocks),
984
985 TP_FIELDS(
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)
993 )
994 )
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),
998
999 TP_ARGS(inode, freed_blocks),
1000
1001 TP_FIELDS(
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)
1013 )
1014 )
1015 #endif
1016
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),
1020
1021 TP_ARGS(sb, group),
1022
1023 TP_FIELDS(
1024 ctf_integer(dev_t, dev, sb->s_dev)
1025 ctf_integer(__u32, group, group)
1026 )
1027 )
1028
1029 LTTNG_TRACEPOINT_EVENT_INSTANCE(ext4__bitmap_load, ext4_mb_bitmap_load,
1030
1031 TP_PROTO(struct super_block *sb, unsigned long group),
1032
1033 TP_ARGS(sb, group)
1034 )
1035
1036 LTTNG_TRACEPOINT_EVENT_INSTANCE(ext4__bitmap_load, ext4_mb_buddy_bitmap_load,
1037
1038 TP_PROTO(struct super_block *sb, unsigned long group),
1039
1040 TP_ARGS(sb, group)
1041 )
1042 #endif
1043
1044 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,39))
1045
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),
1049
1050 TP_ARGS(sb, group, prefetch),
1051
1052 TP_FIELDS(
1053 ctf_integer(dev_t, dev, sb->s_dev)
1054 ctf_integer(__u32, group, group)
1055 ctf_integer(bool, prefetch, prefetch)
1056 )
1057 )
1058 #else
1059 LTTNG_TRACEPOINT_EVENT_INSTANCE(ext4__bitmap_load, ext4_read_block_bitmap_load,
1060
1061 TP_PROTO(struct super_block *sb, unsigned long group),
1062
1063 TP_ARGS(sb, group)
1064 )
1065 #endif
1066
1067 LTTNG_TRACEPOINT_EVENT_INSTANCE(ext4__bitmap_load, ext4_load_inode_bitmap,
1068
1069 TP_PROTO(struct super_block *sb, unsigned long group),
1070
1071 TP_ARGS(sb, group)
1072 )
1073
1074 LTTNG_TRACEPOINT_EVENT(ext4_direct_IO_enter,
1075 TP_PROTO(struct inode *inode, loff_t offset, unsigned long len, int rw),
1076
1077 TP_ARGS(inode, offset, len, rw),
1078
1079 TP_FIELDS(
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)
1085 )
1086 )
1087
1088 LTTNG_TRACEPOINT_EVENT(ext4_direct_IO_exit,
1089 TP_PROTO(struct inode *inode, loff_t offset, unsigned long len,
1090 int rw, int ret),
1091
1092 TP_ARGS(inode, offset, len, rw, ret),
1093
1094 TP_FIELDS(
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)
1101 )
1102 )
1103
1104 LTTNG_TRACEPOINT_EVENT(ext4_fallocate_exit,
1105 TP_PROTO(struct inode *inode, loff_t offset,
1106 unsigned int max_blocks, int ret),
1107
1108 TP_ARGS(inode, offset, max_blocks, ret),
1109
1110 TP_FIELDS(
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)
1116 )
1117 )
1118
1119 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,15,0))
1120
1121 LTTNG_TRACEPOINT_EVENT_CLASS(ext4__fallocate_mode,
1122 TP_PROTO(struct inode *inode, loff_t offset, loff_t len, int mode),
1123
1124 TP_ARGS(inode, offset, len, mode),
1125
1126 TP_FIELDS(
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)
1132 )
1133 )
1134
1135 LTTNG_TRACEPOINT_EVENT_INSTANCE(ext4__fallocate_mode, ext4_fallocate_enter,
1136
1137 TP_PROTO(struct inode *inode, loff_t offset, loff_t len, int mode),
1138
1139 TP_ARGS(inode, offset, len, mode)
1140 )
1141
1142 LTTNG_TRACEPOINT_EVENT_INSTANCE(ext4__fallocate_mode, ext4_punch_hole,
1143
1144 TP_PROTO(struct inode *inode, loff_t offset, loff_t len, int mode),
1145
1146 TP_ARGS(inode, offset, len, mode)
1147 )
1148
1149 LTTNG_TRACEPOINT_EVENT_INSTANCE(ext4__fallocate_mode, ext4_zero_range,
1150
1151 TP_PROTO(struct inode *inode, loff_t offset, loff_t len, int mode),
1152
1153 TP_ARGS(inode, offset, len, mode)
1154 )
1155
1156 #else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,15,0)) */
1157
1158 LTTNG_TRACEPOINT_EVENT(ext4_fallocate_enter,
1159 TP_PROTO(struct inode *inode, loff_t offset, loff_t len, int mode),
1160
1161 TP_ARGS(inode, offset, len, mode),
1162
1163 TP_FIELDS(
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)
1169 )
1170 )
1171
1172 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,11,0))
1173
1174 LTTNG_TRACEPOINT_EVENT(ext4_punch_hole,
1175 TP_PROTO(struct inode *inode, loff_t offset, loff_t len),
1176
1177 TP_ARGS(inode, offset, len),
1178
1179 TP_FIELDS(
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)
1184 )
1185 )
1186
1187 #endif /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,11,0)) */
1188
1189 #endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,15,0)) */
1190
1191 LTTNG_TRACEPOINT_EVENT(ext4_unlink_enter,
1192 TP_PROTO(struct inode *parent, struct dentry *dentry),
1193
1194 TP_ARGS(parent, dentry),
1195
1196 TP_FIELDS(
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)
1201 )
1202 )
1203
1204 LTTNG_TRACEPOINT_EVENT(ext4_unlink_exit,
1205 TP_PROTO(struct dentry *dentry, int ret),
1206
1207 TP_ARGS(dentry, ret),
1208
1209 TP_FIELDS(
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)
1213 )
1214 )
1215
1216 LTTNG_TRACEPOINT_EVENT_CLASS(ext4__truncate,
1217 TP_PROTO(struct inode *inode),
1218
1219 TP_ARGS(inode),
1220
1221 TP_FIELDS(
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)
1225 )
1226 )
1227
1228 LTTNG_TRACEPOINT_EVENT_INSTANCE(ext4__truncate, ext4_truncate_enter,
1229
1230 TP_PROTO(struct inode *inode),
1231
1232 TP_ARGS(inode)
1233 )
1234
1235 LTTNG_TRACEPOINT_EVENT_INSTANCE(ext4__truncate, ext4_truncate_exit,
1236
1237 TP_PROTO(struct inode *inode),
1238
1239 TP_ARGS(inode)
1240 )
1241
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),
1247
1248 TP_ARGS(inode, map, ux),
1249
1250 TP_FIELDS(
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))
1258 )
1259 )
1260
1261 /*
1262 * 'ux' is the uninitialized extent.
1263 * 'ix' is the initialized extent to which blocks are transferred.
1264 */
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),
1268
1269 TP_ARGS(inode, map, ux, ix),
1270
1271 TP_FIELDS(
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))
1282 )
1283 )
1284 #endif
1285
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),
1289
1290 TP_ARGS(inode, lblk, len, flags),
1291
1292 TP_FIELDS(
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)
1298 )
1299 )
1300
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),
1304
1305 TP_ARGS(inode, lblk, len, flags)
1306 )
1307
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),
1311
1312 TP_ARGS(inode, lblk, len, flags)
1313 )
1314
1315 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,11,0))
1316
1317 LTTNG_TRACEPOINT_EVENT_CLASS(ext4__map_blocks_exit,
1318 TP_PROTO(struct inode *inode, unsigned flags, struct ext4_map_blocks *map,
1319 int ret),
1320
1321 TP_ARGS(inode, flags, map, ret),
1322
1323 TP_FIELDS(
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)
1332 )
1333 )
1334
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),
1338
1339 TP_ARGS(inode, flags, map, ret)
1340 )
1341
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),
1345
1346 TP_ARGS(inode, flags, map, ret)
1347 )
1348
1349 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,8,0))
1350
1351 LTTNG_TRACEPOINT_EVENT_CLASS(ext4__map_blocks_exit,
1352 TP_PROTO(struct inode *inode, struct ext4_map_blocks *map, int ret),
1353
1354 TP_ARGS(inode, map, ret),
1355
1356 TP_FIELDS(
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)
1364 )
1365 )
1366
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),
1369
1370 TP_ARGS(inode, map, ret)
1371 )
1372
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),
1375
1376 TP_ARGS(inode, map, ret)
1377 )
1378
1379 #else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,8,0)) */
1380
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),
1384
1385 TP_ARGS(inode, lblk, pblk, len, ret),
1386
1387 TP_FIELDS(
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)
1394 )
1395 )
1396
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),
1400
1401 TP_ARGS(inode, lblk, pblk, len, ret)
1402 )
1403
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),
1407
1408 TP_ARGS(inode, lblk, pblk, len, ret)
1409 )
1410
1411 #endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,8,0)) */
1412
1413 LTTNG_TRACEPOINT_EVENT(ext4_ext_load_extent,
1414 TP_PROTO(struct inode *inode, ext4_lblk_t lblk, ext4_fsblk_t pblk),
1415
1416 TP_ARGS(inode, lblk, pblk),
1417
1418 TP_FIELDS(
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)
1423 )
1424 )
1425
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),
1429
1430 TP_ARGS(sb, ino),
1431
1432 TP_FIELDS(
1433 ctf_integer(dev_t, dev, sb->s_dev)
1434 ctf_integer(ino_t, ino, ino)
1435 )
1436 )
1437 #else
1438 LTTNG_TRACEPOINT_EVENT(ext4_load_inode,
1439 TP_PROTO(struct inode *inode),
1440
1441 TP_ARGS(inode),
1442
1443 TP_FIELDS(
1444 ctf_integer(dev_t, dev, inode->i_sb->s_dev)
1445 ctf_integer(ino_t, ino, inode->i_ino)
1446 )
1447 )
1448 #endif
1449
1450 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,5,0))
1451
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),
1455
1456 TP_ARGS(sb, blocks, rsv_blocks, revoke_creds, IP),
1457
1458 TP_FIELDS(
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)
1464 )
1465 )
1466
1467 LTTNG_TRACEPOINT_EVENT(ext4_journal_start_reserved,
1468 TP_PROTO(struct super_block *sb, int blocks, unsigned long IP),
1469
1470 TP_ARGS(sb, blocks, IP),
1471
1472 TP_FIELDS(
1473 ctf_integer(dev_t, dev, sb->s_dev)
1474 ctf_integer(unsigned long, ip, IP)
1475 ctf_integer(int, blocks, blocks)
1476 )
1477 )
1478
1479 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,11,0))
1480
1481 LTTNG_TRACEPOINT_EVENT(ext4_journal_start,
1482 TP_PROTO(struct super_block *sb, int blocks, int rsv_blocks,
1483 unsigned long IP),
1484
1485 TP_ARGS(sb, blocks, rsv_blocks, IP),
1486
1487 TP_FIELDS(
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)
1492 )
1493 )
1494
1495 LTTNG_TRACEPOINT_EVENT(ext4_journal_start_reserved,
1496 TP_PROTO(struct super_block *sb, int blocks, unsigned long IP),
1497
1498 TP_ARGS(sb, blocks, IP),
1499
1500 TP_FIELDS(
1501 ctf_integer(dev_t, dev, sb->s_dev)
1502 ctf_integer(unsigned long, ip, IP)
1503 ctf_integer(int, blocks, blocks)
1504 )
1505 )
1506
1507 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,1,0))
1508
1509 LTTNG_TRACEPOINT_EVENT(ext4_journal_start,
1510 TP_PROTO(struct super_block *sb, int nblocks, unsigned long IP),
1511
1512 TP_ARGS(sb, nblocks, IP),
1513
1514 TP_FIELDS(
1515 ctf_integer(dev_t, dev, sb->s_dev)
1516 ctf_integer(unsigned long, ip, IP)
1517 ctf_integer(int, nblocks, nblocks)
1518 )
1519 )
1520
1521 LTTNG_TRACEPOINT_EVENT_CLASS(ext4__trim,
1522 TP_PROTO(struct super_block *sb,
1523 ext4_group_t group,
1524 ext4_grpblk_t start,
1525 ext4_grpblk_t len),
1526
1527 TP_ARGS(sb, group, start, len),
1528
1529 TP_FIELDS(
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)
1535 )
1536 )
1537
1538 LTTNG_TRACEPOINT_EVENT_INSTANCE(ext4__trim, ext4_trim_extent,
1539
1540 TP_PROTO(struct super_block *sb,
1541 ext4_group_t group,
1542 ext4_grpblk_t start,
1543 ext4_grpblk_t len),
1544
1545 TP_ARGS(sb, group, start, len)
1546 )
1547
1548 LTTNG_TRACEPOINT_EVENT_INSTANCE(ext4__trim, ext4_trim_all_free,
1549
1550 TP_PROTO(struct super_block *sb,
1551 ext4_group_t group,
1552 ext4_grpblk_t start,
1553 ext4_grpblk_t len),
1554
1555 TP_ARGS(sb, group, start, len)
1556 )
1557 #endif
1558
1559 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,2,0))
1560
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),
1565
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),
1570
1571 TP_ARGS(inode, map, allocated, newblock),
1572 #endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,8,0)) */
1573
1574 TP_FIELDS(
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)
1587 )
1588 )
1589
1590 LTTNG_TRACEPOINT_EVENT(ext4_get_implied_cluster_alloc_exit,
1591 TP_PROTO(struct super_block *sb, struct ext4_map_blocks *map, int ret),
1592
1593 TP_ARGS(sb, map, ret),
1594
1595 TP_FIELDS(
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)
1602 )
1603 )
1604
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),
1608
1609 TP_ARGS(inode, lblk, len, start),
1610
1611 TP_FIELDS(
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)
1617 )
1618 )
1619
1620 LTTNG_TRACEPOINT_EVENT(ext4_ext_in_cache,
1621 TP_PROTO(struct inode *inode, ext4_lblk_t lblk, int ret),
1622
1623 TP_ARGS(inode, lblk, ret),
1624
1625 TP_FIELDS(
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)
1630 )
1631 )
1632
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),
1636
1637 TP_ARGS(inode, from, to, reverse, found, found_blk),
1638
1639 TP_FIELDS(
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)
1647 )
1648 )
1649
1650 LTTNG_TRACEPOINT_EVENT(ext4_get_reserved_cluster_alloc,
1651 TP_PROTO(struct inode *inode, ext4_lblk_t lblk, unsigned int len),
1652
1653 TP_ARGS(inode, lblk, len),
1654
1655 TP_FIELDS(
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)
1660 )
1661 )
1662
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),
1666
1667 TP_ARGS(inode, lblk, pblk, len),
1668
1669 TP_FIELDS(
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)
1675 )
1676 )
1677
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))
1680
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),
1685
1686 TP_ARGS(inode, ex, from, to, pc),
1687
1688 TP_FIELDS(
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)
1699 )
1700 )
1701
1702 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,11,0))
1703
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),
1708
1709 TP_ARGS(inode, ex, from, to, partial_cluster),
1710
1711 TP_FIELDS(
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))
1720 )
1721 )
1722
1723 #else
1724
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),
1729
1730 TP_ARGS(inode, ex, from, to, partial_cluster),
1731
1732 TP_FIELDS(
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))
1741 )
1742 )
1743
1744 #endif
1745
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))
1748
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),
1753
1754 TP_ARGS(inode, start, ex, pc),
1755
1756 TP_FIELDS(
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)
1766 )
1767 )
1768
1769 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,11,0))
1770
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),
1775
1776 TP_ARGS(inode, start, ex, partial_cluster),
1777
1778 TP_FIELDS(
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))
1786 )
1787 )
1788
1789 #else
1790
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),
1794
1795 TP_ARGS(inode, start, ex, partial_cluster),
1796
1797 TP_FIELDS(
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))
1805 )
1806 )
1807
1808 #endif
1809
1810 LTTNG_TRACEPOINT_EVENT(ext4_ext_rm_idx,
1811 TP_PROTO(struct inode *inode, ext4_fsblk_t pblk),
1812
1813 TP_ARGS(inode, pblk),
1814
1815 TP_FIELDS(
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)
1819 )
1820 )
1821
1822 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,11,0))
1823
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),
1827
1828 TP_ARGS(inode, start, end, depth),
1829
1830 TP_FIELDS(
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)
1836 )
1837 )
1838
1839 #else
1840
1841 LTTNG_TRACEPOINT_EVENT(ext4_ext_remove_space,
1842 TP_PROTO(struct inode *inode, ext4_lblk_t start, int depth),
1843
1844 TP_ARGS(inode, start, depth),
1845
1846 TP_FIELDS(
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)
1851 )
1852 )
1853
1854 #endif
1855
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))
1858
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),
1862
1863 TP_ARGS(inode, start, end, depth, pc, eh_entries),
1864
1865 TP_FIELDS(
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)
1875 )
1876 )
1877
1878 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,11,0))
1879
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),
1883
1884 TP_ARGS(inode, start, end, depth, partial, eh_entries),
1885
1886 TP_FIELDS(
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))
1894 )
1895 )
1896
1897 #else
1898
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),
1902
1903 TP_ARGS(inode, start, depth, partial, eh_entries),
1904
1905 TP_FIELDS(
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)
1912 )
1913 )
1914
1915 #endif
1916
1917 #endif
1918
1919 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0))
1920
1921 LTTNG_TRACEPOINT_EVENT_CLASS(ext4__es_extent,
1922 TP_PROTO(struct inode *inode, struct extent_status *es),
1923
1924 TP_ARGS(inode, es),
1925
1926 TP_FIELDS(
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))
1933 )
1934 )
1935
1936 LTTNG_TRACEPOINT_EVENT_INSTANCE(ext4__es_extent, ext4_es_insert_extent,
1937 TP_PROTO(struct inode *inode, struct extent_status *es),
1938
1939 TP_ARGS(inode, es)
1940 )
1941
1942 LTTNG_TRACEPOINT_EVENT_INSTANCE(ext4__es_extent, ext4_es_cache_extent,
1943 TP_PROTO(struct inode *inode, struct extent_status *es),
1944
1945 TP_ARGS(inode, es)
1946 )
1947
1948 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,11,0))
1949
1950 LTTNG_TRACEPOINT_EVENT(ext4_es_insert_extent,
1951 TP_PROTO(struct inode *inode, struct extent_status *es),
1952
1953 TP_ARGS(inode, es),
1954
1955 TP_FIELDS(
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)
1962 )
1963 )
1964
1965 LTTNG_TRACEPOINT_EVENT(ext4_es_remove_extent,
1966 TP_PROTO(struct inode *inode, ext4_lblk_t lblk, ext4_lblk_t len),
1967
1968 TP_ARGS(inode, lblk, len),
1969
1970 TP_FIELDS(
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)
1975 )
1976 )
1977
1978 LTTNG_TRACEPOINT_EVENT(ext4_es_find_delayed_extent_range_enter,
1979 TP_PROTO(struct inode *inode, ext4_lblk_t lblk),
1980
1981 TP_ARGS(inode, lblk),
1982
1983 TP_FIELDS(
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)
1987 )
1988 )
1989
1990 LTTNG_TRACEPOINT_EVENT(ext4_es_find_delayed_extent_range_exit,
1991 TP_PROTO(struct inode *inode, struct extent_status *es),
1992
1993 TP_ARGS(inode, es),
1994
1995 TP_FIELDS(
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)
2002 )
2003 )
2004
2005 LTTNG_TRACEPOINT_EVENT(ext4_es_lookup_extent_enter,
2006 TP_PROTO(struct inode *inode, ext4_lblk_t lblk),
2007
2008 TP_ARGS(inode, lblk),
2009
2010 TP_FIELDS(
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)
2014 )
2015 )
2016
2017 LTTNG_TRACEPOINT_EVENT(ext4_es_lookup_extent_exit,
2018 TP_PROTO(struct inode *inode, struct extent_status *es,
2019 int found),
2020
2021 TP_ARGS(inode, es, found),
2022
2023 TP_FIELDS(
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)
2031 )
2032 )
2033
2034 LTTNG_TRACEPOINT_EVENT(ext4_es_shrink_enter,
2035 TP_PROTO(struct super_block *sb, int nr_to_scan, int cache_cnt),
2036
2037 TP_ARGS(sb, nr_to_scan, cache_cnt),
2038
2039 TP_FIELDS(
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)
2043 )
2044 )
2045
2046 LTTNG_TRACEPOINT_EVENT(ext4_es_shrink_exit,
2047 TP_PROTO(struct super_block *sb, int shrunk_nr, int cache_cnt),
2048
2049 TP_ARGS(sb, shrunk_nr, cache_cnt),
2050
2051 TP_FIELDS(
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)
2055 )
2056 )
2057
2058 #endif
2059
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),
2063
2064 TP_ARGS(sb, error, off),
2065
2066 TP_FIELDS(
2067 ctf_integer(dev_t, dev, sb->s_dev)
2068 ctf_integer(int, error, error)
2069 ctf_integer(int, off, off)
2070 )
2071 )
2072
2073 LTTNG_TRACEPOINT_EVENT(ext4_fc_replay,
2074 TP_PROTO(struct super_block *sb, int tag, int ino, int priv1, int priv2),
2075
2076 TP_ARGS(sb, tag, ino, priv1, priv2),
2077
2078 TP_FIELDS(
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)
2084 )
2085 )
2086 #endif
2087
2088 #endif /* LTTNG_TRACE_EXT4_H */
2089
2090 /* This part must be outside protection */
2091 #include <probes/define_trace.h>
This page took 0.07854 seconds and 4 git commands to generate.