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