]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blame - include/trace/events/ext4.h
ext4: fix type-widening bug in inode table readahead code
[mirror_ubuntu-artful-kernel.git] / include / trace / events / ext4.h
CommitLineData
9bffad1e
TT
1#undef TRACE_SYSTEM
2#define TRACE_SYSTEM ext4
3
d0b6e04a
LZ
4#if !defined(_TRACE_EXT4_H) || defined(TRACE_HEADER_MULTI_READ)
5#define _TRACE_EXT4_H
6
9bffad1e 7#include <linux/writeback.h>
9bffad1e
TT
8#include <linux/tracepoint.h>
9
3661d286
TT
10struct ext4_allocation_context;
11struct ext4_allocation_request;
6f91bc5f 12struct ext4_extent;
3661d286 13struct ext4_prealloc_space;
fb40ba0d 14struct ext4_inode_info;
0ef12249 15struct mpage_da_data;
d8990240
AK
16struct ext4_map_blocks;
17struct ext4_extent;
992e9fdd 18struct extent_status;
fb40ba0d
TT
19
20#define EXT4_I(inode) (container_of(inode, struct ext4_inode_info, vfs_inode))
3661d286 21
9bffad1e
TT
22TRACE_EVENT(ext4_free_inode,
23 TP_PROTO(struct inode *inode),
24
25 TP_ARGS(inode),
26
27 TP_STRUCT__entry(
0562e0ba 28 __field( dev_t, dev )
9bffad1e 29 __field( ino_t, ino )
9bffad1e
TT
30 __field( uid_t, uid )
31 __field( gid_t, gid )
a9c667f8 32 __field( __u64, blocks )
210c0526 33 __field( __u16, mode )
9bffad1e
TT
34 ),
35
36 TP_fast_assign(
0562e0ba 37 __entry->dev = inode->i_sb->s_dev;
9bffad1e 38 __entry->ino = inode->i_ino;
08cefc7a
EB
39 __entry->uid = i_uid_read(inode);
40 __entry->gid = i_gid_read(inode);
9bffad1e 41 __entry->blocks = inode->i_blocks;
210c0526 42 __entry->mode = inode->i_mode;
9bffad1e
TT
43 ),
44
a269029d 45 TP_printk("dev %d,%d ino %lu mode 0%o uid %u gid %u blocks %llu",
0562e0ba 46 MAJOR(__entry->dev), MINOR(__entry->dev),
a9c667f8
LC
47 (unsigned long) __entry->ino, __entry->mode,
48 __entry->uid, __entry->gid, __entry->blocks)
9bffad1e
TT
49);
50
51TRACE_EVENT(ext4_request_inode,
52 TP_PROTO(struct inode *dir, int mode),
53
54 TP_ARGS(dir, mode),
55
56 TP_STRUCT__entry(
0562e0ba 57 __field( dev_t, dev )
9bffad1e 58 __field( ino_t, dir )
59be8e72 59 __field( __u16, mode )
9bffad1e
TT
60 ),
61
62 TP_fast_assign(
0562e0ba 63 __entry->dev = dir->i_sb->s_dev;
9bffad1e
TT
64 __entry->dir = dir->i_ino;
65 __entry->mode = mode;
66 ),
67
a269029d 68 TP_printk("dev %d,%d dir %lu mode 0%o",
0562e0ba 69 MAJOR(__entry->dev), MINOR(__entry->dev),
a269029d 70 (unsigned long) __entry->dir, __entry->mode)
9bffad1e
TT
71);
72
73TRACE_EVENT(ext4_allocate_inode,
74 TP_PROTO(struct inode *inode, struct inode *dir, int mode),
75
76 TP_ARGS(inode, dir, mode),
77
78 TP_STRUCT__entry(
0562e0ba 79 __field( dev_t, dev )
9bffad1e
TT
80 __field( ino_t, ino )
81 __field( ino_t, dir )
59be8e72 82 __field( __u16, mode )
9bffad1e
TT
83 ),
84
85 TP_fast_assign(
0562e0ba 86 __entry->dev = inode->i_sb->s_dev;
9bffad1e
TT
87 __entry->ino = inode->i_ino;
88 __entry->dir = dir->i_ino;
89 __entry->mode = mode;
90 ),
91
a269029d 92 TP_printk("dev %d,%d ino %lu dir %lu mode 0%o",
0562e0ba 93 MAJOR(__entry->dev), MINOR(__entry->dev),
a269029d 94 (unsigned long) __entry->ino,
a3710fd1 95 (unsigned long) __entry->dir, __entry->mode)
9bffad1e
TT
96);
97
7ff9c073
TT
98TRACE_EVENT(ext4_evict_inode,
99 TP_PROTO(struct inode *inode),
100
101 TP_ARGS(inode),
102
103 TP_STRUCT__entry(
0562e0ba 104 __field( dev_t, dev )
7ff9c073
TT
105 __field( ino_t, ino )
106 __field( int, nlink )
107 ),
108
109 TP_fast_assign(
0562e0ba 110 __entry->dev = inode->i_sb->s_dev;
7ff9c073
TT
111 __entry->ino = inode->i_ino;
112 __entry->nlink = inode->i_nlink;
113 ),
114
115 TP_printk("dev %d,%d ino %lu nlink %d",
0562e0ba 116 MAJOR(__entry->dev), MINOR(__entry->dev),
7ff9c073
TT
117 (unsigned long) __entry->ino, __entry->nlink)
118);
119
120TRACE_EVENT(ext4_drop_inode,
121 TP_PROTO(struct inode *inode, int drop),
122
123 TP_ARGS(inode, drop),
124
125 TP_STRUCT__entry(
0562e0ba 126 __field( dev_t, dev )
7ff9c073
TT
127 __field( ino_t, ino )
128 __field( int, drop )
129 ),
130
131 TP_fast_assign(
0562e0ba 132 __entry->dev = inode->i_sb->s_dev;
7ff9c073
TT
133 __entry->ino = inode->i_ino;
134 __entry->drop = drop;
135 ),
136
137 TP_printk("dev %d,%d ino %lu drop %d",
0562e0ba 138 MAJOR(__entry->dev), MINOR(__entry->dev),
7ff9c073
TT
139 (unsigned long) __entry->ino, __entry->drop)
140);
141
142TRACE_EVENT(ext4_mark_inode_dirty,
143 TP_PROTO(struct inode *inode, unsigned long IP),
144
145 TP_ARGS(inode, IP),
146
147 TP_STRUCT__entry(
0562e0ba 148 __field( dev_t, dev )
7ff9c073
TT
149 __field( ino_t, ino )
150 __field(unsigned long, ip )
151 ),
152
153 TP_fast_assign(
0562e0ba 154 __entry->dev = inode->i_sb->s_dev;
7ff9c073
TT
155 __entry->ino = inode->i_ino;
156 __entry->ip = IP;
157 ),
158
159 TP_printk("dev %d,%d ino %lu caller %pF",
0562e0ba 160 MAJOR(__entry->dev), MINOR(__entry->dev),
7ff9c073
TT
161 (unsigned long) __entry->ino, (void *)__entry->ip)
162);
163
164TRACE_EVENT(ext4_begin_ordered_truncate,
165 TP_PROTO(struct inode *inode, loff_t new_size),
166
167 TP_ARGS(inode, new_size),
168
169 TP_STRUCT__entry(
0562e0ba 170 __field( dev_t, dev )
7ff9c073
TT
171 __field( ino_t, ino )
172 __field( loff_t, new_size )
173 ),
174
175 TP_fast_assign(
0562e0ba 176 __entry->dev = inode->i_sb->s_dev;
7ff9c073
TT
177 __entry->ino = inode->i_ino;
178 __entry->new_size = new_size;
179 ),
180
181 TP_printk("dev %d,%d ino %lu new_size %lld",
0562e0ba 182 MAJOR(__entry->dev), MINOR(__entry->dev),
7ff9c073 183 (unsigned long) __entry->ino,
a9c667f8 184 __entry->new_size)
7ff9c073
TT
185);
186
b5eb34c3 187DECLARE_EVENT_CLASS(ext4__write_begin,
9bffad1e
TT
188
189 TP_PROTO(struct inode *inode, loff_t pos, unsigned int len,
190 unsigned int flags),
191
192 TP_ARGS(inode, pos, len, flags),
193
194 TP_STRUCT__entry(
0562e0ba 195 __field( dev_t, dev )
9bffad1e
TT
196 __field( ino_t, ino )
197 __field( loff_t, pos )
198 __field( unsigned int, len )
199 __field( unsigned int, flags )
200 ),
201
202 TP_fast_assign(
0562e0ba 203 __entry->dev = inode->i_sb->s_dev;
9bffad1e
TT
204 __entry->ino = inode->i_ino;
205 __entry->pos = pos;
206 __entry->len = len;
207 __entry->flags = flags;
208 ),
209
a9c667f8 210 TP_printk("dev %d,%d ino %lu pos %lld len %u flags %u",
0562e0ba 211 MAJOR(__entry->dev), MINOR(__entry->dev),
a269029d 212 (unsigned long) __entry->ino,
a3710fd1 213 __entry->pos, __entry->len, __entry->flags)
9bffad1e
TT
214);
215
b5eb34c3
LZ
216DEFINE_EVENT(ext4__write_begin, ext4_write_begin,
217
218 TP_PROTO(struct inode *inode, loff_t pos, unsigned int len,
219 unsigned int flags),
220
221 TP_ARGS(inode, pos, len, flags)
222);
223
224DEFINE_EVENT(ext4__write_begin, ext4_da_write_begin,
225
226 TP_PROTO(struct inode *inode, loff_t pos, unsigned int len,
227 unsigned int flags),
228
229 TP_ARGS(inode, pos, len, flags)
230);
231
232DECLARE_EVENT_CLASS(ext4__write_end,
9bffad1e
TT
233 TP_PROTO(struct inode *inode, loff_t pos, unsigned int len,
234 unsigned int copied),
235
236 TP_ARGS(inode, pos, len, copied),
237
238 TP_STRUCT__entry(
0562e0ba 239 __field( dev_t, dev )
9bffad1e
TT
240 __field( ino_t, ino )
241 __field( loff_t, pos )
242 __field( unsigned int, len )
243 __field( unsigned int, copied )
244 ),
245
246 TP_fast_assign(
0562e0ba 247 __entry->dev = inode->i_sb->s_dev;
9bffad1e
TT
248 __entry->ino = inode->i_ino;
249 __entry->pos = pos;
250 __entry->len = len;
251 __entry->copied = copied;
252 ),
253
a9c667f8 254 TP_printk("dev %d,%d ino %lu pos %lld len %u copied %u",
0562e0ba
JZ
255 MAJOR(__entry->dev), MINOR(__entry->dev),
256 (unsigned long) __entry->ino,
257 __entry->pos, __entry->len, __entry->copied)
9bffad1e
TT
258);
259
74d553aa 260DEFINE_EVENT(ext4__write_end, ext4_write_end,
9bffad1e 261
b5eb34c3
LZ
262 TP_PROTO(struct inode *inode, loff_t pos, unsigned int len,
263 unsigned int copied),
9bffad1e 264
b5eb34c3 265 TP_ARGS(inode, pos, len, copied)
9bffad1e
TT
266);
267
b5eb34c3
LZ
268DEFINE_EVENT(ext4__write_end, ext4_journalled_write_end,
269
9bffad1e
TT
270 TP_PROTO(struct inode *inode, loff_t pos, unsigned int len,
271 unsigned int copied),
9bffad1e 272
b5eb34c3
LZ
273 TP_ARGS(inode, pos, len, copied)
274);
9bffad1e 275
b5eb34c3 276DEFINE_EVENT(ext4__write_end, ext4_da_write_end,
9bffad1e 277
b5eb34c3
LZ
278 TP_PROTO(struct inode *inode, loff_t pos, unsigned int len,
279 unsigned int copied),
280
281 TP_ARGS(inode, pos, len, copied)
9bffad1e
TT
282);
283
9bffad1e
TT
284TRACE_EVENT(ext4_da_writepages,
285 TP_PROTO(struct inode *inode, struct writeback_control *wbc),
286
287 TP_ARGS(inode, wbc),
288
289 TP_STRUCT__entry(
0562e0ba 290 __field( dev_t, dev )
9bffad1e
TT
291 __field( ino_t, ino )
292 __field( long, nr_to_write )
293 __field( long, pages_skipped )
294 __field( loff_t, range_start )
295 __field( loff_t, range_end )
210c0526 296 __field( pgoff_t, writeback_index )
0562e0ba 297 __field( int, sync_mode )
9bffad1e 298 __field( char, for_kupdate )
9bffad1e
TT
299 __field( char, range_cyclic )
300 ),
301
302 TP_fast_assign(
0562e0ba 303 __entry->dev = inode->i_sb->s_dev;
9bffad1e
TT
304 __entry->ino = inode->i_ino;
305 __entry->nr_to_write = wbc->nr_to_write;
306 __entry->pages_skipped = wbc->pages_skipped;
307 __entry->range_start = wbc->range_start;
308 __entry->range_end = wbc->range_end;
210c0526 309 __entry->writeback_index = inode->i_mapping->writeback_index;
0562e0ba 310 __entry->sync_mode = wbc->sync_mode;
9bffad1e 311 __entry->for_kupdate = wbc->for_kupdate;
9bffad1e
TT
312 __entry->range_cyclic = wbc->range_cyclic;
313 ),
314
a107e5a3 315 TP_printk("dev %d,%d ino %lu nr_to_write %ld pages_skipped %ld "
81370291 316 "range_start %lld range_end %lld sync_mode %d "
0562e0ba
JZ
317 "for_kupdate %d range_cyclic %d writeback_index %lu",
318 MAJOR(__entry->dev), MINOR(__entry->dev),
a3710fd1 319 (unsigned long) __entry->ino, __entry->nr_to_write,
9bffad1e 320 __entry->pages_skipped, __entry->range_start,
0562e0ba
JZ
321 __entry->range_end, __entry->sync_mode,
322 __entry->for_kupdate, __entry->range_cyclic,
55138e0b 323 (unsigned long) __entry->writeback_index)
9bffad1e
TT
324);
325
b3a3ca8c
TT
326TRACE_EVENT(ext4_da_write_pages,
327 TP_PROTO(struct inode *inode, struct mpage_da_data *mpd),
328
329 TP_ARGS(inode, mpd),
330
331 TP_STRUCT__entry(
0562e0ba 332 __field( dev_t, dev )
b3a3ca8c
TT
333 __field( ino_t, ino )
334 __field( __u64, b_blocknr )
335 __field( __u32, b_size )
336 __field( __u32, b_state )
337 __field( unsigned long, first_page )
338 __field( int, io_done )
339 __field( int, pages_written )
0562e0ba 340 __field( int, sync_mode )
b3a3ca8c
TT
341 ),
342
343 TP_fast_assign(
0562e0ba 344 __entry->dev = inode->i_sb->s_dev;
b3a3ca8c
TT
345 __entry->ino = inode->i_ino;
346 __entry->b_blocknr = mpd->b_blocknr;
347 __entry->b_size = mpd->b_size;
348 __entry->b_state = mpd->b_state;
349 __entry->first_page = mpd->first_page;
350 __entry->io_done = mpd->io_done;
351 __entry->pages_written = mpd->pages_written;
0562e0ba 352 __entry->sync_mode = mpd->wbc->sync_mode;
b3a3ca8c
TT
353 ),
354
0562e0ba
JZ
355 TP_printk("dev %d,%d ino %lu b_blocknr %llu b_size %u b_state 0x%04x "
356 "first_page %lu io_done %d pages_written %d sync_mode %d",
357 MAJOR(__entry->dev), MINOR(__entry->dev),
a269029d 358 (unsigned long) __entry->ino,
b3a3ca8c
TT
359 __entry->b_blocknr, __entry->b_size,
360 __entry->b_state, __entry->first_page,
0562e0ba
JZ
361 __entry->io_done, __entry->pages_written,
362 __entry->sync_mode
363 )
b3a3ca8c
TT
364);
365
9bffad1e
TT
366TRACE_EVENT(ext4_da_writepages_result,
367 TP_PROTO(struct inode *inode, struct writeback_control *wbc,
368 int ret, int pages_written),
369
370 TP_ARGS(inode, wbc, ret, pages_written),
371
372 TP_STRUCT__entry(
0562e0ba 373 __field( dev_t, dev )
9bffad1e
TT
374 __field( ino_t, ino )
375 __field( int, ret )
376 __field( int, pages_written )
377 __field( long, pages_skipped )
55138e0b 378 __field( pgoff_t, writeback_index )
210c0526 379 __field( int, sync_mode )
9bffad1e
TT
380 ),
381
382 TP_fast_assign(
0562e0ba 383 __entry->dev = inode->i_sb->s_dev;
9bffad1e
TT
384 __entry->ino = inode->i_ino;
385 __entry->ret = ret;
386 __entry->pages_written = pages_written;
387 __entry->pages_skipped = wbc->pages_skipped;
55138e0b 388 __entry->writeback_index = inode->i_mapping->writeback_index;
210c0526 389 __entry->sync_mode = wbc->sync_mode;
9bffad1e
TT
390 ),
391
0562e0ba 392 TP_printk("dev %d,%d ino %lu ret %d pages_written %d pages_skipped %ld "
b7a2441f 393 "sync_mode %d writeback_index %lu",
0562e0ba 394 MAJOR(__entry->dev), MINOR(__entry->dev),
a3710fd1 395 (unsigned long) __entry->ino, __entry->ret,
9bffad1e 396 __entry->pages_written, __entry->pages_skipped,
b7a2441f 397 __entry->sync_mode,
55138e0b 398 (unsigned long) __entry->writeback_index)
9bffad1e
TT
399);
400
0562e0ba
JZ
401DECLARE_EVENT_CLASS(ext4__page_op,
402 TP_PROTO(struct page *page),
403
404 TP_ARGS(page),
405
406 TP_STRUCT__entry(
0562e0ba 407 __field( dev_t, dev )
210c0526
AP
408 __field( ino_t, ino )
409 __field( pgoff_t, index )
0562e0ba
JZ
410
411 ),
412
413 TP_fast_assign(
0562e0ba 414 __entry->dev = page->mapping->host->i_sb->s_dev;
210c0526
AP
415 __entry->ino = page->mapping->host->i_ino;
416 __entry->index = page->index;
0562e0ba
JZ
417 ),
418
419 TP_printk("dev %d,%d ino %lu page_index %lu",
420 MAJOR(__entry->dev), MINOR(__entry->dev),
421 (unsigned long) __entry->ino,
a9c667f8
LC
422 (unsigned long) __entry->index)
423);
424
425DEFINE_EVENT(ext4__page_op, ext4_writepage,
426
427 TP_PROTO(struct page *page),
428
429 TP_ARGS(page)
0562e0ba
JZ
430);
431
432DEFINE_EVENT(ext4__page_op, ext4_readpage,
433
434 TP_PROTO(struct page *page),
435
436 TP_ARGS(page)
437);
438
439DEFINE_EVENT(ext4__page_op, ext4_releasepage,
440
441 TP_PROTO(struct page *page),
442
443 TP_ARGS(page)
444);
445
4520fb3c 446DECLARE_EVENT_CLASS(ext4_invalidatepage_op,
0562e0ba
JZ
447 TP_PROTO(struct page *page, unsigned long offset),
448
449 TP_ARGS(page, offset),
450
451 TP_STRUCT__entry(
210c0526
AP
452 __field( dev_t, dev )
453 __field( ino_t, ino )
0562e0ba
JZ
454 __field( pgoff_t, index )
455 __field( unsigned long, offset )
0562e0ba
JZ
456
457 ),
458
459 TP_fast_assign(
210c0526
AP
460 __entry->dev = page->mapping->host->i_sb->s_dev;
461 __entry->ino = page->mapping->host->i_ino;
0562e0ba
JZ
462 __entry->index = page->index;
463 __entry->offset = offset;
0562e0ba
JZ
464 ),
465
466 TP_printk("dev %d,%d ino %lu page_index %lu offset %lu",
467 MAJOR(__entry->dev), MINOR(__entry->dev),
468 (unsigned long) __entry->ino,
a9c667f8 469 (unsigned long) __entry->index, __entry->offset)
0562e0ba
JZ
470);
471
4520fb3c
JK
472DEFINE_EVENT(ext4_invalidatepage_op, ext4_invalidatepage,
473 TP_PROTO(struct page *page, unsigned long offset),
474
475 TP_ARGS(page, offset)
476);
477
478DEFINE_EVENT(ext4_invalidatepage_op, ext4_journalled_invalidatepage,
479 TP_PROTO(struct page *page, unsigned long offset),
480
481 TP_ARGS(page, offset)
482);
483
9bffad1e
TT
484TRACE_EVENT(ext4_discard_blocks,
485 TP_PROTO(struct super_block *sb, unsigned long long blk,
486 unsigned long long count),
487
488 TP_ARGS(sb, blk, count),
489
490 TP_STRUCT__entry(
0562e0ba 491 __field( dev_t, dev )
9bffad1e
TT
492 __field( __u64, blk )
493 __field( __u64, count )
494
495 ),
496
497 TP_fast_assign(
0562e0ba 498 __entry->dev = sb->s_dev;
9bffad1e
TT
499 __entry->blk = blk;
500 __entry->count = count;
501 ),
502
a269029d 503 TP_printk("dev %d,%d blk %llu count %llu",
0562e0ba 504 MAJOR(__entry->dev), MINOR(__entry->dev),
a269029d 505 __entry->blk, __entry->count)
9bffad1e
TT
506);
507
f084db93 508DECLARE_EVENT_CLASS(ext4__mb_new_pa,
9bffad1e
TT
509 TP_PROTO(struct ext4_allocation_context *ac,
510 struct ext4_prealloc_space *pa),
511
512 TP_ARGS(ac, pa),
513
514 TP_STRUCT__entry(
0562e0ba 515 __field( dev_t, dev )
9bffad1e
TT
516 __field( ino_t, ino )
517 __field( __u64, pa_pstart )
9bffad1e 518 __field( __u64, pa_lstart )
210c0526 519 __field( __u32, pa_len )
9bffad1e
TT
520
521 ),
522
523 TP_fast_assign(
0562e0ba 524 __entry->dev = ac->ac_sb->s_dev;
9bffad1e
TT
525 __entry->ino = ac->ac_inode->i_ino;
526 __entry->pa_pstart = pa->pa_pstart;
9bffad1e 527 __entry->pa_lstart = pa->pa_lstart;
210c0526 528 __entry->pa_len = pa->pa_len;
9bffad1e
TT
529 ),
530
a269029d 531 TP_printk("dev %d,%d ino %lu pstart %llu len %u lstart %llu",
0562e0ba
JZ
532 MAJOR(__entry->dev), MINOR(__entry->dev),
533 (unsigned long) __entry->ino,
534 __entry->pa_pstart, __entry->pa_len, __entry->pa_lstart)
9bffad1e
TT
535);
536
f084db93
LZ
537DEFINE_EVENT(ext4__mb_new_pa, ext4_mb_new_inode_pa,
538
9bffad1e
TT
539 TP_PROTO(struct ext4_allocation_context *ac,
540 struct ext4_prealloc_space *pa),
541
f084db93
LZ
542 TP_ARGS(ac, pa)
543);
9bffad1e 544
f084db93 545DEFINE_EVENT(ext4__mb_new_pa, ext4_mb_new_group_pa,
9bffad1e 546
f084db93
LZ
547 TP_PROTO(struct ext4_allocation_context *ac,
548 struct ext4_prealloc_space *pa),
9bffad1e 549
f084db93 550 TP_ARGS(ac, pa)
9bffad1e
TT
551);
552
553TRACE_EVENT(ext4_mb_release_inode_pa,
a9c667f8 554 TP_PROTO(struct ext4_prealloc_space *pa,
9bffad1e
TT
555 unsigned long long block, unsigned int count),
556
a9c667f8 557 TP_ARGS(pa, block, count),
9bffad1e
TT
558
559 TP_STRUCT__entry(
0562e0ba 560 __field( dev_t, dev )
9bffad1e
TT
561 __field( ino_t, ino )
562 __field( __u64, block )
563 __field( __u32, count )
564
565 ),
566
567 TP_fast_assign(
a9c667f8
LC
568 __entry->dev = pa->pa_inode->i_sb->s_dev;
569 __entry->ino = pa->pa_inode->i_ino;
9bffad1e
TT
570 __entry->block = block;
571 __entry->count = count;
572 ),
573
a269029d 574 TP_printk("dev %d,%d ino %lu block %llu count %u",
0562e0ba
JZ
575 MAJOR(__entry->dev), MINOR(__entry->dev),
576 (unsigned long) __entry->ino,
577 __entry->block, __entry->count)
9bffad1e
TT
578);
579
580TRACE_EVENT(ext4_mb_release_group_pa,
60e07cf5 581 TP_PROTO(struct super_block *sb, struct ext4_prealloc_space *pa),
9bffad1e 582
60e07cf5 583 TP_ARGS(sb, pa),
9bffad1e
TT
584
585 TP_STRUCT__entry(
0562e0ba 586 __field( dev_t, dev )
9bffad1e
TT
587 __field( __u64, pa_pstart )
588 __field( __u32, pa_len )
589
590 ),
591
592 TP_fast_assign(
60e07cf5 593 __entry->dev = sb->s_dev;
9bffad1e
TT
594 __entry->pa_pstart = pa->pa_pstart;
595 __entry->pa_len = pa->pa_len;
596 ),
597
a269029d 598 TP_printk("dev %d,%d pstart %llu len %u",
0562e0ba 599 MAJOR(__entry->dev), MINOR(__entry->dev),
a269029d 600 __entry->pa_pstart, __entry->pa_len)
9bffad1e
TT
601);
602
603TRACE_EVENT(ext4_discard_preallocations,
604 TP_PROTO(struct inode *inode),
605
606 TP_ARGS(inode),
607
608 TP_STRUCT__entry(
0562e0ba 609 __field( dev_t, dev )
9bffad1e
TT
610 __field( ino_t, ino )
611
612 ),
613
614 TP_fast_assign(
0562e0ba 615 __entry->dev = inode->i_sb->s_dev;
9bffad1e
TT
616 __entry->ino = inode->i_ino;
617 ),
618
a269029d 619 TP_printk("dev %d,%d ino %lu",
0562e0ba 620 MAJOR(__entry->dev), MINOR(__entry->dev),
a269029d 621 (unsigned long) __entry->ino)
9bffad1e
TT
622);
623
624TRACE_EVENT(ext4_mb_discard_preallocations,
625 TP_PROTO(struct super_block *sb, int needed),
626
627 TP_ARGS(sb, needed),
628
629 TP_STRUCT__entry(
0562e0ba 630 __field( dev_t, dev )
9bffad1e
TT
631 __field( int, needed )
632
633 ),
634
635 TP_fast_assign(
0562e0ba 636 __entry->dev = sb->s_dev;
9bffad1e
TT
637 __entry->needed = needed;
638 ),
639
a269029d 640 TP_printk("dev %d,%d needed %d",
0562e0ba
JZ
641 MAJOR(__entry->dev), MINOR(__entry->dev),
642 __entry->needed)
9bffad1e
TT
643);
644
645TRACE_EVENT(ext4_request_blocks,
646 TP_PROTO(struct ext4_allocation_request *ar),
647
648 TP_ARGS(ar),
649
650 TP_STRUCT__entry(
0562e0ba 651 __field( dev_t, dev )
9bffad1e 652 __field( ino_t, ino )
9bffad1e 653 __field( unsigned int, len )
a9c667f8
LC
654 __field( __u32, logical )
655 __field( __u32, lleft )
656 __field( __u32, lright )
9bffad1e 657 __field( __u64, goal )
9bffad1e
TT
658 __field( __u64, pleft )
659 __field( __u64, pright )
210c0526 660 __field( unsigned int, flags )
9bffad1e
TT
661 ),
662
663 TP_fast_assign(
0562e0ba 664 __entry->dev = ar->inode->i_sb->s_dev;
9bffad1e 665 __entry->ino = ar->inode->i_ino;
9bffad1e
TT
666 __entry->len = ar->len;
667 __entry->logical = ar->logical;
668 __entry->goal = ar->goal;
669 __entry->lleft = ar->lleft;
670 __entry->lright = ar->lright;
671 __entry->pleft = ar->pleft;
672 __entry->pright = ar->pright;
210c0526 673 __entry->flags = ar->flags;
9bffad1e
TT
674 ),
675
a9c667f8
LC
676 TP_printk("dev %d,%d ino %lu flags %u len %u lblk %u goal %llu "
677 "lleft %u lright %u pleft %llu pright %llu ",
0562e0ba 678 MAJOR(__entry->dev), MINOR(__entry->dev),
a9c667f8
LC
679 (unsigned long) __entry->ino, __entry->flags,
680 __entry->len, __entry->logical, __entry->goal,
681 __entry->lleft, __entry->lright, __entry->pleft,
682 __entry->pright)
9bffad1e
TT
683);
684
685TRACE_EVENT(ext4_allocate_blocks,
686 TP_PROTO(struct ext4_allocation_request *ar, unsigned long long block),
687
688 TP_ARGS(ar, block),
689
690 TP_STRUCT__entry(
0562e0ba 691 __field( dev_t, dev )
9bffad1e
TT
692 __field( ino_t, ino )
693 __field( __u64, block )
9bffad1e 694 __field( unsigned int, len )
a9c667f8
LC
695 __field( __u32, logical )
696 __field( __u32, lleft )
697 __field( __u32, lright )
9bffad1e 698 __field( __u64, goal )
9bffad1e
TT
699 __field( __u64, pleft )
700 __field( __u64, pright )
210c0526 701 __field( unsigned int, flags )
9bffad1e
TT
702 ),
703
704 TP_fast_assign(
0562e0ba 705 __entry->dev = ar->inode->i_sb->s_dev;
9bffad1e
TT
706 __entry->ino = ar->inode->i_ino;
707 __entry->block = block;
9bffad1e
TT
708 __entry->len = ar->len;
709 __entry->logical = ar->logical;
710 __entry->goal = ar->goal;
711 __entry->lleft = ar->lleft;
712 __entry->lright = ar->lright;
713 __entry->pleft = ar->pleft;
714 __entry->pright = ar->pright;
210c0526 715 __entry->flags = ar->flags;
9bffad1e
TT
716 ),
717
a9c667f8
LC
718 TP_printk("dev %d,%d ino %lu flags %u len %u block %llu lblk %u "
719 "goal %llu lleft %u lright %u pleft %llu pright %llu",
0562e0ba 720 MAJOR(__entry->dev), MINOR(__entry->dev),
a9c667f8
LC
721 (unsigned long) __entry->ino, __entry->flags,
722 __entry->len, __entry->block, __entry->logical,
723 __entry->goal, __entry->lleft, __entry->lright,
724 __entry->pleft, __entry->pright)
9bffad1e
TT
725);
726
727TRACE_EVENT(ext4_free_blocks,
728 TP_PROTO(struct inode *inode, __u64 block, unsigned long count,
e6362609 729 int flags),
9bffad1e 730
e6362609 731 TP_ARGS(inode, block, count, flags),
9bffad1e
TT
732
733 TP_STRUCT__entry(
0562e0ba 734 __field( dev_t, dev )
9bffad1e
TT
735 __field( ino_t, ino )
736 __field( __u64, block )
737 __field( unsigned long, count )
a9c667f8 738 __field( int, flags )
210c0526 739 __field( __u16, mode )
9bffad1e
TT
740 ),
741
742 TP_fast_assign(
0562e0ba 743 __entry->dev = inode->i_sb->s_dev;
9bffad1e
TT
744 __entry->ino = inode->i_ino;
745 __entry->block = block;
746 __entry->count = count;
e6362609 747 __entry->flags = flags;
210c0526 748 __entry->mode = inode->i_mode;
9bffad1e
TT
749 ),
750
a269029d 751 TP_printk("dev %d,%d ino %lu mode 0%o block %llu count %lu flags %d",
0562e0ba 752 MAJOR(__entry->dev), MINOR(__entry->dev),
a269029d 753 (unsigned long) __entry->ino,
e6362609
TT
754 __entry->mode, __entry->block, __entry->count,
755 __entry->flags)
9bffad1e
TT
756);
757
0562e0ba 758TRACE_EVENT(ext4_sync_file_enter,
7ea80859 759 TP_PROTO(struct file *file, int datasync),
9bffad1e 760
7ea80859 761 TP_ARGS(file, datasync),
9bffad1e
TT
762
763 TP_STRUCT__entry(
0562e0ba 764 __field( dev_t, dev )
9bffad1e
TT
765 __field( ino_t, ino )
766 __field( ino_t, parent )
767 __field( int, datasync )
768 ),
769
770 TP_fast_assign(
7ea80859
CH
771 struct dentry *dentry = file->f_path.dentry;
772
0562e0ba 773 __entry->dev = dentry->d_inode->i_sb->s_dev;
9bffad1e
TT
774 __entry->ino = dentry->d_inode->i_ino;
775 __entry->datasync = datasync;
776 __entry->parent = dentry->d_parent->d_inode->i_ino;
777 ),
778
a9c667f8 779 TP_printk("dev %d,%d ino %lu parent %lu datasync %d ",
0562e0ba 780 MAJOR(__entry->dev), MINOR(__entry->dev),
a269029d 781 (unsigned long) __entry->ino,
a3710fd1 782 (unsigned long) __entry->parent, __entry->datasync)
9bffad1e
TT
783);
784
0562e0ba
JZ
785TRACE_EVENT(ext4_sync_file_exit,
786 TP_PROTO(struct inode *inode, int ret),
787
788 TP_ARGS(inode, ret),
789
790 TP_STRUCT__entry(
0562e0ba 791 __field( dev_t, dev )
210c0526
AP
792 __field( ino_t, ino )
793 __field( int, ret )
0562e0ba
JZ
794 ),
795
796 TP_fast_assign(
0562e0ba 797 __entry->dev = inode->i_sb->s_dev;
210c0526
AP
798 __entry->ino = inode->i_ino;
799 __entry->ret = ret;
0562e0ba
JZ
800 ),
801
a9c667f8 802 TP_printk("dev %d,%d ino %lu ret %d",
0562e0ba
JZ
803 MAJOR(__entry->dev), MINOR(__entry->dev),
804 (unsigned long) __entry->ino,
805 __entry->ret)
806);
807
9bffad1e
TT
808TRACE_EVENT(ext4_sync_fs,
809 TP_PROTO(struct super_block *sb, int wait),
810
811 TP_ARGS(sb, wait),
812
813 TP_STRUCT__entry(
0562e0ba 814 __field( dev_t, dev )
9bffad1e
TT
815 __field( int, wait )
816
817 ),
818
819 TP_fast_assign(
0562e0ba 820 __entry->dev = sb->s_dev;
9bffad1e
TT
821 __entry->wait = wait;
822 ),
823
0562e0ba
JZ
824 TP_printk("dev %d,%d wait %d",
825 MAJOR(__entry->dev), MINOR(__entry->dev),
826 __entry->wait)
9bffad1e
TT
827);
828
fb40ba0d
TT
829TRACE_EVENT(ext4_alloc_da_blocks,
830 TP_PROTO(struct inode *inode),
831
832 TP_ARGS(inode),
833
834 TP_STRUCT__entry(
0562e0ba 835 __field( dev_t, dev )
fb40ba0d
TT
836 __field( ino_t, ino )
837 __field( unsigned int, data_blocks )
838 __field( unsigned int, meta_blocks )
839 ),
840
841 TP_fast_assign(
0562e0ba 842 __entry->dev = inode->i_sb->s_dev;
fb40ba0d
TT
843 __entry->ino = inode->i_ino;
844 __entry->data_blocks = EXT4_I(inode)->i_reserved_data_blocks;
845 __entry->meta_blocks = EXT4_I(inode)->i_reserved_meta_blocks;
846 ),
847
a269029d 848 TP_printk("dev %d,%d ino %lu data_blocks %u meta_blocks %u",
0562e0ba 849 MAJOR(__entry->dev), MINOR(__entry->dev),
a269029d 850 (unsigned long) __entry->ino,
fb40ba0d
TT
851 __entry->data_blocks, __entry->meta_blocks)
852);
853
296c355c
TT
854TRACE_EVENT(ext4_mballoc_alloc,
855 TP_PROTO(struct ext4_allocation_context *ac),
856
857 TP_ARGS(ac),
858
859 TP_STRUCT__entry(
0562e0ba 860 __field( dev_t, dev )
296c355c 861 __field( ino_t, ino )
296c355c
TT
862 __field( __u32, orig_logical )
863 __field( int, orig_start )
864 __field( __u32, orig_group )
865 __field( int, orig_len )
866 __field( __u32, goal_logical )
867 __field( int, goal_start )
868 __field( __u32, goal_group )
869 __field( int, goal_len )
870 __field( __u32, result_logical )
871 __field( int, result_start )
872 __field( __u32, result_group )
873 __field( int, result_len )
210c0526
AP
874 __field( __u16, found )
875 __field( __u16, groups )
876 __field( __u16, buddy )
877 __field( __u16, flags )
878 __field( __u16, tail )
879 __field( __u8, cr )
296c355c
TT
880 ),
881
882 TP_fast_assign(
0562e0ba 883 __entry->dev = ac->ac_inode->i_sb->s_dev;
296c355c 884 __entry->ino = ac->ac_inode->i_ino;
296c355c
TT
885 __entry->orig_logical = ac->ac_o_ex.fe_logical;
886 __entry->orig_start = ac->ac_o_ex.fe_start;
887 __entry->orig_group = ac->ac_o_ex.fe_group;
888 __entry->orig_len = ac->ac_o_ex.fe_len;
889 __entry->goal_logical = ac->ac_g_ex.fe_logical;
890 __entry->goal_start = ac->ac_g_ex.fe_start;
891 __entry->goal_group = ac->ac_g_ex.fe_group;
892 __entry->goal_len = ac->ac_g_ex.fe_len;
893 __entry->result_logical = ac->ac_f_ex.fe_logical;
894 __entry->result_start = ac->ac_f_ex.fe_start;
895 __entry->result_group = ac->ac_f_ex.fe_group;
896 __entry->result_len = ac->ac_f_ex.fe_len;
210c0526
AP
897 __entry->found = ac->ac_found;
898 __entry->flags = ac->ac_flags;
899 __entry->groups = ac->ac_groups_scanned;
900 __entry->buddy = ac->ac_buddy;
901 __entry->tail = ac->ac_tail;
902 __entry->cr = ac->ac_criteria;
296c355c
TT
903 ),
904
a269029d 905 TP_printk("dev %d,%d inode %lu orig %u/%d/%u@%u goal %u/%d/%u@%u "
296c355c
TT
906 "result %u/%d/%u@%u blks %u grps %u cr %u flags 0x%04x "
907 "tail %u broken %u",
0562e0ba 908 MAJOR(__entry->dev), MINOR(__entry->dev),
a269029d 909 (unsigned long) __entry->ino,
296c355c
TT
910 __entry->orig_group, __entry->orig_start,
911 __entry->orig_len, __entry->orig_logical,
912 __entry->goal_group, __entry->goal_start,
913 __entry->goal_len, __entry->goal_logical,
914 __entry->result_group, __entry->result_start,
915 __entry->result_len, __entry->result_logical,
916 __entry->found, __entry->groups, __entry->cr,
917 __entry->flags, __entry->tail,
918 __entry->buddy ? 1 << __entry->buddy : 0)
919);
920
921TRACE_EVENT(ext4_mballoc_prealloc,
922 TP_PROTO(struct ext4_allocation_context *ac),
923
924 TP_ARGS(ac),
925
926 TP_STRUCT__entry(
0562e0ba 927 __field( dev_t, dev )
296c355c
TT
928 __field( ino_t, ino )
929 __field( __u32, orig_logical )
930 __field( int, orig_start )
931 __field( __u32, orig_group )
932 __field( int, orig_len )
933 __field( __u32, result_logical )
934 __field( int, result_start )
935 __field( __u32, result_group )
936 __field( int, result_len )
937 ),
938
939 TP_fast_assign(
0562e0ba 940 __entry->dev = ac->ac_inode->i_sb->s_dev;
296c355c
TT
941 __entry->ino = ac->ac_inode->i_ino;
942 __entry->orig_logical = ac->ac_o_ex.fe_logical;
943 __entry->orig_start = ac->ac_o_ex.fe_start;
944 __entry->orig_group = ac->ac_o_ex.fe_group;
945 __entry->orig_len = ac->ac_o_ex.fe_len;
946 __entry->result_logical = ac->ac_b_ex.fe_logical;
947 __entry->result_start = ac->ac_b_ex.fe_start;
948 __entry->result_group = ac->ac_b_ex.fe_group;
949 __entry->result_len = ac->ac_b_ex.fe_len;
950 ),
951
a269029d 952 TP_printk("dev %d,%d inode %lu orig %u/%d/%u@%u result %u/%d/%u@%u",
0562e0ba 953 MAJOR(__entry->dev), MINOR(__entry->dev),
a269029d 954 (unsigned long) __entry->ino,
296c355c
TT
955 __entry->orig_group, __entry->orig_start,
956 __entry->orig_len, __entry->orig_logical,
957 __entry->result_group, __entry->result_start,
958 __entry->result_len, __entry->result_logical)
959);
960
f084db93 961DECLARE_EVENT_CLASS(ext4__mballoc,
3e1e5f50
ES
962 TP_PROTO(struct super_block *sb,
963 struct inode *inode,
964 ext4_group_t group,
965 ext4_grpblk_t start,
966 ext4_grpblk_t len),
296c355c 967
3e1e5f50 968 TP_ARGS(sb, inode, group, start, len),
296c355c
TT
969
970 TP_STRUCT__entry(
0562e0ba 971 __field( dev_t, dev )
296c355c 972 __field( ino_t, ino )
296c355c
TT
973 __field( int, result_start )
974 __field( __u32, result_group )
975 __field( int, result_len )
976 ),
977
978 TP_fast_assign(
0562e0ba 979 __entry->dev = sb->s_dev;
3e1e5f50
ES
980 __entry->ino = inode ? inode->i_ino : 0;
981 __entry->result_start = start;
982 __entry->result_group = group;
983 __entry->result_len = len;
296c355c
TT
984 ),
985
a9c667f8 986 TP_printk("dev %d,%d inode %lu extent %u/%d/%d ",
0562e0ba 987 MAJOR(__entry->dev), MINOR(__entry->dev),
a269029d 988 (unsigned long) __entry->ino,
296c355c 989 __entry->result_group, __entry->result_start,
3e1e5f50 990 __entry->result_len)
296c355c
TT
991);
992
f084db93
LZ
993DEFINE_EVENT(ext4__mballoc, ext4_mballoc_discard,
994
3e1e5f50
ES
995 TP_PROTO(struct super_block *sb,
996 struct inode *inode,
997 ext4_group_t group,
998 ext4_grpblk_t start,
999 ext4_grpblk_t len),
296c355c 1000
3e1e5f50 1001 TP_ARGS(sb, inode, group, start, len)
f084db93 1002);
296c355c 1003
f084db93 1004DEFINE_EVENT(ext4__mballoc, ext4_mballoc_free,
296c355c 1005
3e1e5f50
ES
1006 TP_PROTO(struct super_block *sb,
1007 struct inode *inode,
1008 ext4_group_t group,
1009 ext4_grpblk_t start,
1010 ext4_grpblk_t len),
296c355c 1011
3e1e5f50 1012 TP_ARGS(sb, inode, group, start, len)
296c355c
TT
1013);
1014
beac2da7
TT
1015TRACE_EVENT(ext4_forget,
1016 TP_PROTO(struct inode *inode, int is_metadata, __u64 block),
1017
1018 TP_ARGS(inode, is_metadata, block),
1019
1020 TP_STRUCT__entry(
0562e0ba 1021 __field( dev_t, dev )
beac2da7 1022 __field( ino_t, ino )
beac2da7 1023 __field( __u64, block )
210c0526
AP
1024 __field( int, is_metadata )
1025 __field( __u16, mode )
beac2da7
TT
1026 ),
1027
1028 TP_fast_assign(
0562e0ba 1029 __entry->dev = inode->i_sb->s_dev;
beac2da7 1030 __entry->ino = inode->i_ino;
beac2da7 1031 __entry->block = block;
210c0526
AP
1032 __entry->is_metadata = is_metadata;
1033 __entry->mode = inode->i_mode;
beac2da7
TT
1034 ),
1035
a269029d 1036 TP_printk("dev %d,%d ino %lu mode 0%o is_metadata %d block %llu",
0562e0ba
JZ
1037 MAJOR(__entry->dev), MINOR(__entry->dev),
1038 (unsigned long) __entry->ino,
1039 __entry->mode, __entry->is_metadata, __entry->block)
beac2da7
TT
1040);
1041
f8ec9d68 1042TRACE_EVENT(ext4_da_update_reserve_space,
d8990240 1043 TP_PROTO(struct inode *inode, int used_blocks, int quota_claim),
f8ec9d68 1044
d8990240 1045 TP_ARGS(inode, used_blocks, quota_claim),
f8ec9d68
TT
1046
1047 TP_STRUCT__entry(
0562e0ba 1048 __field( dev_t, dev )
f8ec9d68 1049 __field( ino_t, ino )
f8ec9d68
TT
1050 __field( __u64, i_blocks )
1051 __field( int, used_blocks )
1052 __field( int, reserved_data_blocks )
1053 __field( int, reserved_meta_blocks )
1054 __field( int, allocated_meta_blocks )
d8990240 1055 __field( int, quota_claim )
210c0526 1056 __field( __u16, mode )
f8ec9d68
TT
1057 ),
1058
1059 TP_fast_assign(
0562e0ba 1060 __entry->dev = inode->i_sb->s_dev;
f8ec9d68 1061 __entry->ino = inode->i_ino;
f8ec9d68
TT
1062 __entry->i_blocks = inode->i_blocks;
1063 __entry->used_blocks = used_blocks;
d8990240
AK
1064 __entry->reserved_data_blocks =
1065 EXT4_I(inode)->i_reserved_data_blocks;
1066 __entry->reserved_meta_blocks =
1067 EXT4_I(inode)->i_reserved_meta_blocks;
1068 __entry->allocated_meta_blocks =
1069 EXT4_I(inode)->i_allocated_meta_blocks;
1070 __entry->quota_claim = quota_claim;
210c0526 1071 __entry->mode = inode->i_mode;
f8ec9d68
TT
1072 ),
1073
0562e0ba
JZ
1074 TP_printk("dev %d,%d ino %lu mode 0%o i_blocks %llu used_blocks %d "
1075 "reserved_data_blocks %d reserved_meta_blocks %d "
d8990240 1076 "allocated_meta_blocks %d quota_claim %d",
0562e0ba
JZ
1077 MAJOR(__entry->dev), MINOR(__entry->dev),
1078 (unsigned long) __entry->ino,
a9c667f8 1079 __entry->mode, __entry->i_blocks,
f8ec9d68 1080 __entry->used_blocks, __entry->reserved_data_blocks,
d8990240
AK
1081 __entry->reserved_meta_blocks, __entry->allocated_meta_blocks,
1082 __entry->quota_claim)
f8ec9d68
TT
1083);
1084
1085TRACE_EVENT(ext4_da_reserve_space,
1086 TP_PROTO(struct inode *inode, int md_needed),
1087
1088 TP_ARGS(inode, md_needed),
1089
1090 TP_STRUCT__entry(
0562e0ba 1091 __field( dev_t, dev )
f8ec9d68 1092 __field( ino_t, ino )
f8ec9d68
TT
1093 __field( __u64, i_blocks )
1094 __field( int, md_needed )
1095 __field( int, reserved_data_blocks )
1096 __field( int, reserved_meta_blocks )
210c0526 1097 __field( __u16, mode )
f8ec9d68
TT
1098 ),
1099
1100 TP_fast_assign(
0562e0ba 1101 __entry->dev = inode->i_sb->s_dev;
f8ec9d68 1102 __entry->ino = inode->i_ino;
f8ec9d68
TT
1103 __entry->i_blocks = inode->i_blocks;
1104 __entry->md_needed = md_needed;
1105 __entry->reserved_data_blocks = EXT4_I(inode)->i_reserved_data_blocks;
1106 __entry->reserved_meta_blocks = EXT4_I(inode)->i_reserved_meta_blocks;
210c0526 1107 __entry->mode = inode->i_mode;
f8ec9d68
TT
1108 ),
1109
0562e0ba
JZ
1110 TP_printk("dev %d,%d ino %lu mode 0%o i_blocks %llu md_needed %d "
1111 "reserved_data_blocks %d reserved_meta_blocks %d",
1112 MAJOR(__entry->dev), MINOR(__entry->dev),
a269029d 1113 (unsigned long) __entry->ino,
a9c667f8 1114 __entry->mode, __entry->i_blocks,
f8ec9d68
TT
1115 __entry->md_needed, __entry->reserved_data_blocks,
1116 __entry->reserved_meta_blocks)
1117);
1118
1119TRACE_EVENT(ext4_da_release_space,
1120 TP_PROTO(struct inode *inode, int freed_blocks),
1121
1122 TP_ARGS(inode, freed_blocks),
1123
1124 TP_STRUCT__entry(
0562e0ba 1125 __field( dev_t, dev )
f8ec9d68 1126 __field( ino_t, ino )
f8ec9d68
TT
1127 __field( __u64, i_blocks )
1128 __field( int, freed_blocks )
1129 __field( int, reserved_data_blocks )
1130 __field( int, reserved_meta_blocks )
1131 __field( int, allocated_meta_blocks )
210c0526 1132 __field( __u16, mode )
f8ec9d68
TT
1133 ),
1134
1135 TP_fast_assign(
0562e0ba 1136 __entry->dev = inode->i_sb->s_dev;
f8ec9d68 1137 __entry->ino = inode->i_ino;
f8ec9d68
TT
1138 __entry->i_blocks = inode->i_blocks;
1139 __entry->freed_blocks = freed_blocks;
1140 __entry->reserved_data_blocks = EXT4_I(inode)->i_reserved_data_blocks;
1141 __entry->reserved_meta_blocks = EXT4_I(inode)->i_reserved_meta_blocks;
1142 __entry->allocated_meta_blocks = EXT4_I(inode)->i_allocated_meta_blocks;
210c0526 1143 __entry->mode = inode->i_mode;
f8ec9d68
TT
1144 ),
1145
0562e0ba
JZ
1146 TP_printk("dev %d,%d ino %lu mode 0%o i_blocks %llu freed_blocks %d "
1147 "reserved_data_blocks %d reserved_meta_blocks %d "
1148 "allocated_meta_blocks %d",
1149 MAJOR(__entry->dev), MINOR(__entry->dev),
a269029d 1150 (unsigned long) __entry->ino,
a9c667f8 1151 __entry->mode, __entry->i_blocks,
f8ec9d68
TT
1152 __entry->freed_blocks, __entry->reserved_data_blocks,
1153 __entry->reserved_meta_blocks, __entry->allocated_meta_blocks)
1154);
1155
f307333e
TT
1156DECLARE_EVENT_CLASS(ext4__bitmap_load,
1157 TP_PROTO(struct super_block *sb, unsigned long group),
1158
1159 TP_ARGS(sb, group),
1160
1161 TP_STRUCT__entry(
0562e0ba 1162 __field( dev_t, dev )
f307333e
TT
1163 __field( __u32, group )
1164
1165 ),
1166
1167 TP_fast_assign(
0562e0ba 1168 __entry->dev = sb->s_dev;
f307333e
TT
1169 __entry->group = group;
1170 ),
1171
a269029d 1172 TP_printk("dev %d,%d group %u",
0562e0ba
JZ
1173 MAJOR(__entry->dev), MINOR(__entry->dev),
1174 __entry->group)
f307333e
TT
1175);
1176
1177DEFINE_EVENT(ext4__bitmap_load, ext4_mb_bitmap_load,
1178
1179 TP_PROTO(struct super_block *sb, unsigned long group),
1180
1181 TP_ARGS(sb, group)
1182);
1183
1184DEFINE_EVENT(ext4__bitmap_load, ext4_mb_buddy_bitmap_load,
1185
1186 TP_PROTO(struct super_block *sb, unsigned long group),
1187
1188 TP_ARGS(sb, group)
1189);
f8ec9d68 1190
0562e0ba
JZ
1191DEFINE_EVENT(ext4__bitmap_load, ext4_read_block_bitmap_load,
1192
1193 TP_PROTO(struct super_block *sb, unsigned long group),
1194
1195 TP_ARGS(sb, group)
1196);
1197
1198DEFINE_EVENT(ext4__bitmap_load, ext4_load_inode_bitmap,
1199
1200 TP_PROTO(struct super_block *sb, unsigned long group),
1201
1202 TP_ARGS(sb, group)
1203);
1204
1205TRACE_EVENT(ext4_direct_IO_enter,
1206 TP_PROTO(struct inode *inode, loff_t offset, unsigned long len, int rw),
1207
1208 TP_ARGS(inode, offset, len, rw),
1209
1210 TP_STRUCT__entry(
0562e0ba 1211 __field( dev_t, dev )
210c0526 1212 __field( ino_t, ino )
0562e0ba
JZ
1213 __field( loff_t, pos )
1214 __field( unsigned long, len )
1215 __field( int, rw )
1216 ),
1217
1218 TP_fast_assign(
0562e0ba 1219 __entry->dev = inode->i_sb->s_dev;
210c0526 1220 __entry->ino = inode->i_ino;
0562e0ba
JZ
1221 __entry->pos = offset;
1222 __entry->len = len;
1223 __entry->rw = rw;
1224 ),
1225
a9c667f8 1226 TP_printk("dev %d,%d ino %lu pos %lld len %lu rw %d",
0562e0ba
JZ
1227 MAJOR(__entry->dev), MINOR(__entry->dev),
1228 (unsigned long) __entry->ino,
a9c667f8 1229 __entry->pos, __entry->len, __entry->rw)
0562e0ba
JZ
1230);
1231
1232TRACE_EVENT(ext4_direct_IO_exit,
a9c667f8
LC
1233 TP_PROTO(struct inode *inode, loff_t offset, unsigned long len,
1234 int rw, int ret),
0562e0ba
JZ
1235
1236 TP_ARGS(inode, offset, len, rw, ret),
1237
1238 TP_STRUCT__entry(
0562e0ba 1239 __field( dev_t, dev )
210c0526 1240 __field( ino_t, ino )
0562e0ba
JZ
1241 __field( loff_t, pos )
1242 __field( unsigned long, len )
1243 __field( int, rw )
1244 __field( int, ret )
1245 ),
1246
1247 TP_fast_assign(
0562e0ba 1248 __entry->dev = inode->i_sb->s_dev;
210c0526 1249 __entry->ino = inode->i_ino;
0562e0ba
JZ
1250 __entry->pos = offset;
1251 __entry->len = len;
1252 __entry->rw = rw;
1253 __entry->ret = ret;
1254 ),
1255
a9c667f8 1256 TP_printk("dev %d,%d ino %lu pos %lld len %lu rw %d ret %d",
0562e0ba
JZ
1257 MAJOR(__entry->dev), MINOR(__entry->dev),
1258 (unsigned long) __entry->ino,
a9c667f8 1259 __entry->pos, __entry->len,
0562e0ba
JZ
1260 __entry->rw, __entry->ret)
1261);
1262
1263TRACE_EVENT(ext4_fallocate_enter,
1264 TP_PROTO(struct inode *inode, loff_t offset, loff_t len, int mode),
1265
1266 TP_ARGS(inode, offset, len, mode),
1267
1268 TP_STRUCT__entry(
0562e0ba 1269 __field( dev_t, dev )
210c0526 1270 __field( ino_t, ino )
0562e0ba
JZ
1271 __field( loff_t, pos )
1272 __field( loff_t, len )
1273 __field( int, mode )
1274 ),
1275
1276 TP_fast_assign(
0562e0ba 1277 __entry->dev = inode->i_sb->s_dev;
210c0526 1278 __entry->ino = inode->i_ino;
0562e0ba
JZ
1279 __entry->pos = offset;
1280 __entry->len = len;
1281 __entry->mode = mode;
1282 ),
1283
a9c667f8 1284 TP_printk("dev %d,%d ino %lu pos %lld len %lld mode %d",
0562e0ba 1285 MAJOR(__entry->dev), MINOR(__entry->dev),
a9c667f8
LC
1286 (unsigned long) __entry->ino, __entry->pos,
1287 __entry->len, __entry->mode)
0562e0ba
JZ
1288);
1289
1290TRACE_EVENT(ext4_fallocate_exit,
a9c667f8
LC
1291 TP_PROTO(struct inode *inode, loff_t offset,
1292 unsigned int max_blocks, int ret),
0562e0ba
JZ
1293
1294 TP_ARGS(inode, offset, max_blocks, ret),
1295
1296 TP_STRUCT__entry(
0562e0ba 1297 __field( dev_t, dev )
210c0526 1298 __field( ino_t, ino )
0562e0ba 1299 __field( loff_t, pos )
a9c667f8 1300 __field( unsigned int, blocks )
0562e0ba
JZ
1301 __field( int, ret )
1302 ),
1303
1304 TP_fast_assign(
0562e0ba 1305 __entry->dev = inode->i_sb->s_dev;
210c0526 1306 __entry->ino = inode->i_ino;
0562e0ba
JZ
1307 __entry->pos = offset;
1308 __entry->blocks = max_blocks;
1309 __entry->ret = ret;
1310 ),
1311
a9c667f8 1312 TP_printk("dev %d,%d ino %lu pos %lld blocks %u ret %d",
0562e0ba
JZ
1313 MAJOR(__entry->dev), MINOR(__entry->dev),
1314 (unsigned long) __entry->ino,
a9c667f8 1315 __entry->pos, __entry->blocks,
0562e0ba
JZ
1316 __entry->ret)
1317);
1318
aaddea81
ZL
1319TRACE_EVENT(ext4_punch_hole,
1320 TP_PROTO(struct inode *inode, loff_t offset, loff_t len),
1321
1322 TP_ARGS(inode, offset, len),
1323
1324 TP_STRUCT__entry(
1325 __field( dev_t, dev )
1326 __field( ino_t, ino )
1327 __field( loff_t, offset )
1328 __field( loff_t, len )
1329 ),
1330
1331 TP_fast_assign(
1332 __entry->dev = inode->i_sb->s_dev;
1333 __entry->ino = inode->i_ino;
1334 __entry->offset = offset;
1335 __entry->len = len;
1336 ),
1337
1338 TP_printk("dev %d,%d ino %lu offset %lld len %lld",
1339 MAJOR(__entry->dev), MINOR(__entry->dev),
1340 (unsigned long) __entry->ino,
1341 __entry->offset, __entry->len)
1342);
1343
0562e0ba
JZ
1344TRACE_EVENT(ext4_unlink_enter,
1345 TP_PROTO(struct inode *parent, struct dentry *dentry),
1346
1347 TP_ARGS(parent, dentry),
1348
1349 TP_STRUCT__entry(
210c0526 1350 __field( dev_t, dev )
0562e0ba 1351 __field( ino_t, ino )
210c0526 1352 __field( ino_t, parent )
0562e0ba 1353 __field( loff_t, size )
0562e0ba
JZ
1354 ),
1355
1356 TP_fast_assign(
210c0526 1357 __entry->dev = dentry->d_inode->i_sb->s_dev;
0562e0ba 1358 __entry->ino = dentry->d_inode->i_ino;
210c0526 1359 __entry->parent = parent->i_ino;
0562e0ba 1360 __entry->size = dentry->d_inode->i_size;
0562e0ba
JZ
1361 ),
1362
a9c667f8 1363 TP_printk("dev %d,%d ino %lu size %lld parent %lu",
0562e0ba
JZ
1364 MAJOR(__entry->dev), MINOR(__entry->dev),
1365 (unsigned long) __entry->ino, __entry->size,
1366 (unsigned long) __entry->parent)
1367);
1368
1369TRACE_EVENT(ext4_unlink_exit,
1370 TP_PROTO(struct dentry *dentry, int ret),
1371
1372 TP_ARGS(dentry, ret),
1373
1374 TP_STRUCT__entry(
0562e0ba 1375 __field( dev_t, dev )
210c0526 1376 __field( ino_t, ino )
0562e0ba
JZ
1377 __field( int, ret )
1378 ),
1379
1380 TP_fast_assign(
0562e0ba 1381 __entry->dev = dentry->d_inode->i_sb->s_dev;
210c0526 1382 __entry->ino = dentry->d_inode->i_ino;
0562e0ba
JZ
1383 __entry->ret = ret;
1384 ),
1385
a9c667f8 1386 TP_printk("dev %d,%d ino %lu ret %d",
0562e0ba
JZ
1387 MAJOR(__entry->dev), MINOR(__entry->dev),
1388 (unsigned long) __entry->ino,
1389 __entry->ret)
1390);
1391
1392DECLARE_EVENT_CLASS(ext4__truncate,
1393 TP_PROTO(struct inode *inode),
1394
1395 TP_ARGS(inode),
1396
1397 TP_STRUCT__entry(
210c0526
AP
1398 __field( dev_t, dev )
1399 __field( ino_t, ino )
a9c667f8 1400 __field( __u64, blocks )
0562e0ba
JZ
1401 ),
1402
1403 TP_fast_assign(
0562e0ba 1404 __entry->dev = inode->i_sb->s_dev;
210c0526 1405 __entry->ino = inode->i_ino;
0562e0ba
JZ
1406 __entry->blocks = inode->i_blocks;
1407 ),
1408
a9c667f8 1409 TP_printk("dev %d,%d ino %lu blocks %llu",
0562e0ba 1410 MAJOR(__entry->dev), MINOR(__entry->dev),
a9c667f8 1411 (unsigned long) __entry->ino, __entry->blocks)
0562e0ba
JZ
1412);
1413
1414DEFINE_EVENT(ext4__truncate, ext4_truncate_enter,
1415
1416 TP_PROTO(struct inode *inode),
1417
1418 TP_ARGS(inode)
1419);
1420
1421DEFINE_EVENT(ext4__truncate, ext4_truncate_exit,
1422
1423 TP_PROTO(struct inode *inode),
1424
1425 TP_ARGS(inode)
1426);
1427
6f91bc5f
EG
1428/* 'ux' is the uninitialized extent. */
1429TRACE_EVENT(ext4_ext_convert_to_initialized_enter,
1430 TP_PROTO(struct inode *inode, struct ext4_map_blocks *map,
1431 struct ext4_extent *ux),
1432
1433 TP_ARGS(inode, map, ux),
1434
1435 TP_STRUCT__entry(
6f91bc5f 1436 __field( dev_t, dev )
210c0526 1437 __field( ino_t, ino )
6f91bc5f
EG
1438 __field( ext4_lblk_t, m_lblk )
1439 __field( unsigned, m_len )
1440 __field( ext4_lblk_t, u_lblk )
1441 __field( unsigned, u_len )
1442 __field( ext4_fsblk_t, u_pblk )
1443 ),
1444
1445 TP_fast_assign(
6f91bc5f 1446 __entry->dev = inode->i_sb->s_dev;
210c0526 1447 __entry->ino = inode->i_ino;
6f91bc5f
EG
1448 __entry->m_lblk = map->m_lblk;
1449 __entry->m_len = map->m_len;
1450 __entry->u_lblk = le32_to_cpu(ux->ee_block);
1451 __entry->u_len = ext4_ext_get_actual_len(ux);
1452 __entry->u_pblk = ext4_ext_pblock(ux);
1453 ),
1454
1455 TP_printk("dev %d,%d ino %lu m_lblk %u m_len %u u_lblk %u u_len %u "
1456 "u_pblk %llu",
1457 MAJOR(__entry->dev), MINOR(__entry->dev),
1458 (unsigned long) __entry->ino,
1459 __entry->m_lblk, __entry->m_len,
1460 __entry->u_lblk, __entry->u_len, __entry->u_pblk)
1461);
1462
1463/*
1464 * 'ux' is the uninitialized extent.
1465 * 'ix' is the initialized extent to which blocks are transferred.
1466 */
1467TRACE_EVENT(ext4_ext_convert_to_initialized_fastpath,
1468 TP_PROTO(struct inode *inode, struct ext4_map_blocks *map,
1469 struct ext4_extent *ux, struct ext4_extent *ix),
1470
1471 TP_ARGS(inode, map, ux, ix),
1472
1473 TP_STRUCT__entry(
6f91bc5f 1474 __field( dev_t, dev )
210c0526 1475 __field( ino_t, ino )
6f91bc5f
EG
1476 __field( ext4_lblk_t, m_lblk )
1477 __field( unsigned, m_len )
1478 __field( ext4_lblk_t, u_lblk )
1479 __field( unsigned, u_len )
1480 __field( ext4_fsblk_t, u_pblk )
1481 __field( ext4_lblk_t, i_lblk )
1482 __field( unsigned, i_len )
1483 __field( ext4_fsblk_t, i_pblk )
1484 ),
1485
1486 TP_fast_assign(
6f91bc5f 1487 __entry->dev = inode->i_sb->s_dev;
210c0526 1488 __entry->ino = inode->i_ino;
6f91bc5f
EG
1489 __entry->m_lblk = map->m_lblk;
1490 __entry->m_len = map->m_len;
1491 __entry->u_lblk = le32_to_cpu(ux->ee_block);
1492 __entry->u_len = ext4_ext_get_actual_len(ux);
1493 __entry->u_pblk = ext4_ext_pblock(ux);
1494 __entry->i_lblk = le32_to_cpu(ix->ee_block);
1495 __entry->i_len = ext4_ext_get_actual_len(ix);
1496 __entry->i_pblk = ext4_ext_pblock(ix);
1497 ),
1498
1499 TP_printk("dev %d,%d ino %lu m_lblk %u m_len %u "
1500 "u_lblk %u u_len %u u_pblk %llu "
1501 "i_lblk %u i_len %u i_pblk %llu ",
1502 MAJOR(__entry->dev), MINOR(__entry->dev),
1503 (unsigned long) __entry->ino,
1504 __entry->m_lblk, __entry->m_len,
1505 __entry->u_lblk, __entry->u_len, __entry->u_pblk,
1506 __entry->i_lblk, __entry->i_len, __entry->i_pblk)
1507);
1508
0562e0ba
JZ
1509DECLARE_EVENT_CLASS(ext4__map_blocks_enter,
1510 TP_PROTO(struct inode *inode, ext4_lblk_t lblk,
a9c667f8 1511 unsigned int len, unsigned int flags),
0562e0ba
JZ
1512
1513 TP_ARGS(inode, lblk, len, flags),
1514
1515 TP_STRUCT__entry(
210c0526
AP
1516 __field( dev_t, dev )
1517 __field( ino_t, ino )
0562e0ba 1518 __field( ext4_lblk_t, lblk )
a9c667f8
LC
1519 __field( unsigned int, len )
1520 __field( unsigned int, flags )
0562e0ba
JZ
1521 ),
1522
1523 TP_fast_assign(
0562e0ba 1524 __entry->dev = inode->i_sb->s_dev;
210c0526 1525 __entry->ino = inode->i_ino;
0562e0ba
JZ
1526 __entry->lblk = lblk;
1527 __entry->len = len;
1528 __entry->flags = flags;
1529 ),
1530
1531 TP_printk("dev %d,%d ino %lu lblk %u len %u flags %u",
1532 MAJOR(__entry->dev), MINOR(__entry->dev),
1533 (unsigned long) __entry->ino,
a9c667f8 1534 __entry->lblk, __entry->len, __entry->flags)
0562e0ba
JZ
1535);
1536
1537DEFINE_EVENT(ext4__map_blocks_enter, ext4_ext_map_blocks_enter,
1538 TP_PROTO(struct inode *inode, ext4_lblk_t lblk,
1539 unsigned len, unsigned flags),
1540
1541 TP_ARGS(inode, lblk, len, flags)
1542);
1543
1544DEFINE_EVENT(ext4__map_blocks_enter, ext4_ind_map_blocks_enter,
1545 TP_PROTO(struct inode *inode, ext4_lblk_t lblk,
1546 unsigned len, unsigned flags),
1547
1548 TP_ARGS(inode, lblk, len, flags)
1549);
1550
1551DECLARE_EVENT_CLASS(ext4__map_blocks_exit,
19b303d8 1552 TP_PROTO(struct inode *inode, struct ext4_map_blocks *map, int ret),
0562e0ba 1553
19b303d8 1554 TP_ARGS(inode, map, ret),
0562e0ba
JZ
1555
1556 TP_STRUCT__entry(
0562e0ba 1557 __field( dev_t, dev )
210c0526 1558 __field( ino_t, ino )
0562e0ba 1559 __field( ext4_fsblk_t, pblk )
210c0526 1560 __field( ext4_lblk_t, lblk )
a9c667f8 1561 __field( unsigned int, len )
19b303d8 1562 __field( unsigned int, flags )
0562e0ba
JZ
1563 __field( int, ret )
1564 ),
1565
1566 TP_fast_assign(
0562e0ba 1567 __entry->dev = inode->i_sb->s_dev;
210c0526 1568 __entry->ino = inode->i_ino;
19b303d8
ZL
1569 __entry->pblk = map->m_pblk;
1570 __entry->lblk = map->m_lblk;
1571 __entry->len = map->m_len;
1572 __entry->flags = map->m_flags;
0562e0ba
JZ
1573 __entry->ret = ret;
1574 ),
1575
19b303d8 1576 TP_printk("dev %d,%d ino %lu lblk %u pblk %llu len %u flags %x ret %d",
0562e0ba
JZ
1577 MAJOR(__entry->dev), MINOR(__entry->dev),
1578 (unsigned long) __entry->ino,
a9c667f8 1579 __entry->lblk, __entry->pblk,
19b303d8 1580 __entry->len, __entry->flags, __entry->ret)
0562e0ba
JZ
1581);
1582
1583DEFINE_EVENT(ext4__map_blocks_exit, ext4_ext_map_blocks_exit,
19b303d8 1584 TP_PROTO(struct inode *inode, struct ext4_map_blocks *map, int ret),
0562e0ba 1585
19b303d8 1586 TP_ARGS(inode, map, ret)
0562e0ba
JZ
1587);
1588
1589DEFINE_EVENT(ext4__map_blocks_exit, ext4_ind_map_blocks_exit,
19b303d8 1590 TP_PROTO(struct inode *inode, struct ext4_map_blocks *map, int ret),
0562e0ba 1591
19b303d8 1592 TP_ARGS(inode, map, ret)
0562e0ba
JZ
1593);
1594
1595TRACE_EVENT(ext4_ext_load_extent,
1596 TP_PROTO(struct inode *inode, ext4_lblk_t lblk, ext4_fsblk_t pblk),
1597
1598 TP_ARGS(inode, lblk, pblk),
1599
1600 TP_STRUCT__entry(
0562e0ba 1601 __field( dev_t, dev )
210c0526 1602 __field( ino_t, ino )
0562e0ba 1603 __field( ext4_fsblk_t, pblk )
210c0526 1604 __field( ext4_lblk_t, lblk )
0562e0ba
JZ
1605 ),
1606
1607 TP_fast_assign(
0562e0ba 1608 __entry->dev = inode->i_sb->s_dev;
210c0526 1609 __entry->ino = inode->i_ino;
0562e0ba 1610 __entry->pblk = pblk;
210c0526 1611 __entry->lblk = lblk;
0562e0ba
JZ
1612 ),
1613
1614 TP_printk("dev %d,%d ino %lu lblk %u pblk %llu",
1615 MAJOR(__entry->dev), MINOR(__entry->dev),
1616 (unsigned long) __entry->ino,
a9c667f8 1617 __entry->lblk, __entry->pblk)
0562e0ba
JZ
1618);
1619
1620TRACE_EVENT(ext4_load_inode,
1621 TP_PROTO(struct inode *inode),
1622
1623 TP_ARGS(inode),
1624
1625 TP_STRUCT__entry(
0562e0ba 1626 __field( dev_t, dev )
210c0526 1627 __field( ino_t, ino )
0562e0ba
JZ
1628 ),
1629
1630 TP_fast_assign(
0562e0ba 1631 __entry->dev = inode->i_sb->s_dev;
210c0526 1632 __entry->ino = inode->i_ino;
0562e0ba
JZ
1633 ),
1634
1635 TP_printk("dev %d,%d ino %ld",
1636 MAJOR(__entry->dev), MINOR(__entry->dev),
1637 (unsigned long) __entry->ino)
1638);
1639
12706394
TT
1640TRACE_EVENT(ext4_journal_start,
1641 TP_PROTO(struct super_block *sb, int nblocks, unsigned long IP),
1642
1643 TP_ARGS(sb, nblocks, IP),
1644
1645 TP_STRUCT__entry(
1646 __field( dev_t, dev )
12706394 1647 __field(unsigned long, ip )
210c0526 1648 __field( int, nblocks )
12706394
TT
1649 ),
1650
1651 TP_fast_assign(
1652 __entry->dev = sb->s_dev;
12706394 1653 __entry->ip = IP;
210c0526 1654 __entry->nblocks = nblocks;
12706394
TT
1655 ),
1656
1657 TP_printk("dev %d,%d nblocks %d caller %pF",
1658 MAJOR(__entry->dev), MINOR(__entry->dev),
1659 __entry->nblocks, (void *)__entry->ip)
1660);
1661
b3d4c2b1
TM
1662DECLARE_EVENT_CLASS(ext4__trim,
1663 TP_PROTO(struct super_block *sb,
1664 ext4_group_t group,
1665 ext4_grpblk_t start,
1666 ext4_grpblk_t len),
1667
1668 TP_ARGS(sb, group, start, len),
1669
1670 TP_STRUCT__entry(
1671 __field( int, dev_major )
1672 __field( int, dev_minor )
1673 __field( __u32, group )
1674 __field( int, start )
1675 __field( int, len )
1676 ),
1677
1678 TP_fast_assign(
1679 __entry->dev_major = MAJOR(sb->s_dev);
1680 __entry->dev_minor = MINOR(sb->s_dev);
1681 __entry->group = group;
1682 __entry->start = start;
1683 __entry->len = len;
1684 ),
1685
1686 TP_printk("dev %d,%d group %u, start %d, len %d",
1687 __entry->dev_major, __entry->dev_minor,
1688 __entry->group, __entry->start, __entry->len)
1689);
1690
1691DEFINE_EVENT(ext4__trim, ext4_trim_extent,
1692
1693 TP_PROTO(struct super_block *sb,
1694 ext4_group_t group,
1695 ext4_grpblk_t start,
1696 ext4_grpblk_t len),
1697
1698 TP_ARGS(sb, group, start, len)
1699);
1700
1701DEFINE_EVENT(ext4__trim, ext4_trim_all_free,
1702
1703 TP_PROTO(struct super_block *sb,
1704 ext4_group_t group,
1705 ext4_grpblk_t start,
1706 ext4_grpblk_t len),
1707
1708 TP_ARGS(sb, group, start, len)
1709);
1710
d8990240 1711TRACE_EVENT(ext4_ext_handle_uninitialized_extents,
b5645534 1712 TP_PROTO(struct inode *inode, struct ext4_map_blocks *map, int flags,
d8990240
AK
1713 unsigned int allocated, ext4_fsblk_t newblock),
1714
b5645534 1715 TP_ARGS(inode, map, flags, allocated, newblock),
d8990240
AK
1716
1717 TP_STRUCT__entry(
d8990240 1718 __field( dev_t, dev )
210c0526
AP
1719 __field( ino_t, ino )
1720 __field( int, flags )
d8990240
AK
1721 __field( ext4_lblk_t, lblk )
1722 __field( ext4_fsblk_t, pblk )
1723 __field( unsigned int, len )
d8990240
AK
1724 __field( unsigned int, allocated )
1725 __field( ext4_fsblk_t, newblk )
1726 ),
1727
1728 TP_fast_assign(
d8990240 1729 __entry->dev = inode->i_sb->s_dev;
210c0526 1730 __entry->ino = inode->i_ino;
b5645534 1731 __entry->flags = flags;
d8990240
AK
1732 __entry->lblk = map->m_lblk;
1733 __entry->pblk = map->m_pblk;
1734 __entry->len = map->m_len;
d8990240
AK
1735 __entry->allocated = allocated;
1736 __entry->newblk = newblock;
1737 ),
1738
b5645534 1739 TP_printk("dev %d,%d ino %lu m_lblk %u m_pblk %llu m_len %u flags %x "
d8990240
AK
1740 "allocated %d newblock %llu",
1741 MAJOR(__entry->dev), MINOR(__entry->dev),
1742 (unsigned long) __entry->ino,
1743 (unsigned) __entry->lblk, (unsigned long long) __entry->pblk,
1744 __entry->len, __entry->flags,
1745 (unsigned int) __entry->allocated,
1746 (unsigned long long) __entry->newblk)
1747);
1748
1749TRACE_EVENT(ext4_get_implied_cluster_alloc_exit,
1750 TP_PROTO(struct super_block *sb, struct ext4_map_blocks *map, int ret),
1751
1752 TP_ARGS(sb, map, ret),
1753
1754 TP_STRUCT__entry(
1755 __field( dev_t, dev )
210c0526 1756 __field( unsigned int, flags )
d8990240
AK
1757 __field( ext4_lblk_t, lblk )
1758 __field( ext4_fsblk_t, pblk )
1759 __field( unsigned int, len )
d8990240
AK
1760 __field( int, ret )
1761 ),
1762
1763 TP_fast_assign(
1764 __entry->dev = sb->s_dev;
210c0526 1765 __entry->flags = map->m_flags;
d8990240
AK
1766 __entry->lblk = map->m_lblk;
1767 __entry->pblk = map->m_pblk;
1768 __entry->len = map->m_len;
d8990240
AK
1769 __entry->ret = ret;
1770 ),
1771
1772 TP_printk("dev %d,%d m_lblk %u m_pblk %llu m_len %u m_flags %u ret %d",
1773 MAJOR(__entry->dev), MINOR(__entry->dev),
1774 __entry->lblk, (unsigned long long) __entry->pblk,
1775 __entry->len, __entry->flags, __entry->ret)
1776);
1777
1778TRACE_EVENT(ext4_ext_put_in_cache,
1779 TP_PROTO(struct inode *inode, ext4_lblk_t lblk, unsigned int len,
1780 ext4_fsblk_t start),
1781
1782 TP_ARGS(inode, lblk, len, start),
1783
1784 TP_STRUCT__entry(
d8990240 1785 __field( dev_t, dev )
210c0526 1786 __field( ino_t, ino )
d8990240
AK
1787 __field( ext4_lblk_t, lblk )
1788 __field( unsigned int, len )
1789 __field( ext4_fsblk_t, start )
1790 ),
1791
1792 TP_fast_assign(
d8990240 1793 __entry->dev = inode->i_sb->s_dev;
210c0526 1794 __entry->ino = inode->i_ino;
d8990240
AK
1795 __entry->lblk = lblk;
1796 __entry->len = len;
1797 __entry->start = start;
1798 ),
1799
1800 TP_printk("dev %d,%d ino %lu lblk %u len %u start %llu",
1801 MAJOR(__entry->dev), MINOR(__entry->dev),
1802 (unsigned long) __entry->ino,
1803 (unsigned) __entry->lblk,
1804 __entry->len,
1805 (unsigned long long) __entry->start)
1806);
1807
1808TRACE_EVENT(ext4_ext_in_cache,
1809 TP_PROTO(struct inode *inode, ext4_lblk_t lblk, int ret),
1810
1811 TP_ARGS(inode, lblk, ret),
1812
1813 TP_STRUCT__entry(
d8990240 1814 __field( dev_t, dev )
210c0526 1815 __field( ino_t, ino )
d8990240
AK
1816 __field( ext4_lblk_t, lblk )
1817 __field( int, ret )
1818 ),
1819
1820 TP_fast_assign(
d8990240 1821 __entry->dev = inode->i_sb->s_dev;
210c0526 1822 __entry->ino = inode->i_ino;
d8990240
AK
1823 __entry->lblk = lblk;
1824 __entry->ret = ret;
1825 ),
1826
1827 TP_printk("dev %d,%d ino %lu lblk %u ret %d",
1828 MAJOR(__entry->dev), MINOR(__entry->dev),
1829 (unsigned long) __entry->ino,
1830 (unsigned) __entry->lblk,
1831 __entry->ret)
1832
1833);
1834
1835TRACE_EVENT(ext4_find_delalloc_range,
1836 TP_PROTO(struct inode *inode, ext4_lblk_t from, ext4_lblk_t to,
1837 int reverse, int found, ext4_lblk_t found_blk),
1838
1839 TP_ARGS(inode, from, to, reverse, found, found_blk),
1840
1841 TP_STRUCT__entry(
d8990240 1842 __field( dev_t, dev )
210c0526 1843 __field( ino_t, ino )
d8990240
AK
1844 __field( ext4_lblk_t, from )
1845 __field( ext4_lblk_t, to )
1846 __field( int, reverse )
1847 __field( int, found )
1848 __field( ext4_lblk_t, found_blk )
1849 ),
1850
1851 TP_fast_assign(
d8990240 1852 __entry->dev = inode->i_sb->s_dev;
210c0526 1853 __entry->ino = inode->i_ino;
d8990240
AK
1854 __entry->from = from;
1855 __entry->to = to;
1856 __entry->reverse = reverse;
1857 __entry->found = found;
1858 __entry->found_blk = found_blk;
1859 ),
1860
1861 TP_printk("dev %d,%d ino %lu from %u to %u reverse %d found %d "
1862 "(blk = %u)",
1863 MAJOR(__entry->dev), MINOR(__entry->dev),
1864 (unsigned long) __entry->ino,
1865 (unsigned) __entry->from, (unsigned) __entry->to,
1866 __entry->reverse, __entry->found,
1867 (unsigned) __entry->found_blk)
1868);
1869
1870TRACE_EVENT(ext4_get_reserved_cluster_alloc,
1871 TP_PROTO(struct inode *inode, ext4_lblk_t lblk, unsigned int len),
1872
1873 TP_ARGS(inode, lblk, len),
1874
1875 TP_STRUCT__entry(
d8990240 1876 __field( dev_t, dev )
210c0526 1877 __field( ino_t, ino )
d8990240
AK
1878 __field( ext4_lblk_t, lblk )
1879 __field( unsigned int, len )
1880 ),
1881
1882 TP_fast_assign(
d8990240 1883 __entry->dev = inode->i_sb->s_dev;
210c0526 1884 __entry->ino = inode->i_ino;
d8990240
AK
1885 __entry->lblk = lblk;
1886 __entry->len = len;
1887 ),
1888
1889 TP_printk("dev %d,%d ino %lu lblk %u len %u",
1890 MAJOR(__entry->dev), MINOR(__entry->dev),
1891 (unsigned long) __entry->ino,
1892 (unsigned) __entry->lblk,
1893 __entry->len)
1894);
1895
1896TRACE_EVENT(ext4_ext_show_extent,
1897 TP_PROTO(struct inode *inode, ext4_lblk_t lblk, ext4_fsblk_t pblk,
1898 unsigned short len),
1899
1900 TP_ARGS(inode, lblk, pblk, len),
1901
1902 TP_STRUCT__entry(
d8990240 1903 __field( dev_t, dev )
210c0526 1904 __field( ino_t, ino )
d8990240 1905 __field( ext4_fsblk_t, pblk )
210c0526 1906 __field( ext4_lblk_t, lblk )
d8990240
AK
1907 __field( unsigned short, len )
1908 ),
1909
1910 TP_fast_assign(
d8990240 1911 __entry->dev = inode->i_sb->s_dev;
210c0526 1912 __entry->ino = inode->i_ino;
d8990240 1913 __entry->pblk = pblk;
210c0526 1914 __entry->lblk = lblk;
d8990240
AK
1915 __entry->len = len;
1916 ),
1917
1918 TP_printk("dev %d,%d ino %lu lblk %u pblk %llu len %u",
1919 MAJOR(__entry->dev), MINOR(__entry->dev),
1920 (unsigned long) __entry->ino,
1921 (unsigned) __entry->lblk,
1922 (unsigned long long) __entry->pblk,
1923 (unsigned short) __entry->len)
1924);
1925
1926TRACE_EVENT(ext4_remove_blocks,
1927 TP_PROTO(struct inode *inode, struct ext4_extent *ex,
1928 ext4_lblk_t from, ext4_fsblk_t to,
1929 ext4_fsblk_t partial_cluster),
1930
1931 TP_ARGS(inode, ex, from, to, partial_cluster),
1932
1933 TP_STRUCT__entry(
d8990240 1934 __field( dev_t, dev )
210c0526 1935 __field( ino_t, ino )
d8990240
AK
1936 __field( ext4_lblk_t, from )
1937 __field( ext4_lblk_t, to )
1938 __field( ext4_fsblk_t, partial )
210c0526
AP
1939 __field( ext4_fsblk_t, ee_pblk )
1940 __field( ext4_lblk_t, ee_lblk )
1941 __field( unsigned short, ee_len )
d8990240
AK
1942 ),
1943
1944 TP_fast_assign(
d8990240 1945 __entry->dev = inode->i_sb->s_dev;
210c0526 1946 __entry->ino = inode->i_ino;
d8990240
AK
1947 __entry->from = from;
1948 __entry->to = to;
1949 __entry->partial = partial_cluster;
210c0526 1950 __entry->ee_pblk = ext4_ext_pblock(ex);
d6a77105 1951 __entry->ee_lblk = le32_to_cpu(ex->ee_block);
210c0526 1952 __entry->ee_len = ext4_ext_get_actual_len(ex);
d8990240
AK
1953 ),
1954
1955 TP_printk("dev %d,%d ino %lu extent [%u(%llu), %u]"
1956 "from %u to %u partial_cluster %u",
1957 MAJOR(__entry->dev), MINOR(__entry->dev),
1958 (unsigned long) __entry->ino,
1959 (unsigned) __entry->ee_lblk,
1960 (unsigned long long) __entry->ee_pblk,
1961 (unsigned short) __entry->ee_len,
1962 (unsigned) __entry->from,
1963 (unsigned) __entry->to,
1964 (unsigned) __entry->partial)
1965);
1966
1967TRACE_EVENT(ext4_ext_rm_leaf,
1968 TP_PROTO(struct inode *inode, ext4_lblk_t start,
1969 struct ext4_extent *ex, ext4_fsblk_t partial_cluster),
1970
1971 TP_ARGS(inode, start, ex, partial_cluster),
1972
1973 TP_STRUCT__entry(
d8990240 1974 __field( dev_t, dev )
210c0526
AP
1975 __field( ino_t, ino )
1976 __field( ext4_fsblk_t, partial )
d8990240
AK
1977 __field( ext4_lblk_t, start )
1978 __field( ext4_lblk_t, ee_lblk )
1979 __field( ext4_fsblk_t, ee_pblk )
1980 __field( short, ee_len )
d8990240
AK
1981 ),
1982
1983 TP_fast_assign(
d8990240 1984 __entry->dev = inode->i_sb->s_dev;
210c0526
AP
1985 __entry->ino = inode->i_ino;
1986 __entry->partial = partial_cluster;
d8990240
AK
1987 __entry->start = start;
1988 __entry->ee_lblk = le32_to_cpu(ex->ee_block);
1989 __entry->ee_pblk = ext4_ext_pblock(ex);
1990 __entry->ee_len = ext4_ext_get_actual_len(ex);
d8990240
AK
1991 ),
1992
1993 TP_printk("dev %d,%d ino %lu start_lblk %u last_extent [%u(%llu), %u]"
1994 "partial_cluster %u",
1995 MAJOR(__entry->dev), MINOR(__entry->dev),
1996 (unsigned long) __entry->ino,
1997 (unsigned) __entry->start,
1998 (unsigned) __entry->ee_lblk,
1999 (unsigned long long) __entry->ee_pblk,
2000 (unsigned short) __entry->ee_len,
2001 (unsigned) __entry->partial)
2002);
2003
2004TRACE_EVENT(ext4_ext_rm_idx,
2005 TP_PROTO(struct inode *inode, ext4_fsblk_t pblk),
2006
2007 TP_ARGS(inode, pblk),
2008
2009 TP_STRUCT__entry(
d8990240 2010 __field( dev_t, dev )
210c0526 2011 __field( ino_t, ino )
d8990240
AK
2012 __field( ext4_fsblk_t, pblk )
2013 ),
2014
2015 TP_fast_assign(
d8990240 2016 __entry->dev = inode->i_sb->s_dev;
210c0526 2017 __entry->ino = inode->i_ino;
d8990240
AK
2018 __entry->pblk = pblk;
2019 ),
2020
2021 TP_printk("dev %d,%d ino %lu index_pblk %llu",
2022 MAJOR(__entry->dev), MINOR(__entry->dev),
2023 (unsigned long) __entry->ino,
2024 (unsigned long long) __entry->pblk)
2025);
2026
2027TRACE_EVENT(ext4_ext_remove_space,
2028 TP_PROTO(struct inode *inode, ext4_lblk_t start, int depth),
2029
2030 TP_ARGS(inode, start, depth),
2031
2032 TP_STRUCT__entry(
d8990240 2033 __field( dev_t, dev )
210c0526 2034 __field( ino_t, ino )
d8990240
AK
2035 __field( ext4_lblk_t, start )
2036 __field( int, depth )
2037 ),
2038
2039 TP_fast_assign(
d8990240 2040 __entry->dev = inode->i_sb->s_dev;
210c0526 2041 __entry->ino = inode->i_ino;
d8990240
AK
2042 __entry->start = start;
2043 __entry->depth = depth;
2044 ),
2045
2046 TP_printk("dev %d,%d ino %lu since %u depth %d",
2047 MAJOR(__entry->dev), MINOR(__entry->dev),
2048 (unsigned long) __entry->ino,
2049 (unsigned) __entry->start,
2050 __entry->depth)
2051);
2052
2053TRACE_EVENT(ext4_ext_remove_space_done,
2054 TP_PROTO(struct inode *inode, ext4_lblk_t start, int depth,
d6a77105 2055 ext4_lblk_t partial, __le16 eh_entries),
d8990240
AK
2056
2057 TP_ARGS(inode, start, depth, partial, eh_entries),
2058
2059 TP_STRUCT__entry(
d8990240 2060 __field( dev_t, dev )
210c0526 2061 __field( ino_t, ino )
d8990240
AK
2062 __field( ext4_lblk_t, start )
2063 __field( int, depth )
2064 __field( ext4_lblk_t, partial )
2065 __field( unsigned short, eh_entries )
2066 ),
2067
2068 TP_fast_assign(
d8990240 2069 __entry->dev = inode->i_sb->s_dev;
210c0526 2070 __entry->ino = inode->i_ino;
d8990240
AK
2071 __entry->start = start;
2072 __entry->depth = depth;
2073 __entry->partial = partial;
d6a77105 2074 __entry->eh_entries = le16_to_cpu(eh_entries);
d8990240
AK
2075 ),
2076
2077 TP_printk("dev %d,%d ino %lu since %u depth %d partial %u "
2078 "remaining_entries %u",
2079 MAJOR(__entry->dev), MINOR(__entry->dev),
2080 (unsigned long) __entry->ino,
2081 (unsigned) __entry->start,
2082 __entry->depth,
2083 (unsigned) __entry->partial,
2084 (unsigned short) __entry->eh_entries)
2085);
2086
992e9fdd 2087TRACE_EVENT(ext4_es_insert_extent,
fdc0212e 2088 TP_PROTO(struct inode *inode, struct extent_status *es),
992e9fdd 2089
fdc0212e 2090 TP_ARGS(inode, es),
992e9fdd
ZL
2091
2092 TP_STRUCT__entry(
fdc0212e
ZL
2093 __field( dev_t, dev )
2094 __field( ino_t, ino )
2095 __field( ext4_lblk_t, lblk )
2096 __field( ext4_lblk_t, len )
2097 __field( ext4_fsblk_t, pblk )
2098 __field( unsigned long long, status )
992e9fdd
ZL
2099 ),
2100
2101 TP_fast_assign(
2102 __entry->dev = inode->i_sb->s_dev;
2103 __entry->ino = inode->i_ino;
fdc0212e
ZL
2104 __entry->lblk = es->es_lblk;
2105 __entry->len = es->es_len;
2106 __entry->pblk = ext4_es_pblock(es);
2107 __entry->status = ext4_es_status(es);
992e9fdd
ZL
2108 ),
2109
fdc0212e 2110 TP_printk("dev %d,%d ino %lu es [%u/%u) mapped %llu status %llx",
992e9fdd
ZL
2111 MAJOR(__entry->dev), MINOR(__entry->dev),
2112 (unsigned long) __entry->ino,
fdc0212e
ZL
2113 __entry->lblk, __entry->len,
2114 __entry->pblk, __entry->status)
992e9fdd
ZL
2115);
2116
2117TRACE_EVENT(ext4_es_remove_extent,
06b0c886 2118 TP_PROTO(struct inode *inode, ext4_lblk_t lblk, ext4_lblk_t len),
992e9fdd 2119
06b0c886 2120 TP_ARGS(inode, lblk, len),
992e9fdd
ZL
2121
2122 TP_STRUCT__entry(
2123 __field( dev_t, dev )
2124 __field( ino_t, ino )
06b0c886 2125 __field( loff_t, lblk )
992e9fdd
ZL
2126 __field( loff_t, len )
2127 ),
2128
2129 TP_fast_assign(
2130 __entry->dev = inode->i_sb->s_dev;
2131 __entry->ino = inode->i_ino;
06b0c886 2132 __entry->lblk = lblk;
992e9fdd
ZL
2133 __entry->len = len;
2134 ),
2135
2136 TP_printk("dev %d,%d ino %lu es [%lld/%lld)",
2137 MAJOR(__entry->dev), MINOR(__entry->dev),
2138 (unsigned long) __entry->ino,
06b0c886 2139 __entry->lblk, __entry->len)
992e9fdd
ZL
2140);
2141
be401363 2142TRACE_EVENT(ext4_es_find_delayed_extent_enter,
06b0c886 2143 TP_PROTO(struct inode *inode, ext4_lblk_t lblk),
992e9fdd 2144
06b0c886 2145 TP_ARGS(inode, lblk),
992e9fdd
ZL
2146
2147 TP_STRUCT__entry(
2148 __field( dev_t, dev )
2149 __field( ino_t, ino )
06b0c886 2150 __field( ext4_lblk_t, lblk )
992e9fdd
ZL
2151 ),
2152
2153 TP_fast_assign(
2154 __entry->dev = inode->i_sb->s_dev;
2155 __entry->ino = inode->i_ino;
06b0c886 2156 __entry->lblk = lblk;
992e9fdd
ZL
2157 ),
2158
06b0c886 2159 TP_printk("dev %d,%d ino %lu lblk %u",
992e9fdd 2160 MAJOR(__entry->dev), MINOR(__entry->dev),
06b0c886 2161 (unsigned long) __entry->ino, __entry->lblk)
992e9fdd
ZL
2162);
2163
be401363
ZL
2164TRACE_EVENT(ext4_es_find_delayed_extent_exit,
2165 TP_PROTO(struct inode *inode, struct extent_status *es),
992e9fdd 2166
be401363 2167 TP_ARGS(inode, es),
992e9fdd
ZL
2168
2169 TP_STRUCT__entry(
2170 __field( dev_t, dev )
2171 __field( ino_t, ino )
06b0c886 2172 __field( ext4_lblk_t, lblk )
992e9fdd 2173 __field( ext4_lblk_t, len )
fdc0212e
ZL
2174 __field( ext4_fsblk_t, pblk )
2175 __field( unsigned long long, status )
992e9fdd
ZL
2176 ),
2177
2178 TP_fast_assign(
2179 __entry->dev = inode->i_sb->s_dev;
2180 __entry->ino = inode->i_ino;
06b0c886
ZL
2181 __entry->lblk = es->es_lblk;
2182 __entry->len = es->es_len;
fdc0212e
ZL
2183 __entry->pblk = ext4_es_pblock(es);
2184 __entry->status = ext4_es_status(es);
992e9fdd
ZL
2185 ),
2186
be401363 2187 TP_printk("dev %d,%d ino %lu es [%u/%u) mapped %llu status %llx",
992e9fdd
ZL
2188 MAJOR(__entry->dev), MINOR(__entry->dev),
2189 (unsigned long) __entry->ino,
fdc0212e 2190 __entry->lblk, __entry->len,
be401363 2191 __entry->pblk, __entry->status)
992e9fdd
ZL
2192);
2193
d100eef2
ZL
2194TRACE_EVENT(ext4_es_lookup_extent_enter,
2195 TP_PROTO(struct inode *inode, ext4_lblk_t lblk),
2196
2197 TP_ARGS(inode, lblk),
2198
2199 TP_STRUCT__entry(
2200 __field( dev_t, dev )
2201 __field( ino_t, ino )
2202 __field( ext4_lblk_t, lblk )
2203 ),
2204
2205 TP_fast_assign(
2206 __entry->dev = inode->i_sb->s_dev;
2207 __entry->ino = inode->i_ino;
2208 __entry->lblk = lblk;
2209 ),
2210
2211 TP_printk("dev %d,%d ino %lu lblk %u",
2212 MAJOR(__entry->dev), MINOR(__entry->dev),
2213 (unsigned long) __entry->ino, __entry->lblk)
2214);
2215
2216TRACE_EVENT(ext4_es_lookup_extent_exit,
2217 TP_PROTO(struct inode *inode, struct extent_status *es,
2218 int found),
2219
2220 TP_ARGS(inode, es, found),
2221
2222 TP_STRUCT__entry(
2223 __field( dev_t, dev )
2224 __field( ino_t, ino )
2225 __field( ext4_lblk_t, lblk )
2226 __field( ext4_lblk_t, len )
2227 __field( ext4_fsblk_t, pblk )
2228 __field( unsigned long long, status )
2229 __field( int, found )
2230 ),
2231
2232 TP_fast_assign(
2233 __entry->dev = inode->i_sb->s_dev;
2234 __entry->ino = inode->i_ino;
2235 __entry->lblk = es->es_lblk;
2236 __entry->len = es->es_len;
2237 __entry->pblk = ext4_es_pblock(es);
2238 __entry->status = ext4_es_status(es);
2239 __entry->found = found;
2240 ),
2241
2242 TP_printk("dev %d,%d ino %lu found %d [%u/%u) %llu %llx",
2243 MAJOR(__entry->dev), MINOR(__entry->dev),
2244 (unsigned long) __entry->ino, __entry->found,
2245 __entry->lblk, __entry->len,
2246 __entry->found ? __entry->pblk : 0,
2247 __entry->found ? __entry->status : 0)
2248);
2249
74cd15cd 2250TRACE_EVENT(ext4_es_shrink_enter,
24630774 2251 TP_PROTO(struct super_block *sb, int nr_to_scan, int cache_cnt),
74cd15cd 2252
24630774 2253 TP_ARGS(sb, nr_to_scan, cache_cnt),
74cd15cd
ZL
2254
2255 TP_STRUCT__entry(
2256 __field( dev_t, dev )
2257 __field( int, nr_to_scan )
24630774 2258 __field( int, cache_cnt )
74cd15cd
ZL
2259 ),
2260
2261 TP_fast_assign(
2262 __entry->dev = sb->s_dev;
2263 __entry->nr_to_scan = nr_to_scan;
24630774 2264 __entry->cache_cnt = cache_cnt;
74cd15cd
ZL
2265 ),
2266
24630774 2267 TP_printk("dev %d,%d nr_to_scan %d cache_cnt %d",
74cd15cd 2268 MAJOR(__entry->dev), MINOR(__entry->dev),
24630774 2269 __entry->nr_to_scan, __entry->cache_cnt)
74cd15cd
ZL
2270);
2271
2272TRACE_EVENT(ext4_es_shrink_exit,
24630774 2273 TP_PROTO(struct super_block *sb, int shrunk_nr, int cache_cnt),
74cd15cd 2274
24630774 2275 TP_ARGS(sb, shrunk_nr, cache_cnt),
74cd15cd
ZL
2276
2277 TP_STRUCT__entry(
2278 __field( dev_t, dev )
2279 __field( int, shrunk_nr )
24630774 2280 __field( int, cache_cnt )
74cd15cd
ZL
2281 ),
2282
2283 TP_fast_assign(
2284 __entry->dev = sb->s_dev;
2285 __entry->shrunk_nr = shrunk_nr;
24630774 2286 __entry->cache_cnt = cache_cnt;
74cd15cd
ZL
2287 ),
2288
24630774 2289 TP_printk("dev %d,%d shrunk_nr %d cache_cnt %d",
74cd15cd 2290 MAJOR(__entry->dev), MINOR(__entry->dev),
24630774 2291 __entry->shrunk_nr, __entry->cache_cnt)
74cd15cd
ZL
2292);
2293
9bffad1e
TT
2294#endif /* _TRACE_EXT4_H */
2295
2296/* This part must be outside protection */
2297#include <trace/define_trace.h>