diff options
Diffstat (limited to 'include/trace/events/ext4.h')
-rw-r--r-- | include/trace/events/ext4.h | 719 |
1 files changed, 719 insertions, 0 deletions
diff --git a/include/trace/events/ext4.h b/include/trace/events/ext4.h new file mode 100644 index 000000000000..acf4cc9cd36d --- /dev/null +++ b/include/trace/events/ext4.h | |||
@@ -0,0 +1,719 @@ | |||
1 | #if !defined(_TRACE_EXT4_H) || defined(TRACE_HEADER_MULTI_READ) | ||
2 | #define _TRACE_EXT4_H | ||
3 | |||
4 | #undef TRACE_SYSTEM | ||
5 | #define TRACE_SYSTEM ext4 | ||
6 | |||
7 | #include <linux/writeback.h> | ||
8 | #include "../../../fs/ext4/ext4.h" | ||
9 | #include "../../../fs/ext4/mballoc.h" | ||
10 | #include <linux/tracepoint.h> | ||
11 | |||
12 | TRACE_EVENT(ext4_free_inode, | ||
13 | TP_PROTO(struct inode *inode), | ||
14 | |||
15 | TP_ARGS(inode), | ||
16 | |||
17 | TP_STRUCT__entry( | ||
18 | __field( dev_t, dev ) | ||
19 | __field( ino_t, ino ) | ||
20 | __field( umode_t, mode ) | ||
21 | __field( uid_t, uid ) | ||
22 | __field( gid_t, gid ) | ||
23 | __field( blkcnt_t, blocks ) | ||
24 | ), | ||
25 | |||
26 | TP_fast_assign( | ||
27 | __entry->dev = inode->i_sb->s_dev; | ||
28 | __entry->ino = inode->i_ino; | ||
29 | __entry->mode = inode->i_mode; | ||
30 | __entry->uid = inode->i_uid; | ||
31 | __entry->gid = inode->i_gid; | ||
32 | __entry->blocks = inode->i_blocks; | ||
33 | ), | ||
34 | |||
35 | TP_printk("dev %s ino %lu mode %d uid %u gid %u blocks %llu", | ||
36 | jbd2_dev_to_name(__entry->dev), __entry->ino, __entry->mode, | ||
37 | __entry->uid, __entry->gid, __entry->blocks) | ||
38 | ); | ||
39 | |||
40 | TRACE_EVENT(ext4_request_inode, | ||
41 | TP_PROTO(struct inode *dir, int mode), | ||
42 | |||
43 | TP_ARGS(dir, mode), | ||
44 | |||
45 | TP_STRUCT__entry( | ||
46 | __field( dev_t, dev ) | ||
47 | __field( ino_t, dir ) | ||
48 | __field( umode_t, mode ) | ||
49 | ), | ||
50 | |||
51 | TP_fast_assign( | ||
52 | __entry->dev = dir->i_sb->s_dev; | ||
53 | __entry->dir = dir->i_ino; | ||
54 | __entry->mode = mode; | ||
55 | ), | ||
56 | |||
57 | TP_printk("dev %s dir %lu mode %d", | ||
58 | jbd2_dev_to_name(__entry->dev), __entry->dir, __entry->mode) | ||
59 | ); | ||
60 | |||
61 | TRACE_EVENT(ext4_allocate_inode, | ||
62 | TP_PROTO(struct inode *inode, struct inode *dir, int mode), | ||
63 | |||
64 | TP_ARGS(inode, dir, mode), | ||
65 | |||
66 | TP_STRUCT__entry( | ||
67 | __field( dev_t, dev ) | ||
68 | __field( ino_t, ino ) | ||
69 | __field( ino_t, dir ) | ||
70 | __field( umode_t, mode ) | ||
71 | ), | ||
72 | |||
73 | TP_fast_assign( | ||
74 | __entry->dev = inode->i_sb->s_dev; | ||
75 | __entry->ino = inode->i_ino; | ||
76 | __entry->dir = dir->i_ino; | ||
77 | __entry->mode = mode; | ||
78 | ), | ||
79 | |||
80 | TP_printk("dev %s ino %lu dir %lu mode %d", | ||
81 | jbd2_dev_to_name(__entry->dev), __entry->ino, __entry->dir, __entry->mode) | ||
82 | ); | ||
83 | |||
84 | TRACE_EVENT(ext4_write_begin, | ||
85 | |||
86 | TP_PROTO(struct inode *inode, loff_t pos, unsigned int len, | ||
87 | unsigned int flags), | ||
88 | |||
89 | TP_ARGS(inode, pos, len, flags), | ||
90 | |||
91 | TP_STRUCT__entry( | ||
92 | __field( dev_t, dev ) | ||
93 | __field( ino_t, ino ) | ||
94 | __field( loff_t, pos ) | ||
95 | __field( unsigned int, len ) | ||
96 | __field( unsigned int, flags ) | ||
97 | ), | ||
98 | |||
99 | TP_fast_assign( | ||
100 | __entry->dev = inode->i_sb->s_dev; | ||
101 | __entry->ino = inode->i_ino; | ||
102 | __entry->pos = pos; | ||
103 | __entry->len = len; | ||
104 | __entry->flags = flags; | ||
105 | ), | ||
106 | |||
107 | TP_printk("dev %s ino %lu pos %llu len %u flags %u", | ||
108 | jbd2_dev_to_name(__entry->dev), __entry->ino, __entry->pos, __entry->len, | ||
109 | __entry->flags) | ||
110 | ); | ||
111 | |||
112 | TRACE_EVENT(ext4_ordered_write_end, | ||
113 | TP_PROTO(struct inode *inode, loff_t pos, unsigned int len, | ||
114 | unsigned int copied), | ||
115 | |||
116 | TP_ARGS(inode, pos, len, copied), | ||
117 | |||
118 | TP_STRUCT__entry( | ||
119 | __field( dev_t, dev ) | ||
120 | __field( ino_t, ino ) | ||
121 | __field( loff_t, pos ) | ||
122 | __field( unsigned int, len ) | ||
123 | __field( unsigned int, copied ) | ||
124 | ), | ||
125 | |||
126 | TP_fast_assign( | ||
127 | __entry->dev = inode->i_sb->s_dev; | ||
128 | __entry->ino = inode->i_ino; | ||
129 | __entry->pos = pos; | ||
130 | __entry->len = len; | ||
131 | __entry->copied = copied; | ||
132 | ), | ||
133 | |||
134 | TP_printk("dev %s ino %lu pos %llu len %u copied %u", | ||
135 | jbd2_dev_to_name(__entry->dev), __entry->ino, __entry->pos, __entry->len, | ||
136 | __entry->copied) | ||
137 | ); | ||
138 | |||
139 | TRACE_EVENT(ext4_writeback_write_end, | ||
140 | TP_PROTO(struct inode *inode, loff_t pos, unsigned int len, | ||
141 | unsigned int copied), | ||
142 | |||
143 | TP_ARGS(inode, pos, len, copied), | ||
144 | |||
145 | TP_STRUCT__entry( | ||
146 | __field( dev_t, dev ) | ||
147 | __field( ino_t, ino ) | ||
148 | __field( loff_t, pos ) | ||
149 | __field( unsigned int, len ) | ||
150 | __field( unsigned int, copied ) | ||
151 | ), | ||
152 | |||
153 | TP_fast_assign( | ||
154 | __entry->dev = inode->i_sb->s_dev; | ||
155 | __entry->ino = inode->i_ino; | ||
156 | __entry->pos = pos; | ||
157 | __entry->len = len; | ||
158 | __entry->copied = copied; | ||
159 | ), | ||
160 | |||
161 | TP_printk("dev %s ino %lu pos %llu len %u copied %u", | ||
162 | jbd2_dev_to_name(__entry->dev), __entry->ino, __entry->pos, __entry->len, | ||
163 | __entry->copied) | ||
164 | ); | ||
165 | |||
166 | TRACE_EVENT(ext4_journalled_write_end, | ||
167 | TP_PROTO(struct inode *inode, loff_t pos, unsigned int len, | ||
168 | unsigned int copied), | ||
169 | TP_ARGS(inode, pos, len, copied), | ||
170 | |||
171 | TP_STRUCT__entry( | ||
172 | __field( dev_t, dev ) | ||
173 | __field( ino_t, ino ) | ||
174 | __field( loff_t, pos ) | ||
175 | __field( unsigned int, len ) | ||
176 | __field( unsigned int, copied ) | ||
177 | ), | ||
178 | |||
179 | TP_fast_assign( | ||
180 | __entry->dev = inode->i_sb->s_dev; | ||
181 | __entry->ino = inode->i_ino; | ||
182 | __entry->pos = pos; | ||
183 | __entry->len = len; | ||
184 | __entry->copied = copied; | ||
185 | ), | ||
186 | |||
187 | TP_printk("dev %s ino %lu pos %llu len %u copied %u", | ||
188 | jbd2_dev_to_name(__entry->dev), __entry->ino, __entry->pos, __entry->len, | ||
189 | __entry->copied) | ||
190 | ); | ||
191 | |||
192 | TRACE_EVENT(ext4_da_writepage, | ||
193 | TP_PROTO(struct inode *inode, struct page *page), | ||
194 | |||
195 | TP_ARGS(inode, page), | ||
196 | |||
197 | TP_STRUCT__entry( | ||
198 | __field( dev_t, dev ) | ||
199 | __field( ino_t, ino ) | ||
200 | __field( pgoff_t, index ) | ||
201 | |||
202 | ), | ||
203 | |||
204 | TP_fast_assign( | ||
205 | __entry->dev = inode->i_sb->s_dev; | ||
206 | __entry->ino = inode->i_ino; | ||
207 | __entry->index = page->index; | ||
208 | ), | ||
209 | |||
210 | TP_printk("dev %s ino %lu page_index %lu", | ||
211 | jbd2_dev_to_name(__entry->dev), __entry->ino, __entry->index) | ||
212 | ); | ||
213 | |||
214 | TRACE_EVENT(ext4_da_writepages, | ||
215 | TP_PROTO(struct inode *inode, struct writeback_control *wbc), | ||
216 | |||
217 | TP_ARGS(inode, wbc), | ||
218 | |||
219 | TP_STRUCT__entry( | ||
220 | __field( dev_t, dev ) | ||
221 | __field( ino_t, ino ) | ||
222 | __field( long, nr_to_write ) | ||
223 | __field( long, pages_skipped ) | ||
224 | __field( loff_t, range_start ) | ||
225 | __field( loff_t, range_end ) | ||
226 | __field( char, nonblocking ) | ||
227 | __field( char, for_kupdate ) | ||
228 | __field( char, for_reclaim ) | ||
229 | __field( char, for_writepages ) | ||
230 | __field( char, range_cyclic ) | ||
231 | ), | ||
232 | |||
233 | TP_fast_assign( | ||
234 | __entry->dev = inode->i_sb->s_dev; | ||
235 | __entry->ino = inode->i_ino; | ||
236 | __entry->nr_to_write = wbc->nr_to_write; | ||
237 | __entry->pages_skipped = wbc->pages_skipped; | ||
238 | __entry->range_start = wbc->range_start; | ||
239 | __entry->range_end = wbc->range_end; | ||
240 | __entry->nonblocking = wbc->nonblocking; | ||
241 | __entry->for_kupdate = wbc->for_kupdate; | ||
242 | __entry->for_reclaim = wbc->for_reclaim; | ||
243 | __entry->for_writepages = wbc->for_writepages; | ||
244 | __entry->range_cyclic = wbc->range_cyclic; | ||
245 | ), | ||
246 | |||
247 | TP_printk("dev %s ino %lu nr_t_write %ld pages_skipped %ld range_start %llu range_end %llu nonblocking %d for_kupdate %d for_reclaim %d for_writepages %d range_cyclic %d", | ||
248 | jbd2_dev_to_name(__entry->dev), __entry->ino, __entry->nr_to_write, | ||
249 | __entry->pages_skipped, __entry->range_start, | ||
250 | __entry->range_end, __entry->nonblocking, | ||
251 | __entry->for_kupdate, __entry->for_reclaim, | ||
252 | __entry->for_writepages, __entry->range_cyclic) | ||
253 | ); | ||
254 | |||
255 | TRACE_EVENT(ext4_da_writepages_result, | ||
256 | TP_PROTO(struct inode *inode, struct writeback_control *wbc, | ||
257 | int ret, int pages_written), | ||
258 | |||
259 | TP_ARGS(inode, wbc, ret, pages_written), | ||
260 | |||
261 | TP_STRUCT__entry( | ||
262 | __field( dev_t, dev ) | ||
263 | __field( ino_t, ino ) | ||
264 | __field( int, ret ) | ||
265 | __field( int, pages_written ) | ||
266 | __field( long, pages_skipped ) | ||
267 | __field( char, encountered_congestion ) | ||
268 | __field( char, more_io ) | ||
269 | __field( char, no_nrwrite_index_update ) | ||
270 | ), | ||
271 | |||
272 | TP_fast_assign( | ||
273 | __entry->dev = inode->i_sb->s_dev; | ||
274 | __entry->ino = inode->i_ino; | ||
275 | __entry->ret = ret; | ||
276 | __entry->pages_written = pages_written; | ||
277 | __entry->pages_skipped = wbc->pages_skipped; | ||
278 | __entry->encountered_congestion = wbc->encountered_congestion; | ||
279 | __entry->more_io = wbc->more_io; | ||
280 | __entry->no_nrwrite_index_update = wbc->no_nrwrite_index_update; | ||
281 | ), | ||
282 | |||
283 | TP_printk("dev %s ino %lu ret %d pages_written %d pages_skipped %ld congestion %d more_io %d no_nrwrite_index_update %d", | ||
284 | jbd2_dev_to_name(__entry->dev), __entry->ino, __entry->ret, | ||
285 | __entry->pages_written, __entry->pages_skipped, | ||
286 | __entry->encountered_congestion, __entry->more_io, | ||
287 | __entry->no_nrwrite_index_update) | ||
288 | ); | ||
289 | |||
290 | TRACE_EVENT(ext4_da_write_begin, | ||
291 | TP_PROTO(struct inode *inode, loff_t pos, unsigned int len, | ||
292 | unsigned int flags), | ||
293 | |||
294 | TP_ARGS(inode, pos, len, flags), | ||
295 | |||
296 | TP_STRUCT__entry( | ||
297 | __field( dev_t, dev ) | ||
298 | __field( ino_t, ino ) | ||
299 | __field( loff_t, pos ) | ||
300 | __field( unsigned int, len ) | ||
301 | __field( unsigned int, flags ) | ||
302 | ), | ||
303 | |||
304 | TP_fast_assign( | ||
305 | __entry->dev = inode->i_sb->s_dev; | ||
306 | __entry->ino = inode->i_ino; | ||
307 | __entry->pos = pos; | ||
308 | __entry->len = len; | ||
309 | __entry->flags = flags; | ||
310 | ), | ||
311 | |||
312 | TP_printk("dev %s ino %lu pos %llu len %u flags %u", | ||
313 | jbd2_dev_to_name(__entry->dev), __entry->ino, __entry->pos, __entry->len, | ||
314 | __entry->flags) | ||
315 | ); | ||
316 | |||
317 | TRACE_EVENT(ext4_da_write_end, | ||
318 | TP_PROTO(struct inode *inode, loff_t pos, unsigned int len, | ||
319 | unsigned int copied), | ||
320 | |||
321 | TP_ARGS(inode, pos, len, copied), | ||
322 | |||
323 | TP_STRUCT__entry( | ||
324 | __field( dev_t, dev ) | ||
325 | __field( ino_t, ino ) | ||
326 | __field( loff_t, pos ) | ||
327 | __field( unsigned int, len ) | ||
328 | __field( unsigned int, copied ) | ||
329 | ), | ||
330 | |||
331 | TP_fast_assign( | ||
332 | __entry->dev = inode->i_sb->s_dev; | ||
333 | __entry->ino = inode->i_ino; | ||
334 | __entry->pos = pos; | ||
335 | __entry->len = len; | ||
336 | __entry->copied = copied; | ||
337 | ), | ||
338 | |||
339 | TP_printk("dev %s ino %lu pos %llu len %u copied %u", | ||
340 | jbd2_dev_to_name(__entry->dev), __entry->ino, __entry->pos, __entry->len, | ||
341 | __entry->copied) | ||
342 | ); | ||
343 | |||
344 | TRACE_EVENT(ext4_normal_writepage, | ||
345 | TP_PROTO(struct inode *inode, struct page *page), | ||
346 | |||
347 | TP_ARGS(inode, page), | ||
348 | |||
349 | TP_STRUCT__entry( | ||
350 | __field( dev_t, dev ) | ||
351 | __field( ino_t, ino ) | ||
352 | __field( pgoff_t, index ) | ||
353 | ), | ||
354 | |||
355 | TP_fast_assign( | ||
356 | __entry->dev = inode->i_sb->s_dev; | ||
357 | __entry->ino = inode->i_ino; | ||
358 | __entry->index = page->index; | ||
359 | ), | ||
360 | |||
361 | TP_printk("dev %s ino %lu page_index %lu", | ||
362 | jbd2_dev_to_name(__entry->dev), __entry->ino, __entry->index) | ||
363 | ); | ||
364 | |||
365 | TRACE_EVENT(ext4_journalled_writepage, | ||
366 | TP_PROTO(struct inode *inode, struct page *page), | ||
367 | |||
368 | TP_ARGS(inode, page), | ||
369 | |||
370 | TP_STRUCT__entry( | ||
371 | __field( dev_t, dev ) | ||
372 | __field( ino_t, ino ) | ||
373 | __field( pgoff_t, index ) | ||
374 | |||
375 | ), | ||
376 | |||
377 | TP_fast_assign( | ||
378 | __entry->dev = inode->i_sb->s_dev; | ||
379 | __entry->ino = inode->i_ino; | ||
380 | __entry->index = page->index; | ||
381 | ), | ||
382 | |||
383 | TP_printk("dev %s ino %lu page_index %lu", | ||
384 | jbd2_dev_to_name(__entry->dev), __entry->ino, __entry->index) | ||
385 | ); | ||
386 | |||
387 | TRACE_EVENT(ext4_discard_blocks, | ||
388 | TP_PROTO(struct super_block *sb, unsigned long long blk, | ||
389 | unsigned long long count), | ||
390 | |||
391 | TP_ARGS(sb, blk, count), | ||
392 | |||
393 | TP_STRUCT__entry( | ||
394 | __field( dev_t, dev ) | ||
395 | __field( __u64, blk ) | ||
396 | __field( __u64, count ) | ||
397 | |||
398 | ), | ||
399 | |||
400 | TP_fast_assign( | ||
401 | __entry->dev = sb->s_dev; | ||
402 | __entry->blk = blk; | ||
403 | __entry->count = count; | ||
404 | ), | ||
405 | |||
406 | TP_printk("dev %s blk %llu count %llu", | ||
407 | jbd2_dev_to_name(__entry->dev), __entry->blk, __entry->count) | ||
408 | ); | ||
409 | |||
410 | TRACE_EVENT(ext4_mb_new_inode_pa, | ||
411 | TP_PROTO(struct ext4_allocation_context *ac, | ||
412 | struct ext4_prealloc_space *pa), | ||
413 | |||
414 | TP_ARGS(ac, pa), | ||
415 | |||
416 | TP_STRUCT__entry( | ||
417 | __field( dev_t, dev ) | ||
418 | __field( ino_t, ino ) | ||
419 | __field( __u64, pa_pstart ) | ||
420 | __field( __u32, pa_len ) | ||
421 | __field( __u64, pa_lstart ) | ||
422 | |||
423 | ), | ||
424 | |||
425 | TP_fast_assign( | ||
426 | __entry->dev = ac->ac_sb->s_dev; | ||
427 | __entry->ino = ac->ac_inode->i_ino; | ||
428 | __entry->pa_pstart = pa->pa_pstart; | ||
429 | __entry->pa_len = pa->pa_len; | ||
430 | __entry->pa_lstart = pa->pa_lstart; | ||
431 | ), | ||
432 | |||
433 | TP_printk("dev %s ino %lu pstart %llu len %u lstart %llu", | ||
434 | jbd2_dev_to_name(__entry->dev), __entry->ino, __entry->pa_pstart, | ||
435 | __entry->pa_len, __entry->pa_lstart) | ||
436 | ); | ||
437 | |||
438 | TRACE_EVENT(ext4_mb_new_group_pa, | ||
439 | TP_PROTO(struct ext4_allocation_context *ac, | ||
440 | struct ext4_prealloc_space *pa), | ||
441 | |||
442 | TP_ARGS(ac, pa), | ||
443 | |||
444 | TP_STRUCT__entry( | ||
445 | __field( dev_t, dev ) | ||
446 | __field( ino_t, ino ) | ||
447 | __field( __u64, pa_pstart ) | ||
448 | __field( __u32, pa_len ) | ||
449 | __field( __u64, pa_lstart ) | ||
450 | |||
451 | ), | ||
452 | |||
453 | TP_fast_assign( | ||
454 | __entry->dev = ac->ac_sb->s_dev; | ||
455 | __entry->ino = ac->ac_inode->i_ino; | ||
456 | __entry->pa_pstart = pa->pa_pstart; | ||
457 | __entry->pa_len = pa->pa_len; | ||
458 | __entry->pa_lstart = pa->pa_lstart; | ||
459 | ), | ||
460 | |||
461 | TP_printk("dev %s ino %lu pstart %llu len %u lstart %llu", | ||
462 | jbd2_dev_to_name(__entry->dev), __entry->ino, __entry->pa_pstart, | ||
463 | __entry->pa_len, __entry->pa_lstart) | ||
464 | ); | ||
465 | |||
466 | TRACE_EVENT(ext4_mb_release_inode_pa, | ||
467 | TP_PROTO(struct ext4_allocation_context *ac, | ||
468 | struct ext4_prealloc_space *pa, | ||
469 | unsigned long long block, unsigned int count), | ||
470 | |||
471 | TP_ARGS(ac, pa, block, count), | ||
472 | |||
473 | TP_STRUCT__entry( | ||
474 | __field( dev_t, dev ) | ||
475 | __field( ino_t, ino ) | ||
476 | __field( __u64, block ) | ||
477 | __field( __u32, count ) | ||
478 | |||
479 | ), | ||
480 | |||
481 | TP_fast_assign( | ||
482 | __entry->dev = ac->ac_sb->s_dev; | ||
483 | __entry->ino = ac->ac_inode->i_ino; | ||
484 | __entry->block = block; | ||
485 | __entry->count = count; | ||
486 | ), | ||
487 | |||
488 | TP_printk("dev %s ino %lu block %llu count %u", | ||
489 | jbd2_dev_to_name(__entry->dev), __entry->ino, __entry->block, | ||
490 | __entry->count) | ||
491 | ); | ||
492 | |||
493 | TRACE_EVENT(ext4_mb_release_group_pa, | ||
494 | TP_PROTO(struct ext4_allocation_context *ac, | ||
495 | struct ext4_prealloc_space *pa), | ||
496 | |||
497 | TP_ARGS(ac, pa), | ||
498 | |||
499 | TP_STRUCT__entry( | ||
500 | __field( dev_t, dev ) | ||
501 | __field( ino_t, ino ) | ||
502 | __field( __u64, pa_pstart ) | ||
503 | __field( __u32, pa_len ) | ||
504 | |||
505 | ), | ||
506 | |||
507 | TP_fast_assign( | ||
508 | __entry->dev = ac->ac_sb->s_dev; | ||
509 | __entry->ino = ac->ac_inode->i_ino; | ||
510 | __entry->pa_pstart = pa->pa_pstart; | ||
511 | __entry->pa_len = pa->pa_len; | ||
512 | ), | ||
513 | |||
514 | TP_printk("dev %s pstart %llu len %u", | ||
515 | jbd2_dev_to_name(__entry->dev), __entry->pa_pstart, __entry->pa_len) | ||
516 | ); | ||
517 | |||
518 | TRACE_EVENT(ext4_discard_preallocations, | ||
519 | TP_PROTO(struct inode *inode), | ||
520 | |||
521 | TP_ARGS(inode), | ||
522 | |||
523 | TP_STRUCT__entry( | ||
524 | __field( dev_t, dev ) | ||
525 | __field( ino_t, ino ) | ||
526 | |||
527 | ), | ||
528 | |||
529 | TP_fast_assign( | ||
530 | __entry->dev = inode->i_sb->s_dev; | ||
531 | __entry->ino = inode->i_ino; | ||
532 | ), | ||
533 | |||
534 | TP_printk("dev %s ino %lu", | ||
535 | jbd2_dev_to_name(__entry->dev), __entry->ino) | ||
536 | ); | ||
537 | |||
538 | TRACE_EVENT(ext4_mb_discard_preallocations, | ||
539 | TP_PROTO(struct super_block *sb, int needed), | ||
540 | |||
541 | TP_ARGS(sb, needed), | ||
542 | |||
543 | TP_STRUCT__entry( | ||
544 | __field( dev_t, dev ) | ||
545 | __field( int, needed ) | ||
546 | |||
547 | ), | ||
548 | |||
549 | TP_fast_assign( | ||
550 | __entry->dev = sb->s_dev; | ||
551 | __entry->needed = needed; | ||
552 | ), | ||
553 | |||
554 | TP_printk("dev %s needed %d", | ||
555 | jbd2_dev_to_name(__entry->dev), __entry->needed) | ||
556 | ); | ||
557 | |||
558 | TRACE_EVENT(ext4_request_blocks, | ||
559 | TP_PROTO(struct ext4_allocation_request *ar), | ||
560 | |||
561 | TP_ARGS(ar), | ||
562 | |||
563 | TP_STRUCT__entry( | ||
564 | __field( dev_t, dev ) | ||
565 | __field( ino_t, ino ) | ||
566 | __field( unsigned int, flags ) | ||
567 | __field( unsigned int, len ) | ||
568 | __field( __u64, logical ) | ||
569 | __field( __u64, goal ) | ||
570 | __field( __u64, lleft ) | ||
571 | __field( __u64, lright ) | ||
572 | __field( __u64, pleft ) | ||
573 | __field( __u64, pright ) | ||
574 | ), | ||
575 | |||
576 | TP_fast_assign( | ||
577 | __entry->dev = ar->inode->i_sb->s_dev; | ||
578 | __entry->ino = ar->inode->i_ino; | ||
579 | __entry->flags = ar->flags; | ||
580 | __entry->len = ar->len; | ||
581 | __entry->logical = ar->logical; | ||
582 | __entry->goal = ar->goal; | ||
583 | __entry->lleft = ar->lleft; | ||
584 | __entry->lright = ar->lright; | ||
585 | __entry->pleft = ar->pleft; | ||
586 | __entry->pright = ar->pright; | ||
587 | ), | ||
588 | |||
589 | TP_printk("dev %s ino %lu flags %u len %u lblk %llu goal %llu lleft %llu lright %llu pleft %llu pright %llu ", | ||
590 | jbd2_dev_to_name(__entry->dev), __entry->ino, __entry->flags, | ||
591 | __entry->len, | ||
592 | (unsigned long long) __entry->logical, | ||
593 | (unsigned long long) __entry->goal, | ||
594 | (unsigned long long) __entry->lleft, | ||
595 | (unsigned long long) __entry->lright, | ||
596 | (unsigned long long) __entry->pleft, | ||
597 | (unsigned long long) __entry->pright) | ||
598 | ); | ||
599 | |||
600 | TRACE_EVENT(ext4_allocate_blocks, | ||
601 | TP_PROTO(struct ext4_allocation_request *ar, unsigned long long block), | ||
602 | |||
603 | TP_ARGS(ar, block), | ||
604 | |||
605 | TP_STRUCT__entry( | ||
606 | __field( dev_t, dev ) | ||
607 | __field( ino_t, ino ) | ||
608 | __field( __u64, block ) | ||
609 | __field( unsigned int, flags ) | ||
610 | __field( unsigned int, len ) | ||
611 | __field( __u64, logical ) | ||
612 | __field( __u64, goal ) | ||
613 | __field( __u64, lleft ) | ||
614 | __field( __u64, lright ) | ||
615 | __field( __u64, pleft ) | ||
616 | __field( __u64, pright ) | ||
617 | ), | ||
618 | |||
619 | TP_fast_assign( | ||
620 | __entry->dev = ar->inode->i_sb->s_dev; | ||
621 | __entry->ino = ar->inode->i_ino; | ||
622 | __entry->block = block; | ||
623 | __entry->flags = ar->flags; | ||
624 | __entry->len = ar->len; | ||
625 | __entry->logical = ar->logical; | ||
626 | __entry->goal = ar->goal; | ||
627 | __entry->lleft = ar->lleft; | ||
628 | __entry->lright = ar->lright; | ||
629 | __entry->pleft = ar->pleft; | ||
630 | __entry->pright = ar->pright; | ||
631 | ), | ||
632 | |||
633 | TP_printk("dev %s ino %lu flags %u len %u block %llu lblk %llu goal %llu lleft %llu lright %llu pleft %llu pright %llu ", | ||
634 | jbd2_dev_to_name(__entry->dev), __entry->ino, __entry->flags, | ||
635 | __entry->len, __entry->block, | ||
636 | (unsigned long long) __entry->logical, | ||
637 | (unsigned long long) __entry->goal, | ||
638 | (unsigned long long) __entry->lleft, | ||
639 | (unsigned long long) __entry->lright, | ||
640 | (unsigned long long) __entry->pleft, | ||
641 | (unsigned long long) __entry->pright) | ||
642 | ); | ||
643 | |||
644 | TRACE_EVENT(ext4_free_blocks, | ||
645 | TP_PROTO(struct inode *inode, __u64 block, unsigned long count, | ||
646 | int metadata), | ||
647 | |||
648 | TP_ARGS(inode, block, count, metadata), | ||
649 | |||
650 | TP_STRUCT__entry( | ||
651 | __field( dev_t, dev ) | ||
652 | __field( ino_t, ino ) | ||
653 | __field( __u64, block ) | ||
654 | __field( unsigned long, count ) | ||
655 | __field( int, metadata ) | ||
656 | |||
657 | ), | ||
658 | |||
659 | TP_fast_assign( | ||
660 | __entry->dev = inode->i_sb->s_dev; | ||
661 | __entry->ino = inode->i_ino; | ||
662 | __entry->block = block; | ||
663 | __entry->count = count; | ||
664 | __entry->metadata = metadata; | ||
665 | ), | ||
666 | |||
667 | TP_printk("dev %s ino %lu block %llu count %lu metadata %d", | ||
668 | jbd2_dev_to_name(__entry->dev), __entry->ino, __entry->block, | ||
669 | __entry->count, __entry->metadata) | ||
670 | ); | ||
671 | |||
672 | TRACE_EVENT(ext4_sync_file, | ||
673 | TP_PROTO(struct file *file, struct dentry *dentry, int datasync), | ||
674 | |||
675 | TP_ARGS(file, dentry, datasync), | ||
676 | |||
677 | TP_STRUCT__entry( | ||
678 | __field( dev_t, dev ) | ||
679 | __field( ino_t, ino ) | ||
680 | __field( ino_t, parent ) | ||
681 | __field( int, datasync ) | ||
682 | ), | ||
683 | |||
684 | TP_fast_assign( | ||
685 | __entry->dev = dentry->d_inode->i_sb->s_dev; | ||
686 | __entry->ino = dentry->d_inode->i_ino; | ||
687 | __entry->datasync = datasync; | ||
688 | __entry->parent = dentry->d_parent->d_inode->i_ino; | ||
689 | ), | ||
690 | |||
691 | TP_printk("dev %s ino %ld parent %ld datasync %d ", | ||
692 | jbd2_dev_to_name(__entry->dev), __entry->ino, __entry->parent, | ||
693 | __entry->datasync) | ||
694 | ); | ||
695 | |||
696 | TRACE_EVENT(ext4_sync_fs, | ||
697 | TP_PROTO(struct super_block *sb, int wait), | ||
698 | |||
699 | TP_ARGS(sb, wait), | ||
700 | |||
701 | TP_STRUCT__entry( | ||
702 | __field( dev_t, dev ) | ||
703 | __field( int, wait ) | ||
704 | |||
705 | ), | ||
706 | |||
707 | TP_fast_assign( | ||
708 | __entry->dev = sb->s_dev; | ||
709 | __entry->wait = wait; | ||
710 | ), | ||
711 | |||
712 | TP_printk("dev %s wait %d", jbd2_dev_to_name(__entry->dev), | ||
713 | __entry->wait) | ||
714 | ); | ||
715 | |||
716 | #endif /* _TRACE_EXT4_H */ | ||
717 | |||
718 | /* This part must be outside protection */ | ||
719 | #include <trace/define_trace.h> | ||