fix: ext4: limit the length of per-inode prealloc list (v5.9)
[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 LTTNG_TRACEPOINT_EVENT(ext4_evict_inode,
78 TP_PROTO(struct inode *inode),
79
80 TP_ARGS(inode),
81
82 TP_FIELDS(
83 ctf_integer(dev_t, dev, inode->i_sb->s_dev)
84 ctf_integer(ino_t, ino, inode->i_ino)
85 ctf_integer(int, nlink, inode->i_nlink)
86 )
87 )
88
89 LTTNG_TRACEPOINT_EVENT(ext4_drop_inode,
90 TP_PROTO(struct inode *inode, int drop),
91
92 TP_ARGS(inode, drop),
93
94 TP_FIELDS(
95 ctf_integer(dev_t, dev, inode->i_sb->s_dev)
96 ctf_integer(ino_t, ino, inode->i_ino)
97 ctf_integer(int, drop, drop)
98 )
99 )
100
101 LTTNG_TRACEPOINT_EVENT(ext4_mark_inode_dirty,
102 TP_PROTO(struct inode *inode, unsigned long IP),
103
104 TP_ARGS(inode, IP),
105
106 TP_FIELDS(
107 ctf_integer(dev_t, dev, inode->i_sb->s_dev)
108 ctf_integer(ino_t, ino, inode->i_ino)
109 ctf_integer(unsigned long, ip, IP)
110 )
111 )
112
113 LTTNG_TRACEPOINT_EVENT(ext4_begin_ordered_truncate,
114 TP_PROTO(struct inode *inode, loff_t new_size),
115
116 TP_ARGS(inode, new_size),
117
118 TP_FIELDS(
119 ctf_integer(dev_t, dev, inode->i_sb->s_dev)
120 ctf_integer(ino_t, ino, inode->i_ino)
121 ctf_integer(loff_t, new_size, new_size)
122 )
123 )
124
125 LTTNG_TRACEPOINT_EVENT_CLASS(ext4__write_begin,
126
127 TP_PROTO(struct inode *inode, loff_t pos, unsigned int len,
128 unsigned int flags),
129
130 TP_ARGS(inode, pos, len, flags),
131
132 TP_FIELDS(
133 ctf_integer(dev_t, dev, inode->i_sb->s_dev)
134 ctf_integer(ino_t, ino, inode->i_ino)
135 ctf_integer(loff_t, pos, pos)
136 ctf_integer(unsigned int, len, len)
137 ctf_integer(unsigned int, flags, flags)
138 )
139 )
140
141 LTTNG_TRACEPOINT_EVENT_INSTANCE(ext4__write_begin, ext4_write_begin,
142
143 TP_PROTO(struct inode *inode, loff_t pos, unsigned int len,
144 unsigned int flags),
145
146 TP_ARGS(inode, pos, len, flags)
147 )
148
149 LTTNG_TRACEPOINT_EVENT_INSTANCE(ext4__write_begin, ext4_da_write_begin,
150
151 TP_PROTO(struct inode *inode, loff_t pos, unsigned int len,
152 unsigned int flags),
153
154 TP_ARGS(inode, pos, len, flags)
155 )
156
157 LTTNG_TRACEPOINT_EVENT_CLASS(ext4__write_end,
158 TP_PROTO(struct inode *inode, loff_t pos, unsigned int len,
159 unsigned int copied),
160
161 TP_ARGS(inode, pos, len, copied),
162
163 TP_FIELDS(
164 ctf_integer(dev_t, dev, inode->i_sb->s_dev)
165 ctf_integer(ino_t, ino, inode->i_ino)
166 ctf_integer(loff_t, pos, pos)
167 ctf_integer(unsigned int, len, len)
168 ctf_integer(unsigned int, copied, copied)
169 )
170 )
171
172 LTTNG_TRACEPOINT_EVENT_INSTANCE(ext4__write_end, ext4_ordered_write_end,
173
174 TP_PROTO(struct inode *inode, loff_t pos, unsigned int len,
175 unsigned int copied),
176
177 TP_ARGS(inode, pos, len, copied)
178 )
179
180 LTTNG_TRACEPOINT_EVENT_INSTANCE(ext4__write_end, ext4_writeback_write_end,
181
182 TP_PROTO(struct inode *inode, loff_t pos, unsigned int len,
183 unsigned int copied),
184
185 TP_ARGS(inode, pos, len, copied)
186 )
187
188 LTTNG_TRACEPOINT_EVENT_INSTANCE(ext4__write_end, ext4_journalled_write_end,
189
190 TP_PROTO(struct inode *inode, loff_t pos, unsigned int len,
191 unsigned int copied),
192
193 TP_ARGS(inode, pos, len, copied)
194 )
195
196 LTTNG_TRACEPOINT_EVENT_INSTANCE(ext4__write_end, ext4_da_write_end,
197
198 TP_PROTO(struct inode *inode, loff_t pos, unsigned int len,
199 unsigned int copied),
200
201 TP_ARGS(inode, pos, len, copied)
202 )
203
204 LTTNG_TRACEPOINT_EVENT(ext4_da_writepages,
205 TP_PROTO(struct inode *inode, struct writeback_control *wbc),
206
207 TP_ARGS(inode, wbc),
208
209 TP_FIELDS(
210 ctf_integer(dev_t, dev, inode->i_sb->s_dev)
211 ctf_integer(ino_t, ino, inode->i_ino)
212 ctf_integer(long, nr_to_write, wbc->nr_to_write)
213 ctf_integer(long, pages_skipped, wbc->pages_skipped)
214 ctf_integer(loff_t, range_start, wbc->range_start)
215 ctf_integer(loff_t, range_end, wbc->range_end)
216 ctf_integer(pgoff_t, writeback_index, inode->i_mapping->writeback_index)
217 ctf_integer(int, sync_mode, wbc->sync_mode)
218 ctf_integer(char, for_kupdate, wbc->for_kupdate)
219 ctf_integer(char, range_cyclic, wbc->range_cyclic)
220 )
221 )
222
223 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,11,0))
224
225 LTTNG_TRACEPOINT_EVENT(ext4_da_write_pages,
226 TP_PROTO(struct inode *inode, pgoff_t first_page,
227 struct writeback_control *wbc),
228
229 TP_ARGS(inode, first_page, wbc),
230
231 TP_FIELDS(
232 ctf_integer(dev_t, dev, inode->i_sb->s_dev)
233 ctf_integer(ino_t, ino, inode->i_ino)
234 ctf_integer(pgoff_t, first_page, first_page)
235 ctf_integer(long, nr_to_write, wbc->nr_to_write)
236 ctf_integer(int, sync_mode, wbc->sync_mode)
237 )
238 )
239
240 #else
241
242 LTTNG_TRACEPOINT_EVENT(ext4_da_write_pages,
243 TP_PROTO(struct inode *inode, struct mpage_da_data *mpd),
244
245 TP_ARGS(inode, mpd),
246
247 TP_FIELDS(
248 ctf_integer(dev_t, dev, inode->i_sb->s_dev)
249 ctf_integer(ino_t, ino, inode->i_ino)
250 ctf_integer(__u64, b_blocknr, mpd->b_blocknr)
251 ctf_integer(__u32, b_size, mpd->b_size)
252 ctf_integer(__u32, b_state, mpd->b_state)
253 ctf_integer(unsigned long, first_page, mpd->first_page)
254 ctf_integer(int, io_done, mpd->io_done)
255 ctf_integer(int, pages_written, mpd->pages_written)
256 ctf_integer(int, sync_mode, mpd->wbc->sync_mode)
257 )
258 )
259
260 #endif
261
262 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,11,0))
263
264 LTTNG_TRACEPOINT_EVENT(ext4_da_write_pages_extent,
265 TP_PROTO(struct inode *inode, struct ext4_map_blocks *map),
266
267 TP_ARGS(inode, map),
268
269 TP_FIELDS(
270 ctf_integer(dev_t, dev, inode->i_sb->s_dev)
271 ctf_integer(ino_t, ino, inode->i_ino)
272 ctf_integer(__u64, lblk, map->m_lblk)
273 ctf_integer(__u32, len, map->m_len)
274 ctf_integer(__u32, flags, map->m_flags)
275 )
276 )
277
278 #endif
279
280 LTTNG_TRACEPOINT_EVENT(ext4_da_writepages_result,
281 TP_PROTO(struct inode *inode, struct writeback_control *wbc,
282 int ret, int pages_written),
283
284 TP_ARGS(inode, wbc, ret, pages_written),
285
286 TP_FIELDS(
287 ctf_integer(dev_t, dev, inode->i_sb->s_dev)
288 ctf_integer(ino_t, ino, inode->i_ino)
289 ctf_integer(int, ret, ret)
290 ctf_integer(int, pages_written, pages_written)
291 ctf_integer(long, pages_skipped, wbc->pages_skipped)
292 ctf_integer(pgoff_t, writeback_index, inode->i_mapping->writeback_index)
293 ctf_integer(int, sync_mode, wbc->sync_mode)
294 )
295 )
296
297 LTTNG_TRACEPOINT_EVENT_CLASS(ext4__page_op,
298 TP_PROTO(struct page *page),
299
300 TP_ARGS(page),
301
302 TP_FIELDS(
303 ctf_integer(dev_t, dev, page->mapping->host->i_sb->s_dev)
304 ctf_integer(ino_t, ino, page->mapping->host->i_ino)
305 ctf_integer(pgoff_t, index, page->index)
306 )
307 )
308
309 LTTNG_TRACEPOINT_EVENT_INSTANCE(ext4__page_op, ext4_writepage,
310
311 TP_PROTO(struct page *page),
312
313 TP_ARGS(page)
314 )
315
316 LTTNG_TRACEPOINT_EVENT_INSTANCE(ext4__page_op, ext4_readpage,
317
318 TP_PROTO(struct page *page),
319
320 TP_ARGS(page)
321 )
322
323 LTTNG_TRACEPOINT_EVENT_INSTANCE(ext4__page_op, ext4_releasepage,
324
325 TP_PROTO(struct page *page),
326
327 TP_ARGS(page)
328 )
329
330 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,11,0))
331
332 LTTNG_TRACEPOINT_EVENT_CLASS(ext4_invalidatepage_op,
333 TP_PROTO(struct page *page, unsigned int offset, unsigned int length),
334
335 TP_ARGS(page, offset, length),
336
337 TP_FIELDS(
338 ctf_integer(dev_t, dev, page->mapping->host->i_sb->s_dev)
339 ctf_integer(ino_t, ino, page->mapping->host->i_ino)
340 ctf_integer(pgoff_t, index, page->index)
341 ctf_integer(unsigned int, offset, offset)
342 ctf_integer(unsigned int, length, length)
343 )
344 )
345
346 LTTNG_TRACEPOINT_EVENT_INSTANCE(ext4_invalidatepage_op, ext4_invalidatepage,
347 TP_PROTO(struct page *page, unsigned int offset, unsigned int length),
348
349 TP_ARGS(page, offset, length)
350 )
351
352 LTTNG_TRACEPOINT_EVENT_INSTANCE(ext4_invalidatepage_op, ext4_journalled_invalidatepage,
353 TP_PROTO(struct page *page, unsigned int offset, unsigned int length),
354
355 TP_ARGS(page, offset, length)
356 )
357
358 #else
359
360 LTTNG_TRACEPOINT_EVENT(ext4_invalidatepage,
361 TP_PROTO(struct page *page, unsigned long offset),
362
363 TP_ARGS(page, offset),
364
365 TP_FIELDS(
366 ctf_integer(dev_t, dev, page->mapping->host->i_sb->s_dev)
367 ctf_integer(ino_t, ino, page->mapping->host->i_ino)
368 ctf_integer(pgoff_t, index, page->index)
369 ctf_integer(unsigned long, offset, offset)
370
371 )
372 )
373
374 #endif
375
376 LTTNG_TRACEPOINT_EVENT(ext4_discard_blocks,
377 TP_PROTO(struct super_block *sb, unsigned long long blk,
378 unsigned long long count),
379
380 TP_ARGS(sb, blk, count),
381
382 TP_FIELDS(
383 ctf_integer(dev_t, dev, sb->s_dev)
384 ctf_integer(__u64, blk, blk)
385 ctf_integer(__u64, count, count)
386 )
387 )
388
389 LTTNG_TRACEPOINT_EVENT_CLASS(ext4__mb_new_pa,
390 TP_PROTO(struct ext4_allocation_context *ac,
391 struct ext4_prealloc_space *pa),
392
393 TP_ARGS(ac, pa),
394
395 TP_FIELDS(
396 ctf_integer(dev_t, dev, ac->ac_sb->s_dev)
397 ctf_integer(ino_t, ino, ac->ac_inode->i_ino)
398 ctf_integer(__u64, pa_pstart, pa->pa_pstart)
399 ctf_integer(__u64, pa_lstart, pa->pa_lstart)
400 ctf_integer(__u32, pa_len, pa->pa_len)
401 )
402 )
403
404 LTTNG_TRACEPOINT_EVENT_INSTANCE(ext4__mb_new_pa, ext4_mb_new_inode_pa,
405
406 TP_PROTO(struct ext4_allocation_context *ac,
407 struct ext4_prealloc_space *pa),
408
409 TP_ARGS(ac, pa)
410 )
411
412 LTTNG_TRACEPOINT_EVENT_INSTANCE(ext4__mb_new_pa, ext4_mb_new_group_pa,
413
414 TP_PROTO(struct ext4_allocation_context *ac,
415 struct ext4_prealloc_space *pa),
416
417 TP_ARGS(ac, pa)
418 )
419
420 LTTNG_TRACEPOINT_EVENT(ext4_mb_release_inode_pa,
421 TP_PROTO(
422 struct ext4_prealloc_space *pa,
423 unsigned long long block, unsigned int count),
424
425 TP_ARGS(pa, block, count),
426
427 TP_FIELDS(
428 ctf_integer(dev_t, dev, pa->pa_inode->i_sb->s_dev)
429 ctf_integer(ino_t, ino, pa->pa_inode->i_ino)
430 ctf_integer(__u64, block, block)
431 ctf_integer(__u32, count, count)
432 )
433 )
434
435 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0))
436 LTTNG_TRACEPOINT_EVENT(ext4_mb_release_group_pa,
437
438 TP_PROTO(struct super_block *sb, struct ext4_prealloc_space *pa),
439
440 TP_ARGS(sb, pa),
441
442 TP_FIELDS(
443 ctf_integer(dev_t, dev, sb->s_dev)
444 ctf_integer(__u64, pa_pstart, pa->pa_pstart)
445 ctf_integer(__u32, pa_len, pa->pa_len)
446 )
447 )
448 #else
449 LTTNG_TRACEPOINT_EVENT(ext4_mb_release_group_pa,
450
451 TP_PROTO(struct ext4_prealloc_space *pa),
452
453 TP_ARGS(pa),
454
455 TP_FIELDS(
456 ctf_integer(dev_t, dev, pa->pa_inode->i_sb->s_dev)
457 ctf_integer(__u64, pa_pstart, pa->pa_pstart)
458 ctf_integer(__u32, pa_len, pa->pa_len)
459 )
460 )
461 #endif
462
463 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,9,0))
464 LTTNG_TRACEPOINT_EVENT(ext4_discard_preallocations,
465 TP_PROTO(struct inode *inode, unsigned int len, unsigned int needed),
466
467 TP_ARGS(inode, len, needed),
468
469 TP_FIELDS(
470 ctf_integer(dev_t, dev, inode->i_sb->s_dev)
471 ctf_integer(ino_t, ino, inode->i_ino)
472 ctf_integer(unsigned int, len, len)
473 ctf_integer(unsigned int, needed, needed)
474 )
475 )
476 #else
477 LTTNG_TRACEPOINT_EVENT(ext4_discard_preallocations,
478 TP_PROTO(struct inode *inode),
479
480 TP_ARGS(inode),
481
482 TP_FIELDS(
483 ctf_integer(dev_t, dev, inode->i_sb->s_dev)
484 ctf_integer(ino_t, ino, inode->i_ino)
485 )
486 )
487 #endif
488
489 LTTNG_TRACEPOINT_EVENT(ext4_mb_discard_preallocations,
490 TP_PROTO(struct super_block *sb, int needed),
491
492 TP_ARGS(sb, needed),
493
494 TP_FIELDS(
495 ctf_integer(dev_t, dev, sb->s_dev)
496 ctf_integer(int, needed, needed)
497 )
498 )
499
500 LTTNG_TRACEPOINT_EVENT(ext4_request_blocks,
501 TP_PROTO(struct ext4_allocation_request *ar),
502
503 TP_ARGS(ar),
504
505 TP_FIELDS(
506 ctf_integer(dev_t, dev, ar->inode->i_sb->s_dev)
507 ctf_integer(ino_t, ino, ar->inode->i_ino)
508 ctf_integer(unsigned int, len, ar->len)
509 ctf_integer(__u32, logical, ar->logical)
510 ctf_integer(__u32, lleft, ar->lleft)
511 ctf_integer(__u32, lright, ar->lright)
512 ctf_integer(__u64, goal, ar->goal)
513 ctf_integer(__u64, pleft, ar->pleft)
514 ctf_integer(__u64, pright, ar->pright)
515 ctf_integer(unsigned int, flags, ar->flags)
516 )
517 )
518
519 LTTNG_TRACEPOINT_EVENT(ext4_allocate_blocks,
520 TP_PROTO(struct ext4_allocation_request *ar, unsigned long long block),
521
522 TP_ARGS(ar, block),
523
524 TP_FIELDS(
525 ctf_integer(dev_t, dev, ar->inode->i_sb->s_dev)
526 ctf_integer(ino_t, ino, ar->inode->i_ino)
527 ctf_integer(__u64, block, block)
528 ctf_integer(unsigned int, len, ar->len)
529 ctf_integer(__u32, logical, ar->logical)
530 ctf_integer(__u32, lleft, ar->lleft)
531 ctf_integer(__u32, lright, ar->lright)
532 ctf_integer(__u64, goal, ar->goal)
533 ctf_integer(__u64, pleft, ar->pleft)
534 ctf_integer(__u64, pright, ar->pright)
535 ctf_integer(unsigned int, flags, ar->flags)
536 )
537 )
538
539 LTTNG_TRACEPOINT_EVENT(ext4_free_blocks,
540 TP_PROTO(struct inode *inode, __u64 block, unsigned long count,
541 int flags),
542
543 TP_ARGS(inode, block, count, flags),
544
545 TP_FIELDS(
546 ctf_integer(dev_t, dev, inode->i_sb->s_dev)
547 ctf_integer(ino_t, ino, inode->i_ino)
548 ctf_integer(__u64, block, block)
549 ctf_integer(unsigned long, count, count)
550 ctf_integer(int, flags, flags)
551 ctf_integer(TP_MODE_T, mode, inode->i_mode)
552 )
553 )
554
555 LTTNG_TRACEPOINT_EVENT(ext4_sync_file_enter,
556 TP_PROTO(struct file *file, int datasync),
557
558 TP_ARGS(file, datasync),
559
560 TP_FIELDS(
561 ctf_integer(dev_t, dev, file->f_path.dentry->d_inode->i_sb->s_dev)
562 ctf_integer(ino_t, ino, file->f_path.dentry->d_inode->i_ino)
563 ctf_integer(ino_t, parent, file->f_path.dentry->d_parent->d_inode->i_ino)
564 ctf_integer(int, datasync, datasync)
565 )
566 )
567
568 LTTNG_TRACEPOINT_EVENT(ext4_sync_file_exit,
569 TP_PROTO(struct inode *inode, int ret),
570
571 TP_ARGS(inode, ret),
572
573 TP_FIELDS(
574 ctf_integer(dev_t, dev, inode->i_sb->s_dev)
575 ctf_integer(ino_t, ino, inode->i_ino)
576 ctf_integer(int, ret, ret)
577 )
578 )
579
580 LTTNG_TRACEPOINT_EVENT(ext4_sync_fs,
581 TP_PROTO(struct super_block *sb, int wait),
582
583 TP_ARGS(sb, wait),
584
585 TP_FIELDS(
586 ctf_integer(dev_t, dev, sb->s_dev)
587 ctf_integer(int, wait, wait)
588
589 )
590 )
591
592 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,13,0))
593 LTTNG_TRACEPOINT_EVENT(ext4_alloc_da_blocks,
594 TP_PROTO(struct inode *inode),
595
596 TP_ARGS(inode),
597
598 TP_FIELDS(
599 ctf_integer(dev_t, dev, inode->i_sb->s_dev)
600 ctf_integer(ino_t, ino, inode->i_ino)
601 ctf_integer(unsigned int, data_blocks, EXT4_I(inode)->i_reserved_data_blocks)
602 )
603 )
604 #else
605 LTTNG_TRACEPOINT_EVENT(ext4_alloc_da_blocks,
606 TP_PROTO(struct inode *inode),
607
608 TP_ARGS(inode),
609
610 TP_FIELDS(
611 ctf_integer(dev_t, dev, inode->i_sb->s_dev)
612 ctf_integer(ino_t, ino, inode->i_ino)
613 ctf_integer(unsigned int, data_blocks, EXT4_I(inode)->i_reserved_data_blocks)
614 ctf_integer(unsigned int, meta_blocks, EXT4_I(inode)->i_reserved_meta_blocks)
615 )
616 )
617 #endif
618
619 LTTNG_TRACEPOINT_EVENT(ext4_mballoc_alloc,
620 TP_PROTO(struct ext4_allocation_context *ac),
621
622 TP_ARGS(ac),
623
624 TP_FIELDS(
625 ctf_integer(dev_t, dev, ac->ac_inode->i_sb->s_dev)
626 ctf_integer(ino_t, ino, ac->ac_inode->i_ino)
627 ctf_integer(__u32, orig_logical, ac->ac_o_ex.fe_logical)
628 ctf_integer(int, orig_start, ac->ac_o_ex.fe_start)
629 ctf_integer(__u32, orig_group, ac->ac_o_ex.fe_group)
630 ctf_integer(int, orig_len, ac->ac_o_ex.fe_len)
631 ctf_integer(__u32, goal_logical, ac->ac_g_ex.fe_logical)
632 ctf_integer(int, goal_start, ac->ac_g_ex.fe_start)
633 ctf_integer(__u32, goal_group, ac->ac_g_ex.fe_group)
634 ctf_integer(int, goal_len, ac->ac_g_ex.fe_len)
635 ctf_integer(__u32, result_logical, ac->ac_f_ex.fe_logical)
636 ctf_integer(int, result_start, ac->ac_f_ex.fe_start)
637 ctf_integer(__u32, result_group, ac->ac_f_ex.fe_group)
638 ctf_integer(int, result_len, ac->ac_f_ex.fe_len)
639 ctf_integer(__u16, found, ac->ac_found)
640 ctf_integer(__u16, groups, ac->ac_groups_scanned)
641 ctf_integer(__u16, buddy, ac->ac_buddy)
642 ctf_integer(__u16, flags, ac->ac_flags)
643 ctf_integer(__u16, tail, ac->ac_tail)
644 ctf_integer(__u8, cr, ac->ac_criteria)
645 )
646 )
647
648 LTTNG_TRACEPOINT_EVENT(ext4_mballoc_prealloc,
649 TP_PROTO(struct ext4_allocation_context *ac),
650
651 TP_ARGS(ac),
652
653 TP_FIELDS(
654 ctf_integer(dev_t, dev, ac->ac_inode->i_sb->s_dev)
655 ctf_integer(ino_t, ino, ac->ac_inode->i_ino)
656 ctf_integer(__u32, orig_logical, ac->ac_o_ex.fe_logical)
657 ctf_integer(int, orig_start, ac->ac_o_ex.fe_start)
658 ctf_integer(__u32, orig_group, ac->ac_o_ex.fe_group)
659 ctf_integer(int, orig_len, ac->ac_o_ex.fe_len)
660 ctf_integer(__u32, result_logical, ac->ac_b_ex.fe_logical)
661 ctf_integer(int, result_start, ac->ac_b_ex.fe_start)
662 ctf_integer(__u32, result_group, ac->ac_b_ex.fe_group)
663 ctf_integer(int, result_len, ac->ac_b_ex.fe_len)
664 )
665 )
666
667 LTTNG_TRACEPOINT_EVENT_CLASS(ext4__mballoc,
668 TP_PROTO(struct super_block *sb,
669 struct inode *inode,
670 ext4_group_t group,
671 ext4_grpblk_t start,
672 ext4_grpblk_t len),
673
674 TP_ARGS(sb, inode, group, start, len),
675
676 TP_FIELDS(
677 ctf_integer(dev_t, dev, sb->s_dev)
678 ctf_integer(ino_t, ino, inode ? inode->i_ino : 0)
679 ctf_integer(int, result_start, start)
680 ctf_integer(__u32, result_group, group)
681 ctf_integer(int, result_len, len)
682 )
683 )
684
685 LTTNG_TRACEPOINT_EVENT_INSTANCE(ext4__mballoc, ext4_mballoc_discard,
686
687 TP_PROTO(struct super_block *sb,
688 struct inode *inode,
689 ext4_group_t group,
690 ext4_grpblk_t start,
691 ext4_grpblk_t len),
692
693 TP_ARGS(sb, inode, group, start, len)
694 )
695
696 LTTNG_TRACEPOINT_EVENT_INSTANCE(ext4__mballoc, ext4_mballoc_free,
697
698 TP_PROTO(struct super_block *sb,
699 struct inode *inode,
700 ext4_group_t group,
701 ext4_grpblk_t start,
702 ext4_grpblk_t len),
703
704 TP_ARGS(sb, inode, group, start, len)
705 )
706
707 LTTNG_TRACEPOINT_EVENT(ext4_forget,
708 TP_PROTO(struct inode *inode, int is_metadata, __u64 block),
709
710 TP_ARGS(inode, is_metadata, block),
711
712 TP_FIELDS(
713 ctf_integer(dev_t, dev, inode->i_sb->s_dev)
714 ctf_integer(ino_t, ino, inode->i_ino)
715 ctf_integer(__u64, block, block)
716 ctf_integer(int, is_metadata, is_metadata)
717 ctf_integer(TP_MODE_T, mode, inode->i_mode)
718 )
719 )
720
721 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,13,0))
722 LTTNG_TRACEPOINT_EVENT(ext4_da_update_reserve_space,
723 TP_PROTO(struct inode *inode, int used_blocks, int quota_claim),
724
725 TP_ARGS(inode, used_blocks, quota_claim),
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(__u64, i_blocks, inode->i_blocks)
731 ctf_integer(int, used_blocks, used_blocks)
732 ctf_integer(int, reserved_data_blocks,
733 EXT4_I(inode)->i_reserved_data_blocks)
734 ctf_integer(int, quota_claim, quota_claim)
735 ctf_integer(TP_MODE_T, mode, inode->i_mode)
736 )
737 )
738 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,2,0))
739 LTTNG_TRACEPOINT_EVENT(ext4_da_update_reserve_space,
740 TP_PROTO(struct inode *inode, int used_blocks, int quota_claim),
741
742 TP_ARGS(inode, used_blocks, quota_claim),
743
744 TP_FIELDS(
745 ctf_integer(dev_t, dev, inode->i_sb->s_dev)
746 ctf_integer(ino_t, ino, inode->i_ino)
747 ctf_integer(__u64, i_blocks, inode->i_blocks)
748 ctf_integer(int, used_blocks, used_blocks)
749 ctf_integer(int, reserved_data_blocks,
750 EXT4_I(inode)->i_reserved_data_blocks)
751 ctf_integer(int, reserved_meta_blocks,
752 EXT4_I(inode)->i_reserved_meta_blocks)
753 ctf_integer(int, allocated_meta_blocks,
754 EXT4_I(inode)->i_allocated_meta_blocks)
755 ctf_integer(int, quota_claim, quota_claim)
756 ctf_integer(TP_MODE_T, mode, inode->i_mode)
757 )
758 )
759 #else
760 LTTNG_TRACEPOINT_EVENT(ext4_da_update_reserve_space,
761 TP_PROTO(struct inode *inode, int used_blocks),
762
763 TP_ARGS(inode, used_blocks),
764
765 TP_FIELDS(
766 ctf_integer(dev_t, dev, inode->i_sb->s_dev)
767 ctf_integer(ino_t, ino, inode->i_ino)
768 ctf_integer(__u64, i_blocks, inode->i_blocks)
769 ctf_integer(int, used_blocks, used_blocks)
770 ctf_integer(int, reserved_data_blocks,
771 EXT4_I(inode)->i_reserved_data_blocks)
772 ctf_integer(int, reserved_meta_blocks,
773 EXT4_I(inode)->i_reserved_meta_blocks)
774 ctf_integer(int, allocated_meta_blocks,
775 EXT4_I(inode)->i_allocated_meta_blocks)
776 ctf_integer(TP_MODE_T, mode, inode->i_mode)
777 )
778 )
779 #endif
780
781 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,13,0))
782 LTTNG_TRACEPOINT_EVENT(ext4_da_reserve_space,
783 TP_PROTO(struct inode *inode),
784
785 TP_ARGS(inode),
786
787 TP_FIELDS(
788 ctf_integer(dev_t, dev, inode->i_sb->s_dev)
789 ctf_integer(ino_t, ino, inode->i_ino)
790 ctf_integer(__u64, i_blocks, inode->i_blocks)
791 ctf_integer(int, reserved_data_blocks,
792 EXT4_I(inode)->i_reserved_data_blocks)
793 ctf_integer(TP_MODE_T, mode, inode->i_mode)
794 )
795 )
796 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,2,0))
797 LTTNG_TRACEPOINT_EVENT(ext4_da_reserve_space,
798 TP_PROTO(struct inode *inode),
799
800 TP_ARGS(inode),
801
802 TP_FIELDS(
803 ctf_integer(dev_t, dev, inode->i_sb->s_dev)
804 ctf_integer(ino_t, ino, inode->i_ino)
805 ctf_integer(__u64, i_blocks, inode->i_blocks)
806 ctf_integer(int, reserved_data_blocks,
807 EXT4_I(inode)->i_reserved_data_blocks)
808 ctf_integer(int, reserved_meta_blocks,
809 EXT4_I(inode)->i_reserved_meta_blocks)
810 ctf_integer(TP_MODE_T, mode, inode->i_mode)
811 )
812 )
813 #else
814 LTTNG_TRACEPOINT_EVENT(ext4_da_reserve_space,
815 TP_PROTO(struct inode *inode, int md_needed),
816
817 TP_ARGS(inode, md_needed),
818
819 TP_FIELDS(
820 ctf_integer(dev_t, dev, inode->i_sb->s_dev)
821 ctf_integer(ino_t, ino, inode->i_ino)
822 ctf_integer(__u64, i_blocks, inode->i_blocks)
823 ctf_integer(int, md_needed, md_needed)
824 ctf_integer(int, reserved_data_blocks,
825 EXT4_I(inode)->i_reserved_data_blocks)
826 ctf_integer(int, reserved_meta_blocks,
827 EXT4_I(inode)->i_reserved_meta_blocks)
828 ctf_integer(TP_MODE_T, mode, inode->i_mode)
829 )
830 )
831 #endif
832
833 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,13,0))
834 LTTNG_TRACEPOINT_EVENT(ext4_da_release_space,
835 TP_PROTO(struct inode *inode, int freed_blocks),
836
837 TP_ARGS(inode, freed_blocks),
838
839 TP_FIELDS(
840 ctf_integer(dev_t, dev, inode->i_sb->s_dev)
841 ctf_integer(ino_t, ino, inode->i_ino)
842 ctf_integer(__u64, i_blocks, inode->i_blocks)
843 ctf_integer(int, freed_blocks, freed_blocks)
844 ctf_integer(int, reserved_data_blocks,
845 EXT4_I(inode)->i_reserved_data_blocks)
846 ctf_integer(TP_MODE_T, mode, inode->i_mode)
847 )
848 )
849 #else
850 LTTNG_TRACEPOINT_EVENT(ext4_da_release_space,
851 TP_PROTO(struct inode *inode, int freed_blocks),
852
853 TP_ARGS(inode, freed_blocks),
854
855 TP_FIELDS(
856 ctf_integer(dev_t, dev, inode->i_sb->s_dev)
857 ctf_integer(ino_t, ino, inode->i_ino)
858 ctf_integer(__u64, i_blocks, inode->i_blocks)
859 ctf_integer(int, freed_blocks, freed_blocks)
860 ctf_integer(int, reserved_data_blocks,
861 EXT4_I(inode)->i_reserved_data_blocks)
862 ctf_integer(int, reserved_meta_blocks,
863 EXT4_I(inode)->i_reserved_meta_blocks)
864 ctf_integer(int, allocated_meta_blocks,
865 EXT4_I(inode)->i_allocated_meta_blocks)
866 ctf_integer(TP_MODE_T, mode, inode->i_mode)
867 )
868 )
869 #endif
870
871 LTTNG_TRACEPOINT_EVENT_CLASS(ext4__bitmap_load,
872 TP_PROTO(struct super_block *sb, unsigned long group),
873
874 TP_ARGS(sb, group),
875
876 TP_FIELDS(
877 ctf_integer(dev_t, dev, sb->s_dev)
878 ctf_integer(__u32, group, group)
879 )
880 )
881
882 LTTNG_TRACEPOINT_EVENT_INSTANCE(ext4__bitmap_load, ext4_mb_bitmap_load,
883
884 TP_PROTO(struct super_block *sb, unsigned long group),
885
886 TP_ARGS(sb, group)
887 )
888
889 LTTNG_TRACEPOINT_EVENT_INSTANCE(ext4__bitmap_load, ext4_mb_buddy_bitmap_load,
890
891 TP_PROTO(struct super_block *sb, unsigned long group),
892
893 TP_ARGS(sb, group)
894 )
895
896 LTTNG_TRACEPOINT_EVENT_INSTANCE(ext4__bitmap_load, ext4_read_block_bitmap_load,
897
898 TP_PROTO(struct super_block *sb, unsigned long group),
899
900 TP_ARGS(sb, group)
901 )
902
903 LTTNG_TRACEPOINT_EVENT_INSTANCE(ext4__bitmap_load, ext4_load_inode_bitmap,
904
905 TP_PROTO(struct super_block *sb, unsigned long group),
906
907 TP_ARGS(sb, group)
908 )
909
910 LTTNG_TRACEPOINT_EVENT(ext4_direct_IO_enter,
911 TP_PROTO(struct inode *inode, loff_t offset, unsigned long len, int rw),
912
913 TP_ARGS(inode, offset, len, rw),
914
915 TP_FIELDS(
916 ctf_integer(dev_t, dev, inode->i_sb->s_dev)
917 ctf_integer(ino_t, ino, inode->i_ino)
918 ctf_integer(loff_t, pos, offset)
919 ctf_integer(unsigned long, len, len)
920 ctf_integer(int, rw, rw)
921 )
922 )
923
924 LTTNG_TRACEPOINT_EVENT(ext4_direct_IO_exit,
925 TP_PROTO(struct inode *inode, loff_t offset, unsigned long len,
926 int rw, int ret),
927
928 TP_ARGS(inode, offset, len, rw, ret),
929
930 TP_FIELDS(
931 ctf_integer(dev_t, dev, inode->i_sb->s_dev)
932 ctf_integer(ino_t, ino, inode->i_ino)
933 ctf_integer(loff_t, pos, offset)
934 ctf_integer(unsigned long, len, len)
935 ctf_integer(int, rw, rw)
936 ctf_integer(int, ret, ret)
937 )
938 )
939
940 LTTNG_TRACEPOINT_EVENT(ext4_fallocate_exit,
941 TP_PROTO(struct inode *inode, loff_t offset,
942 unsigned int max_blocks, int ret),
943
944 TP_ARGS(inode, offset, max_blocks, ret),
945
946 TP_FIELDS(
947 ctf_integer(dev_t, dev, inode->i_sb->s_dev)
948 ctf_integer(ino_t, ino, inode->i_ino)
949 ctf_integer(loff_t, pos, offset)
950 ctf_integer(unsigned int, blocks, max_blocks)
951 ctf_integer(int, ret, ret)
952 )
953 )
954
955 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,15,0))
956
957 LTTNG_TRACEPOINT_EVENT_CLASS(ext4__fallocate_mode,
958 TP_PROTO(struct inode *inode, loff_t offset, loff_t len, int mode),
959
960 TP_ARGS(inode, offset, len, mode),
961
962 TP_FIELDS(
963 ctf_integer(dev_t, dev, inode->i_sb->s_dev)
964 ctf_integer(ino_t, ino, inode->i_ino)
965 ctf_integer(loff_t, pos, offset)
966 ctf_integer(loff_t, len, len)
967 ctf_integer(int, mode, mode)
968 )
969 )
970
971 LTTNG_TRACEPOINT_EVENT_INSTANCE(ext4__fallocate_mode, ext4_fallocate_enter,
972
973 TP_PROTO(struct inode *inode, loff_t offset, loff_t len, int mode),
974
975 TP_ARGS(inode, offset, len, mode)
976 )
977
978 LTTNG_TRACEPOINT_EVENT_INSTANCE(ext4__fallocate_mode, ext4_punch_hole,
979
980 TP_PROTO(struct inode *inode, loff_t offset, loff_t len, int mode),
981
982 TP_ARGS(inode, offset, len, mode)
983 )
984
985 LTTNG_TRACEPOINT_EVENT_INSTANCE(ext4__fallocate_mode, ext4_zero_range,
986
987 TP_PROTO(struct inode *inode, loff_t offset, loff_t len, int mode),
988
989 TP_ARGS(inode, offset, len, mode)
990 )
991
992 #else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,15,0)) */
993
994 LTTNG_TRACEPOINT_EVENT(ext4_fallocate_enter,
995 TP_PROTO(struct inode *inode, loff_t offset, loff_t len, int mode),
996
997 TP_ARGS(inode, offset, len, mode),
998
999 TP_FIELDS(
1000 ctf_integer(dev_t, dev, inode->i_sb->s_dev)
1001 ctf_integer(ino_t, ino, inode->i_ino)
1002 ctf_integer(loff_t, pos, offset)
1003 ctf_integer(loff_t, len, len)
1004 ctf_integer(int, mode, mode)
1005 )
1006 )
1007
1008 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,11,0))
1009
1010 LTTNG_TRACEPOINT_EVENT(ext4_punch_hole,
1011 TP_PROTO(struct inode *inode, loff_t offset, loff_t len),
1012
1013 TP_ARGS(inode, offset, len),
1014
1015 TP_FIELDS(
1016 ctf_integer(dev_t, dev, inode->i_sb->s_dev)
1017 ctf_integer(ino_t, ino, inode->i_ino)
1018 ctf_integer(loff_t, pos, offset)
1019 ctf_integer(loff_t, len, len)
1020 )
1021 )
1022
1023 #endif /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,11,0)) */
1024
1025 #endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,15,0)) */
1026
1027 LTTNG_TRACEPOINT_EVENT(ext4_unlink_enter,
1028 TP_PROTO(struct inode *parent, struct dentry *dentry),
1029
1030 TP_ARGS(parent, dentry),
1031
1032 TP_FIELDS(
1033 ctf_integer(dev_t, dev, dentry->d_inode->i_sb->s_dev)
1034 ctf_integer(ino_t, ino, dentry->d_inode->i_ino)
1035 ctf_integer(ino_t, parent, parent->i_ino)
1036 ctf_integer(loff_t, size, dentry->d_inode->i_size)
1037 )
1038 )
1039
1040 LTTNG_TRACEPOINT_EVENT(ext4_unlink_exit,
1041 TP_PROTO(struct dentry *dentry, int ret),
1042
1043 TP_ARGS(dentry, ret),
1044
1045 TP_FIELDS(
1046 ctf_integer(dev_t, dev, dentry->d_inode->i_sb->s_dev)
1047 ctf_integer(ino_t, ino, dentry->d_inode->i_ino)
1048 ctf_integer(int, ret, ret)
1049 )
1050 )
1051
1052 LTTNG_TRACEPOINT_EVENT_CLASS(ext4__truncate,
1053 TP_PROTO(struct inode *inode),
1054
1055 TP_ARGS(inode),
1056
1057 TP_FIELDS(
1058 ctf_integer(dev_t, dev, inode->i_sb->s_dev)
1059 ctf_integer(ino_t, ino, inode->i_ino)
1060 ctf_integer(unsigned int, blocks, inode->i_blocks)
1061 )
1062 )
1063
1064 LTTNG_TRACEPOINT_EVENT_INSTANCE(ext4__truncate, ext4_truncate_enter,
1065
1066 TP_PROTO(struct inode *inode),
1067
1068 TP_ARGS(inode)
1069 )
1070
1071 LTTNG_TRACEPOINT_EVENT_INSTANCE(ext4__truncate, ext4_truncate_exit,
1072
1073 TP_PROTO(struct inode *inode),
1074
1075 TP_ARGS(inode)
1076 )
1077
1078 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,2,0))
1079 /* 'ux' is the uninitialized extent. */
1080 LTTNG_TRACEPOINT_EVENT(ext4_ext_convert_to_initialized_enter,
1081 TP_PROTO(struct inode *inode, struct ext4_map_blocks *map,
1082 struct ext4_extent *ux),
1083
1084 TP_ARGS(inode, map, ux),
1085
1086 TP_FIELDS(
1087 ctf_integer(dev_t, dev, inode->i_sb->s_dev)
1088 ctf_integer(ino_t, ino, inode->i_ino)
1089 ctf_integer(ext4_lblk_t, m_lblk, map->m_lblk)
1090 ctf_integer(unsigned, m_len, map->m_len)
1091 ctf_integer(ext4_lblk_t, u_lblk, le32_to_cpu(ux->ee_block))
1092 ctf_integer(unsigned, u_len, ext4_ext_get_actual_len(ux))
1093 ctf_integer(ext4_fsblk_t, u_pblk, ext4_ext_pblock(ux))
1094 )
1095 )
1096
1097 /*
1098 * 'ux' is the uninitialized extent.
1099 * 'ix' is the initialized extent to which blocks are transferred.
1100 */
1101 LTTNG_TRACEPOINT_EVENT(ext4_ext_convert_to_initialized_fastpath,
1102 TP_PROTO(struct inode *inode, struct ext4_map_blocks *map,
1103 struct ext4_extent *ux, struct ext4_extent *ix),
1104
1105 TP_ARGS(inode, map, ux, ix),
1106
1107 TP_FIELDS(
1108 ctf_integer(dev_t, dev, inode->i_sb->s_dev)
1109 ctf_integer(ino_t, ino, inode->i_ino)
1110 ctf_integer(ext4_lblk_t, m_lblk, map->m_lblk)
1111 ctf_integer(unsigned, m_len, map->m_len)
1112 ctf_integer(ext4_lblk_t, u_lblk, le32_to_cpu(ux->ee_block))
1113 ctf_integer(unsigned, u_len, ext4_ext_get_actual_len(ux))
1114 ctf_integer(ext4_fsblk_t, u_pblk, ext4_ext_pblock(ux))
1115 ctf_integer(ext4_lblk_t, i_lblk, le32_to_cpu(ix->ee_block))
1116 ctf_integer(unsigned, i_len, ext4_ext_get_actual_len(ix))
1117 ctf_integer(ext4_fsblk_t, i_pblk, ext4_ext_pblock(ix))
1118 )
1119 )
1120 #endif
1121
1122 LTTNG_TRACEPOINT_EVENT_CLASS(ext4__map_blocks_enter,
1123 TP_PROTO(struct inode *inode, ext4_lblk_t lblk,
1124 unsigned int len, unsigned int flags),
1125
1126 TP_ARGS(inode, lblk, len, flags),
1127
1128 TP_FIELDS(
1129 ctf_integer(dev_t, dev, inode->i_sb->s_dev)
1130 ctf_integer(ino_t, ino, inode->i_ino)
1131 ctf_integer(ext4_lblk_t, lblk, lblk)
1132 ctf_integer(unsigned int, len, len)
1133 ctf_integer(unsigned int, flags, flags)
1134 )
1135 )
1136
1137 LTTNG_TRACEPOINT_EVENT_INSTANCE(ext4__map_blocks_enter, ext4_ext_map_blocks_enter,
1138 TP_PROTO(struct inode *inode, ext4_lblk_t lblk,
1139 unsigned len, unsigned flags),
1140
1141 TP_ARGS(inode, lblk, len, flags)
1142 )
1143
1144 LTTNG_TRACEPOINT_EVENT_INSTANCE(ext4__map_blocks_enter, ext4_ind_map_blocks_enter,
1145 TP_PROTO(struct inode *inode, ext4_lblk_t lblk,
1146 unsigned len, unsigned flags),
1147
1148 TP_ARGS(inode, lblk, len, flags)
1149 )
1150
1151 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,11,0))
1152
1153 LTTNG_TRACEPOINT_EVENT_CLASS(ext4__map_blocks_exit,
1154 TP_PROTO(struct inode *inode, unsigned flags, struct ext4_map_blocks *map,
1155 int ret),
1156
1157 TP_ARGS(inode, flags, map, ret),
1158
1159 TP_FIELDS(
1160 ctf_integer(dev_t, dev, inode->i_sb->s_dev)
1161 ctf_integer(ino_t, ino, inode->i_ino)
1162 ctf_integer(unsigned int, flags, flags)
1163 ctf_integer(ext4_fsblk_t, pblk, map->m_pblk)
1164 ctf_integer(ext4_lblk_t, lblk, map->m_lblk)
1165 ctf_integer(unsigned int, len, map->m_len)
1166 ctf_integer(unsigned int, mflags, map->m_flags)
1167 ctf_integer(int, ret, ret)
1168 )
1169 )
1170
1171 LTTNG_TRACEPOINT_EVENT_INSTANCE(ext4__map_blocks_exit, ext4_ext_map_blocks_exit,
1172 TP_PROTO(struct inode *inode, unsigned flags,
1173 struct ext4_map_blocks *map, int ret),
1174
1175 TP_ARGS(inode, flags, map, ret)
1176 )
1177
1178 LTTNG_TRACEPOINT_EVENT_INSTANCE(ext4__map_blocks_exit, ext4_ind_map_blocks_exit,
1179 TP_PROTO(struct inode *inode, unsigned flags,
1180 struct ext4_map_blocks *map, int ret),
1181
1182 TP_ARGS(inode, flags, map, ret)
1183 )
1184
1185 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,8,0))
1186
1187 LTTNG_TRACEPOINT_EVENT_CLASS(ext4__map_blocks_exit,
1188 TP_PROTO(struct inode *inode, struct ext4_map_blocks *map, int ret),
1189
1190 TP_ARGS(inode, map, ret),
1191
1192 TP_FIELDS(
1193 ctf_integer(dev_t, dev, inode->i_sb->s_dev)
1194 ctf_integer(ino_t, ino, inode->i_ino)
1195 ctf_integer(ext4_fsblk_t, pblk, map->m_pblk)
1196 ctf_integer(ext4_lblk_t, lblk, map->m_lblk)
1197 ctf_integer(unsigned int, len, map->m_len)
1198 ctf_integer(unsigned int, mflags, map->m_flags)
1199 ctf_integer(int, ret, ret)
1200 )
1201 )
1202
1203 LTTNG_TRACEPOINT_EVENT_INSTANCE(ext4__map_blocks_exit, ext4_ext_map_blocks_exit,
1204 TP_PROTO(struct inode *inode, struct ext4_map_blocks *map, int ret),
1205
1206 TP_ARGS(inode, map, ret)
1207 )
1208
1209 LTTNG_TRACEPOINT_EVENT_INSTANCE(ext4__map_blocks_exit, ext4_ind_map_blocks_exit,
1210 TP_PROTO(struct inode *inode, struct ext4_map_blocks *map, int ret),
1211
1212 TP_ARGS(inode, map, ret)
1213 )
1214
1215 #else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,8,0)) */
1216
1217 LTTNG_TRACEPOINT_EVENT_CLASS(ext4__map_blocks_exit,
1218 TP_PROTO(struct inode *inode, ext4_lblk_t lblk,
1219 ext4_fsblk_t pblk, unsigned int len, int ret),
1220
1221 TP_ARGS(inode, lblk, pblk, len, ret),
1222
1223 TP_FIELDS(
1224 ctf_integer(dev_t, dev, inode->i_sb->s_dev)
1225 ctf_integer(ino_t, ino, inode->i_ino)
1226 ctf_integer(ext4_fsblk_t, pblk, pblk)
1227 ctf_integer(ext4_lblk_t, lblk, lblk)
1228 ctf_integer(unsigned int, len, len)
1229 ctf_integer(int, ret, ret)
1230 )
1231 )
1232
1233 LTTNG_TRACEPOINT_EVENT_INSTANCE(ext4__map_blocks_exit, ext4_ext_map_blocks_exit,
1234 TP_PROTO(struct inode *inode, ext4_lblk_t lblk,
1235 ext4_fsblk_t pblk, unsigned len, int ret),
1236
1237 TP_ARGS(inode, lblk, pblk, len, ret)
1238 )
1239
1240 LTTNG_TRACEPOINT_EVENT_INSTANCE(ext4__map_blocks_exit, ext4_ind_map_blocks_exit,
1241 TP_PROTO(struct inode *inode, ext4_lblk_t lblk,
1242 ext4_fsblk_t pblk, unsigned len, int ret),
1243
1244 TP_ARGS(inode, lblk, pblk, len, ret)
1245 )
1246
1247 #endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,8,0)) */
1248
1249 LTTNG_TRACEPOINT_EVENT(ext4_ext_load_extent,
1250 TP_PROTO(struct inode *inode, ext4_lblk_t lblk, ext4_fsblk_t pblk),
1251
1252 TP_ARGS(inode, lblk, pblk),
1253
1254 TP_FIELDS(
1255 ctf_integer(dev_t, dev, inode->i_sb->s_dev)
1256 ctf_integer(ino_t, ino, inode->i_ino)
1257 ctf_integer(ext4_fsblk_t, pblk, pblk)
1258 ctf_integer(ext4_lblk_t, lblk, lblk)
1259 )
1260 )
1261
1262 LTTNG_TRACEPOINT_EVENT(ext4_load_inode,
1263 TP_PROTO(struct inode *inode),
1264
1265 TP_ARGS(inode),
1266
1267 TP_FIELDS(
1268 ctf_integer(dev_t, dev, inode->i_sb->s_dev)
1269 ctf_integer(ino_t, ino, inode->i_ino)
1270 )
1271 )
1272
1273 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,5,0))
1274
1275 LTTNG_TRACEPOINT_EVENT(ext4_journal_start,
1276 TP_PROTO(struct super_block *sb, int blocks, int rsv_blocks,
1277 int revoke_creds, unsigned long IP),
1278
1279 TP_ARGS(sb, blocks, rsv_blocks, revoke_creds, IP),
1280
1281 TP_FIELDS(
1282 ctf_integer(dev_t, dev, sb->s_dev)
1283 ctf_integer(unsigned long, ip, IP)
1284 ctf_integer(int, blocks, blocks)
1285 ctf_integer(int, rsv_blocks, rsv_blocks)
1286 ctf_integer(int, revoke_creds, revoke_creds)
1287 )
1288 )
1289
1290 LTTNG_TRACEPOINT_EVENT(ext4_journal_start_reserved,
1291 TP_PROTO(struct super_block *sb, int blocks, unsigned long IP),
1292
1293 TP_ARGS(sb, blocks, IP),
1294
1295 TP_FIELDS(
1296 ctf_integer(dev_t, dev, sb->s_dev)
1297 ctf_integer(unsigned long, ip, IP)
1298 ctf_integer(int, blocks, blocks)
1299 )
1300 )
1301
1302 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,11,0))
1303
1304 LTTNG_TRACEPOINT_EVENT(ext4_journal_start,
1305 TP_PROTO(struct super_block *sb, int blocks, int rsv_blocks,
1306 unsigned long IP),
1307
1308 TP_ARGS(sb, blocks, rsv_blocks, IP),
1309
1310 TP_FIELDS(
1311 ctf_integer(dev_t, dev, sb->s_dev)
1312 ctf_integer(unsigned long, ip, IP)
1313 ctf_integer(int, blocks, blocks)
1314 ctf_integer(int, rsv_blocks, rsv_blocks)
1315 )
1316 )
1317
1318 LTTNG_TRACEPOINT_EVENT(ext4_journal_start_reserved,
1319 TP_PROTO(struct super_block *sb, int blocks, unsigned long IP),
1320
1321 TP_ARGS(sb, blocks, IP),
1322
1323 TP_FIELDS(
1324 ctf_integer(dev_t, dev, sb->s_dev)
1325 ctf_integer(unsigned long, ip, IP)
1326 ctf_integer(int, blocks, blocks)
1327 )
1328 )
1329
1330 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,1,0))
1331
1332 LTTNG_TRACEPOINT_EVENT(ext4_journal_start,
1333 TP_PROTO(struct super_block *sb, int nblocks, unsigned long IP),
1334
1335 TP_ARGS(sb, nblocks, IP),
1336
1337 TP_FIELDS(
1338 ctf_integer(dev_t, dev, sb->s_dev)
1339 ctf_integer(unsigned long, ip, IP)
1340 ctf_integer(int, nblocks, nblocks)
1341 )
1342 )
1343
1344 LTTNG_TRACEPOINT_EVENT_CLASS(ext4__trim,
1345 TP_PROTO(struct super_block *sb,
1346 ext4_group_t group,
1347 ext4_grpblk_t start,
1348 ext4_grpblk_t len),
1349
1350 TP_ARGS(sb, group, start, len),
1351
1352 TP_FIELDS(
1353 ctf_integer(int, dev_major, MAJOR(sb->s_dev))
1354 ctf_integer(int, dev_minor, MINOR(sb->s_dev))
1355 ctf_integer(__u32, group, group)
1356 ctf_integer(int, start, start)
1357 ctf_integer(int, len, len)
1358 )
1359 )
1360
1361 LTTNG_TRACEPOINT_EVENT_INSTANCE(ext4__trim, ext4_trim_extent,
1362
1363 TP_PROTO(struct super_block *sb,
1364 ext4_group_t group,
1365 ext4_grpblk_t start,
1366 ext4_grpblk_t len),
1367
1368 TP_ARGS(sb, group, start, len)
1369 )
1370
1371 LTTNG_TRACEPOINT_EVENT_INSTANCE(ext4__trim, ext4_trim_all_free,
1372
1373 TP_PROTO(struct super_block *sb,
1374 ext4_group_t group,
1375 ext4_grpblk_t start,
1376 ext4_grpblk_t len),
1377
1378 TP_ARGS(sb, group, start, len)
1379 )
1380 #endif
1381
1382 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,2,0))
1383
1384 LTTNG_TRACEPOINT_EVENT(ext4_ext_handle_uninitialized_extents,
1385 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,8,0))
1386 TP_PROTO(struct inode *inode, struct ext4_map_blocks *map, int flags,
1387 unsigned int allocated, ext4_fsblk_t newblock),
1388
1389 TP_ARGS(inode, map, flags, allocated, newblock),
1390 #else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,8,0)) */
1391 TP_PROTO(struct inode *inode, struct ext4_map_blocks *map,
1392 unsigned int allocated, ext4_fsblk_t newblock),
1393
1394 TP_ARGS(inode, map, allocated, newblock),
1395 #endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,8,0)) */
1396
1397 TP_FIELDS(
1398 ctf_integer(dev_t, dev, inode->i_sb->s_dev)
1399 ctf_integer(ino_t, ino, inode->i_ino)
1400 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,8,0))
1401 ctf_integer(int, flags, flags)
1402 #else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,8,0)) */
1403 ctf_integer(int, flags, map->m_flags)
1404 #endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,8,0)) */
1405 ctf_integer(ext4_lblk_t, lblk, map->m_lblk)
1406 ctf_integer(ext4_fsblk_t, pblk, map->m_pblk)
1407 ctf_integer(unsigned int, len, map->m_len)
1408 ctf_integer(unsigned int, allocated, allocated)
1409 ctf_integer(ext4_fsblk_t, newblk, newblock)
1410 )
1411 )
1412
1413 LTTNG_TRACEPOINT_EVENT(ext4_get_implied_cluster_alloc_exit,
1414 TP_PROTO(struct super_block *sb, struct ext4_map_blocks *map, int ret),
1415
1416 TP_ARGS(sb, map, ret),
1417
1418 TP_FIELDS(
1419 ctf_integer(dev_t, dev, sb->s_dev)
1420 ctf_integer(unsigned int, flags, map->m_flags)
1421 ctf_integer(ext4_lblk_t, lblk, map->m_lblk)
1422 ctf_integer(ext4_fsblk_t, pblk, map->m_pblk)
1423 ctf_integer(unsigned int, len, map->m_len)
1424 ctf_integer(int, ret, ret)
1425 )
1426 )
1427
1428 LTTNG_TRACEPOINT_EVENT(ext4_ext_put_in_cache,
1429 TP_PROTO(struct inode *inode, ext4_lblk_t lblk, unsigned int len,
1430 ext4_fsblk_t start),
1431
1432 TP_ARGS(inode, lblk, len, start),
1433
1434 TP_FIELDS(
1435 ctf_integer(dev_t, dev, inode->i_sb->s_dev)
1436 ctf_integer(ino_t, ino, inode->i_ino)
1437 ctf_integer(ext4_lblk_t, lblk, lblk)
1438 ctf_integer(unsigned int, len, len)
1439 ctf_integer(ext4_fsblk_t, start, start)
1440 )
1441 )
1442
1443 LTTNG_TRACEPOINT_EVENT(ext4_ext_in_cache,
1444 TP_PROTO(struct inode *inode, ext4_lblk_t lblk, int ret),
1445
1446 TP_ARGS(inode, lblk, ret),
1447
1448 TP_FIELDS(
1449 ctf_integer(dev_t, dev, inode->i_sb->s_dev)
1450 ctf_integer(ino_t, ino, inode->i_ino)
1451 ctf_integer(ext4_lblk_t, lblk, lblk)
1452 ctf_integer(int, ret, ret)
1453 )
1454 )
1455
1456 LTTNG_TRACEPOINT_EVENT(ext4_find_delalloc_range,
1457 TP_PROTO(struct inode *inode, ext4_lblk_t from, ext4_lblk_t to,
1458 int reverse, int found, ext4_lblk_t found_blk),
1459
1460 TP_ARGS(inode, from, to, reverse, found, found_blk),
1461
1462 TP_FIELDS(
1463 ctf_integer(dev_t, dev, inode->i_sb->s_dev)
1464 ctf_integer(ino_t, ino, inode->i_ino)
1465 ctf_integer(ext4_lblk_t, from, from)
1466 ctf_integer(ext4_lblk_t, to, to)
1467 ctf_integer(int, reverse, reverse)
1468 ctf_integer(int, found, found)
1469 ctf_integer(ext4_lblk_t, found_blk, found_blk)
1470 )
1471 )
1472
1473 LTTNG_TRACEPOINT_EVENT(ext4_get_reserved_cluster_alloc,
1474 TP_PROTO(struct inode *inode, ext4_lblk_t lblk, unsigned int len),
1475
1476 TP_ARGS(inode, lblk, len),
1477
1478 TP_FIELDS(
1479 ctf_integer(dev_t, dev, inode->i_sb->s_dev)
1480 ctf_integer(ino_t, ino, inode->i_ino)
1481 ctf_integer(ext4_lblk_t, lblk, lblk)
1482 ctf_integer(unsigned int, len, len)
1483 )
1484 )
1485
1486 LTTNG_TRACEPOINT_EVENT(ext4_ext_show_extent,
1487 TP_PROTO(struct inode *inode, ext4_lblk_t lblk, ext4_fsblk_t pblk,
1488 unsigned short len),
1489
1490 TP_ARGS(inode, lblk, pblk, len),
1491
1492 TP_FIELDS(
1493 ctf_integer(dev_t, dev, inode->i_sb->s_dev)
1494 ctf_integer(ino_t, ino, inode->i_ino)
1495 ctf_integer(ext4_fsblk_t, pblk, pblk)
1496 ctf_integer(ext4_lblk_t, lblk, lblk)
1497 ctf_integer(unsigned short, len, len)
1498 )
1499 )
1500
1501 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,20,0) || \
1502 LTTNG_RHEL_KERNEL_RANGE(4,18,0,147,0,0, 4,19,0,0,0,0))
1503
1504 LTTNG_TRACEPOINT_EVENT(ext4_remove_blocks,
1505 TP_PROTO(struct inode *inode, struct ext4_extent *ex,
1506 ext4_lblk_t from, ext4_fsblk_t to,
1507 struct partial_cluster *pc),
1508
1509 TP_ARGS(inode, ex, from, to, pc),
1510
1511 TP_FIELDS(
1512 ctf_integer(dev_t, dev, inode->i_sb->s_dev)
1513 ctf_integer(ino_t, ino, inode->i_ino)
1514 ctf_integer(ext4_lblk_t, from, from)
1515 ctf_integer(ext4_lblk_t, to, to)
1516 ctf_integer(ext4_fsblk_t, ee_pblk, ext4_ext_pblock(ex))
1517 ctf_integer(ext4_lblk_t, ee_lblk, le32_to_cpu(ex->ee_block))
1518 ctf_integer(unsigned short, ee_len, ext4_ext_get_actual_len(ex))
1519 ctf_integer(ext4_fsblk_t, pc_pclu, pc->pclu)
1520 ctf_integer(ext4_lblk_t, pc_lblk, pc->lblk)
1521 ctf_integer(int, pc_state, pc->state)
1522 )
1523 )
1524
1525 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,11,0))
1526
1527 LTTNG_TRACEPOINT_EVENT(ext4_remove_blocks,
1528 TP_PROTO(struct inode *inode, struct ext4_extent *ex,
1529 ext4_lblk_t from, ext4_fsblk_t to,
1530 long long partial_cluster),
1531
1532 TP_ARGS(inode, ex, from, to, partial_cluster),
1533
1534 TP_FIELDS(
1535 ctf_integer(dev_t, dev, inode->i_sb->s_dev)
1536 ctf_integer(ino_t, ino, inode->i_ino)
1537 ctf_integer(ext4_lblk_t, from, from)
1538 ctf_integer(ext4_lblk_t, to, to)
1539 ctf_integer(long long, partial, partial_cluster)
1540 ctf_integer(ext4_fsblk_t, ee_pblk, ext4_ext_pblock(ex))
1541 ctf_integer(ext4_lblk_t, ee_lblk, le32_to_cpu(ex->ee_block))
1542 ctf_integer(unsigned short, ee_len, ext4_ext_get_actual_len(ex))
1543 )
1544 )
1545
1546 #else
1547
1548 LTTNG_TRACEPOINT_EVENT(ext4_remove_blocks,
1549 TP_PROTO(struct inode *inode, struct ext4_extent *ex,
1550 ext4_lblk_t from, ext4_fsblk_t to,
1551 ext4_fsblk_t partial_cluster),
1552
1553 TP_ARGS(inode, ex, from, to, partial_cluster),
1554
1555 TP_FIELDS(
1556 ctf_integer(dev_t, dev, inode->i_sb->s_dev)
1557 ctf_integer(ino_t, ino, inode->i_ino)
1558 ctf_integer(ext4_lblk_t, from, from)
1559 ctf_integer(ext4_lblk_t, to, to)
1560 ctf_integer(ext4_fsblk_t, partial, partial_cluster)
1561 ctf_integer(ext4_fsblk_t, ee_pblk, ext4_ext_pblock(ex))
1562 ctf_integer(ext4_lblk_t, ee_lblk, le32_to_cpu(ex->ee_block))
1563 ctf_integer(unsigned short, ee_len, ext4_ext_get_actual_len(ex))
1564 )
1565 )
1566
1567 #endif
1568
1569 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,20,0) || \
1570 LTTNG_RHEL_KERNEL_RANGE(4,18,0,147,0,0, 4,19,0,0,0,0))
1571
1572 LTTNG_TRACEPOINT_EVENT(ext4_ext_rm_leaf,
1573 TP_PROTO(struct inode *inode, ext4_lblk_t start,
1574 struct ext4_extent *ex,
1575 struct partial_cluster *pc),
1576
1577 TP_ARGS(inode, start, ex, pc),
1578
1579 TP_FIELDS(
1580 ctf_integer(dev_t, dev, inode->i_sb->s_dev)
1581 ctf_integer(ino_t, ino, inode->i_ino)
1582 ctf_integer(ext4_lblk_t, start, start)
1583 ctf_integer(ext4_lblk_t, ee_lblk, le32_to_cpu(ex->ee_block))
1584 ctf_integer(ext4_fsblk_t, ee_pblk, ext4_ext_pblock(ex))
1585 ctf_integer(short, ee_len, ext4_ext_get_actual_len(ex))
1586 ctf_integer(ext4_fsblk_t, pc_pclu, pc->pclu)
1587 ctf_integer(ext4_lblk_t, pc_lblk, pc->lblk)
1588 ctf_integer(int, pc_state, pc->state)
1589 )
1590 )
1591
1592 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,11,0))
1593
1594 LTTNG_TRACEPOINT_EVENT(ext4_ext_rm_leaf,
1595 TP_PROTO(struct inode *inode, ext4_lblk_t start,
1596 struct ext4_extent *ex,
1597 long long partial_cluster),
1598
1599 TP_ARGS(inode, start, ex, partial_cluster),
1600
1601 TP_FIELDS(
1602 ctf_integer(dev_t, dev, inode->i_sb->s_dev)
1603 ctf_integer(ino_t, ino, inode->i_ino)
1604 ctf_integer(long long, partial, partial_cluster)
1605 ctf_integer(ext4_lblk_t, start, start)
1606 ctf_integer(ext4_lblk_t, ee_lblk, le32_to_cpu(ex->ee_block))
1607 ctf_integer(ext4_fsblk_t, ee_pblk, ext4_ext_pblock(ex))
1608 ctf_integer(short, ee_len, ext4_ext_get_actual_len(ex))
1609 )
1610 )
1611
1612 #else
1613
1614 LTTNG_TRACEPOINT_EVENT(ext4_ext_rm_leaf,
1615 TP_PROTO(struct inode *inode, ext4_lblk_t start,
1616 struct ext4_extent *ex, ext4_fsblk_t partial_cluster),
1617
1618 TP_ARGS(inode, start, ex, partial_cluster),
1619
1620 TP_FIELDS(
1621 ctf_integer(dev_t, dev, inode->i_sb->s_dev)
1622 ctf_integer(ino_t, ino, inode->i_ino)
1623 ctf_integer(long long, partial, partial_cluster)
1624 ctf_integer(ext4_lblk_t, start, start)
1625 ctf_integer(ext4_lblk_t, ee_lblk, le32_to_cpu(ex->ee_block))
1626 ctf_integer(ext4_fsblk_t, ee_pblk, ext4_ext_pblock(ex))
1627 ctf_integer(short, ee_len, ext4_ext_get_actual_len(ex))
1628 )
1629 )
1630
1631 #endif
1632
1633 LTTNG_TRACEPOINT_EVENT(ext4_ext_rm_idx,
1634 TP_PROTO(struct inode *inode, ext4_fsblk_t pblk),
1635
1636 TP_ARGS(inode, pblk),
1637
1638 TP_FIELDS(
1639 ctf_integer(dev_t, dev, inode->i_sb->s_dev)
1640 ctf_integer(ino_t, ino, inode->i_ino)
1641 ctf_integer(ext4_fsblk_t, pblk, pblk)
1642 )
1643 )
1644
1645 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,11,0))
1646
1647 LTTNG_TRACEPOINT_EVENT(ext4_ext_remove_space,
1648 TP_PROTO(struct inode *inode, ext4_lblk_t start,
1649 ext4_lblk_t end, int depth),
1650
1651 TP_ARGS(inode, start, end, depth),
1652
1653 TP_FIELDS(
1654 ctf_integer(dev_t, dev, inode->i_sb->s_dev)
1655 ctf_integer(ino_t, ino, inode->i_ino)
1656 ctf_integer(ext4_lblk_t, start, start)
1657 ctf_integer(ext4_lblk_t, end, end)
1658 ctf_integer(int, depth, depth)
1659 )
1660 )
1661
1662 #else
1663
1664 LTTNG_TRACEPOINT_EVENT(ext4_ext_remove_space,
1665 TP_PROTO(struct inode *inode, ext4_lblk_t start, int depth),
1666
1667 TP_ARGS(inode, start, depth),
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_lblk_t, start, start)
1673 ctf_integer(int, depth, depth)
1674 )
1675 )
1676
1677 #endif
1678
1679 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,20,0) || \
1680 LTTNG_RHEL_KERNEL_RANGE(4,18,0,147,0,0, 4,19,0,0,0,0))
1681
1682 LTTNG_TRACEPOINT_EVENT(ext4_ext_remove_space_done,
1683 TP_PROTO(struct inode *inode, ext4_lblk_t start, ext4_lblk_t end,
1684 int depth, struct partial_cluster *pc, __le16 eh_entries),
1685
1686 TP_ARGS(inode, start, end, depth, pc, eh_entries),
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, start, start)
1692 ctf_integer(ext4_lblk_t, end, end)
1693 ctf_integer(int, depth, depth)
1694 ctf_integer(unsigned short, eh_entries, le16_to_cpu(eh_entries))
1695 ctf_integer(ext4_fsblk_t, pc_pclu, pc->pclu)
1696 ctf_integer(ext4_lblk_t, pc_lblk, pc->lblk)
1697 ctf_integer(int, pc_state, pc->state)
1698 )
1699 )
1700
1701 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,11,0))
1702
1703 LTTNG_TRACEPOINT_EVENT(ext4_ext_remove_space_done,
1704 TP_PROTO(struct inode *inode, ext4_lblk_t start, ext4_lblk_t end,
1705 int depth, long long partial, __le16 eh_entries),
1706
1707 TP_ARGS(inode, start, end, depth, partial, eh_entries),
1708
1709 TP_FIELDS(
1710 ctf_integer(dev_t, dev, inode->i_sb->s_dev)
1711 ctf_integer(ino_t, ino, inode->i_ino)
1712 ctf_integer(ext4_lblk_t, start, start)
1713 ctf_integer(ext4_lblk_t, end, end)
1714 ctf_integer(int, depth, depth)
1715 ctf_integer(long long, partial, partial)
1716 ctf_integer(unsigned short, eh_entries, le16_to_cpu(eh_entries))
1717 )
1718 )
1719
1720 #else
1721
1722 LTTNG_TRACEPOINT_EVENT(ext4_ext_remove_space_done,
1723 TP_PROTO(struct inode *inode, ext4_lblk_t start, int depth,
1724 ext4_lblk_t partial, unsigned short eh_entries),
1725
1726 TP_ARGS(inode, start, depth, partial, eh_entries),
1727
1728 TP_FIELDS(
1729 ctf_integer(dev_t, dev, inode->i_sb->s_dev)
1730 ctf_integer(ino_t, ino, inode->i_ino)
1731 ctf_integer(ext4_lblk_t, start, start)
1732 ctf_integer(int, depth, depth)
1733 ctf_integer(ext4_lblk_t, partial, partial)
1734 ctf_integer(unsigned short, eh_entries, eh_entries)
1735 )
1736 )
1737
1738 #endif
1739
1740 #endif
1741
1742 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0))
1743
1744 LTTNG_TRACEPOINT_EVENT_CLASS(ext4__es_extent,
1745 TP_PROTO(struct inode *inode, struct extent_status *es),
1746
1747 TP_ARGS(inode, es),
1748
1749 TP_FIELDS(
1750 ctf_integer(dev_t, dev, inode->i_sb->s_dev)
1751 ctf_integer(ino_t, ino, inode->i_ino)
1752 ctf_integer(ext4_lblk_t, lblk, es->es_lblk)
1753 ctf_integer(ext4_lblk_t, len, es->es_len)
1754 ctf_integer(ext4_fsblk_t, pblk, ext4_es_pblock(es))
1755 ctf_integer(char, status, ext4_es_status(es))
1756 )
1757 )
1758
1759 LTTNG_TRACEPOINT_EVENT_INSTANCE(ext4__es_extent, ext4_es_insert_extent,
1760 TP_PROTO(struct inode *inode, struct extent_status *es),
1761
1762 TP_ARGS(inode, es)
1763 )
1764
1765 LTTNG_TRACEPOINT_EVENT_INSTANCE(ext4__es_extent, ext4_es_cache_extent,
1766 TP_PROTO(struct inode *inode, struct extent_status *es),
1767
1768 TP_ARGS(inode, es)
1769 )
1770
1771 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,11,0))
1772
1773 LTTNG_TRACEPOINT_EVENT(ext4_es_insert_extent,
1774 TP_PROTO(struct inode *inode, struct extent_status *es),
1775
1776 TP_ARGS(inode, es),
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(ext4_lblk_t, lblk, es->es_lblk)
1782 ctf_integer(ext4_lblk_t, len, es->es_len)
1783 ctf_integer(ext4_fsblk_t, pblk, ext4_es_pblock(es))
1784 ctf_integer(char, status, ext4_es_status(es) >> 60)
1785 )
1786 )
1787
1788 LTTNG_TRACEPOINT_EVENT(ext4_es_remove_extent,
1789 TP_PROTO(struct inode *inode, ext4_lblk_t lblk, ext4_lblk_t len),
1790
1791 TP_ARGS(inode, lblk, len),
1792
1793 TP_FIELDS(
1794 ctf_integer(dev_t, dev, inode->i_sb->s_dev)
1795 ctf_integer(ino_t, ino, inode->i_ino)
1796 ctf_integer(loff_t, lblk, lblk)
1797 ctf_integer(loff_t, len, len)
1798 )
1799 )
1800
1801 LTTNG_TRACEPOINT_EVENT(ext4_es_find_delayed_extent_range_enter,
1802 TP_PROTO(struct inode *inode, ext4_lblk_t lblk),
1803
1804 TP_ARGS(inode, lblk),
1805
1806 TP_FIELDS(
1807 ctf_integer(dev_t, dev, inode->i_sb->s_dev)
1808 ctf_integer(ino_t, ino, inode->i_ino)
1809 ctf_integer(ext4_lblk_t, lblk, lblk)
1810 )
1811 )
1812
1813 LTTNG_TRACEPOINT_EVENT(ext4_es_find_delayed_extent_range_exit,
1814 TP_PROTO(struct inode *inode, struct extent_status *es),
1815
1816 TP_ARGS(inode, es),
1817
1818 TP_FIELDS(
1819 ctf_integer(dev_t, dev, inode->i_sb->s_dev)
1820 ctf_integer(ino_t, ino, inode->i_ino)
1821 ctf_integer(ext4_lblk_t, lblk, es->es_lblk)
1822 ctf_integer(ext4_lblk_t, len, es->es_len)
1823 ctf_integer(ext4_fsblk_t, pblk, ext4_es_pblock(es))
1824 ctf_integer(char, status, ext4_es_status(es) >> 60)
1825 )
1826 )
1827
1828 LTTNG_TRACEPOINT_EVENT(ext4_es_lookup_extent_enter,
1829 TP_PROTO(struct inode *inode, ext4_lblk_t lblk),
1830
1831 TP_ARGS(inode, lblk),
1832
1833 TP_FIELDS(
1834 ctf_integer(dev_t, dev, inode->i_sb->s_dev)
1835 ctf_integer(ino_t, ino, inode->i_ino)
1836 ctf_integer(ext4_lblk_t, lblk, lblk)
1837 )
1838 )
1839
1840 LTTNG_TRACEPOINT_EVENT(ext4_es_lookup_extent_exit,
1841 TP_PROTO(struct inode *inode, struct extent_status *es,
1842 int found),
1843
1844 TP_ARGS(inode, es, found),
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, lblk, es->es_lblk)
1850 ctf_integer(ext4_lblk_t, len, es->es_len)
1851 ctf_integer(ext4_fsblk_t, pblk, ext4_es_pblock(es))
1852 ctf_integer(char, status, ext4_es_status(es) >> 60)
1853 ctf_integer(int, found, found)
1854 )
1855 )
1856
1857 LTTNG_TRACEPOINT_EVENT(ext4_es_shrink_enter,
1858 TP_PROTO(struct super_block *sb, int nr_to_scan, int cache_cnt),
1859
1860 TP_ARGS(sb, nr_to_scan, cache_cnt),
1861
1862 TP_FIELDS(
1863 ctf_integer(dev_t, dev, sb->s_dev)
1864 ctf_integer(int, nr_to_scan, nr_to_scan)
1865 ctf_integer(int, cache_cnt, cache_cnt)
1866 )
1867 )
1868
1869 LTTNG_TRACEPOINT_EVENT(ext4_es_shrink_exit,
1870 TP_PROTO(struct super_block *sb, int shrunk_nr, int cache_cnt),
1871
1872 TP_ARGS(sb, shrunk_nr, cache_cnt),
1873
1874 TP_FIELDS(
1875 ctf_integer(dev_t, dev, sb->s_dev)
1876 ctf_integer(int, shrunk_nr, shrunk_nr)
1877 ctf_integer(int, cache_cnt, cache_cnt)
1878 )
1879 )
1880
1881 #endif
1882
1883 #endif /* LTTNG_TRACE_EXT4_H */
1884
1885 /* This part must be outside protection */
1886 #include <probes/define_trace.h>
This page took 0.079447 seconds and 4 git commands to generate.