mm: fix exec activate_mm vs TLB shootdown and lazy tlb switching race
[linux/fpc-iii.git] / fs / ocfs2 / ocfs2_trace.h
bloba0b5d00ef0a92ecb91627e3a35391b94937b661e
1 /* SPDX-License-Identifier: GPL-2.0 */
2 #undef TRACE_SYSTEM
3 #define TRACE_SYSTEM ocfs2
5 #if !defined(_TRACE_OCFS2_H) || defined(TRACE_HEADER_MULTI_READ)
6 #define _TRACE_OCFS2_H
8 #include <linux/tracepoint.h>
10 DECLARE_EVENT_CLASS(ocfs2__int,
11 TP_PROTO(int num),
12 TP_ARGS(num),
13 TP_STRUCT__entry(
14 __field(int, num)
16 TP_fast_assign(
17 __entry->num = num;
19 TP_printk("%d", __entry->num)
22 #define DEFINE_OCFS2_INT_EVENT(name) \
23 DEFINE_EVENT(ocfs2__int, name, \
24 TP_PROTO(int num), \
25 TP_ARGS(num))
27 DECLARE_EVENT_CLASS(ocfs2__uint,
28 TP_PROTO(unsigned int num),
29 TP_ARGS(num),
30 TP_STRUCT__entry(
31 __field( unsigned int, num )
33 TP_fast_assign(
34 __entry->num = num;
36 TP_printk("%u", __entry->num)
39 #define DEFINE_OCFS2_UINT_EVENT(name) \
40 DEFINE_EVENT(ocfs2__uint, name, \
41 TP_PROTO(unsigned int num), \
42 TP_ARGS(num))
44 DECLARE_EVENT_CLASS(ocfs2__ull,
45 TP_PROTO(unsigned long long blkno),
46 TP_ARGS(blkno),
47 TP_STRUCT__entry(
48 __field(unsigned long long, blkno)
50 TP_fast_assign(
51 __entry->blkno = blkno;
53 TP_printk("%llu", __entry->blkno)
56 #define DEFINE_OCFS2_ULL_EVENT(name) \
57 DEFINE_EVENT(ocfs2__ull, name, \
58 TP_PROTO(unsigned long long num), \
59 TP_ARGS(num))
61 DECLARE_EVENT_CLASS(ocfs2__pointer,
62 TP_PROTO(void *pointer),
63 TP_ARGS(pointer),
64 TP_STRUCT__entry(
65 __field(void *, pointer)
67 TP_fast_assign(
68 __entry->pointer = pointer;
70 TP_printk("%p", __entry->pointer)
73 #define DEFINE_OCFS2_POINTER_EVENT(name) \
74 DEFINE_EVENT(ocfs2__pointer, name, \
75 TP_PROTO(void *pointer), \
76 TP_ARGS(pointer))
78 DECLARE_EVENT_CLASS(ocfs2__string,
79 TP_PROTO(const char *name),
80 TP_ARGS(name),
81 TP_STRUCT__entry(
82 __string(name,name)
84 TP_fast_assign(
85 __assign_str(name, name);
87 TP_printk("%s", __get_str(name))
90 #define DEFINE_OCFS2_STRING_EVENT(name) \
91 DEFINE_EVENT(ocfs2__string, name, \
92 TP_PROTO(const char *name), \
93 TP_ARGS(name))
95 DECLARE_EVENT_CLASS(ocfs2__int_int,
96 TP_PROTO(int value1, int value2),
97 TP_ARGS(value1, value2),
98 TP_STRUCT__entry(
99 __field(int, value1)
100 __field(int, value2)
102 TP_fast_assign(
103 __entry->value1 = value1;
104 __entry->value2 = value2;
106 TP_printk("%d %d", __entry->value1, __entry->value2)
109 #define DEFINE_OCFS2_INT_INT_EVENT(name) \
110 DEFINE_EVENT(ocfs2__int_int, name, \
111 TP_PROTO(int val1, int val2), \
112 TP_ARGS(val1, val2))
114 DECLARE_EVENT_CLASS(ocfs2__uint_int,
115 TP_PROTO(unsigned int value1, int value2),
116 TP_ARGS(value1, value2),
117 TP_STRUCT__entry(
118 __field(unsigned int, value1)
119 __field(int, value2)
121 TP_fast_assign(
122 __entry->value1 = value1;
123 __entry->value2 = value2;
125 TP_printk("%u %d", __entry->value1, __entry->value2)
128 #define DEFINE_OCFS2_UINT_INT_EVENT(name) \
129 DEFINE_EVENT(ocfs2__uint_int, name, \
130 TP_PROTO(unsigned int val1, int val2), \
131 TP_ARGS(val1, val2))
133 DECLARE_EVENT_CLASS(ocfs2__uint_uint,
134 TP_PROTO(unsigned int value1, unsigned int value2),
135 TP_ARGS(value1, value2),
136 TP_STRUCT__entry(
137 __field(unsigned int, value1)
138 __field(unsigned int, value2)
140 TP_fast_assign(
141 __entry->value1 = value1;
142 __entry->value2 = value2;
144 TP_printk("%u %u", __entry->value1, __entry->value2)
147 #define DEFINE_OCFS2_UINT_UINT_EVENT(name) \
148 DEFINE_EVENT(ocfs2__uint_uint, name, \
149 TP_PROTO(unsigned int val1, unsigned int val2), \
150 TP_ARGS(val1, val2))
152 DECLARE_EVENT_CLASS(ocfs2__ull_uint,
153 TP_PROTO(unsigned long long value1, unsigned int value2),
154 TP_ARGS(value1, value2),
155 TP_STRUCT__entry(
156 __field(unsigned long long, value1)
157 __field(unsigned int, value2)
159 TP_fast_assign(
160 __entry->value1 = value1;
161 __entry->value2 = value2;
163 TP_printk("%llu %u", __entry->value1, __entry->value2)
166 #define DEFINE_OCFS2_ULL_UINT_EVENT(name) \
167 DEFINE_EVENT(ocfs2__ull_uint, name, \
168 TP_PROTO(unsigned long long val1, unsigned int val2), \
169 TP_ARGS(val1, val2))
171 DECLARE_EVENT_CLASS(ocfs2__ull_int,
172 TP_PROTO(unsigned long long value1, int value2),
173 TP_ARGS(value1, value2),
174 TP_STRUCT__entry(
175 __field(unsigned long long, value1)
176 __field(int, value2)
178 TP_fast_assign(
179 __entry->value1 = value1;
180 __entry->value2 = value2;
182 TP_printk("%llu %d", __entry->value1, __entry->value2)
185 #define DEFINE_OCFS2_ULL_INT_EVENT(name) \
186 DEFINE_EVENT(ocfs2__ull_int, name, \
187 TP_PROTO(unsigned long long val1, int val2), \
188 TP_ARGS(val1, val2))
190 DECLARE_EVENT_CLASS(ocfs2__ull_ull,
191 TP_PROTO(unsigned long long value1, unsigned long long value2),
192 TP_ARGS(value1, value2),
193 TP_STRUCT__entry(
194 __field(unsigned long long, value1)
195 __field(unsigned long long, value2)
197 TP_fast_assign(
198 __entry->value1 = value1;
199 __entry->value2 = value2;
201 TP_printk("%llu %llu", __entry->value1, __entry->value2)
204 #define DEFINE_OCFS2_ULL_ULL_EVENT(name) \
205 DEFINE_EVENT(ocfs2__ull_ull, name, \
206 TP_PROTO(unsigned long long val1, unsigned long long val2), \
207 TP_ARGS(val1, val2))
209 DECLARE_EVENT_CLASS(ocfs2__ull_ull_uint,
210 TP_PROTO(unsigned long long value1,
211 unsigned long long value2, unsigned int value3),
212 TP_ARGS(value1, value2, value3),
213 TP_STRUCT__entry(
214 __field(unsigned long long, value1)
215 __field(unsigned long long, value2)
216 __field(unsigned int, value3)
218 TP_fast_assign(
219 __entry->value1 = value1;
220 __entry->value2 = value2;
221 __entry->value3 = value3;
223 TP_printk("%llu %llu %u",
224 __entry->value1, __entry->value2, __entry->value3)
227 #define DEFINE_OCFS2_ULL_ULL_UINT_EVENT(name) \
228 DEFINE_EVENT(ocfs2__ull_ull_uint, name, \
229 TP_PROTO(unsigned long long val1, \
230 unsigned long long val2, unsigned int val3), \
231 TP_ARGS(val1, val2, val3))
233 DECLARE_EVENT_CLASS(ocfs2__ull_uint_uint,
234 TP_PROTO(unsigned long long value1,
235 unsigned int value2, unsigned int value3),
236 TP_ARGS(value1, value2, value3),
237 TP_STRUCT__entry(
238 __field(unsigned long long, value1)
239 __field(unsigned int, value2)
240 __field(unsigned int, value3)
242 TP_fast_assign(
243 __entry->value1 = value1;
244 __entry->value2 = value2;
245 __entry->value3 = value3;
247 TP_printk("%llu %u %u", __entry->value1,
248 __entry->value2, __entry->value3)
251 #define DEFINE_OCFS2_ULL_UINT_UINT_EVENT(name) \
252 DEFINE_EVENT(ocfs2__ull_uint_uint, name, \
253 TP_PROTO(unsigned long long val1, \
254 unsigned int val2, unsigned int val3), \
255 TP_ARGS(val1, val2, val3))
257 DECLARE_EVENT_CLASS(ocfs2__uint_uint_uint,
258 TP_PROTO(unsigned int value1, unsigned int value2,
259 unsigned int value3),
260 TP_ARGS(value1, value2, value3),
261 TP_STRUCT__entry(
262 __field( unsigned int, value1 )
263 __field( unsigned int, value2 )
264 __field( unsigned int, value3 )
266 TP_fast_assign(
267 __entry->value1 = value1;
268 __entry->value2 = value2;
269 __entry->value3 = value3;
271 TP_printk("%u %u %u", __entry->value1, __entry->value2, __entry->value3)
274 #define DEFINE_OCFS2_UINT_UINT_UINT_EVENT(name) \
275 DEFINE_EVENT(ocfs2__uint_uint_uint, name, \
276 TP_PROTO(unsigned int value1, unsigned int value2, \
277 unsigned int value3), \
278 TP_ARGS(value1, value2, value3))
280 DECLARE_EVENT_CLASS(ocfs2__ull_ull_ull,
281 TP_PROTO(unsigned long long value1,
282 unsigned long long value2, unsigned long long value3),
283 TP_ARGS(value1, value2, value3),
284 TP_STRUCT__entry(
285 __field(unsigned long long, value1)
286 __field(unsigned long long, value2)
287 __field(unsigned long long, value3)
289 TP_fast_assign(
290 __entry->value1 = value1;
291 __entry->value2 = value2;
292 __entry->value3 = value3;
294 TP_printk("%llu %llu %llu",
295 __entry->value1, __entry->value2, __entry->value3)
298 #define DEFINE_OCFS2_ULL_ULL_ULL_EVENT(name) \
299 DEFINE_EVENT(ocfs2__ull_ull_ull, name, \
300 TP_PROTO(unsigned long long value1, unsigned long long value2, \
301 unsigned long long value3), \
302 TP_ARGS(value1, value2, value3))
304 DECLARE_EVENT_CLASS(ocfs2__ull_int_int_int,
305 TP_PROTO(unsigned long long ull, int value1, int value2, int value3),
306 TP_ARGS(ull, value1, value2, value3),
307 TP_STRUCT__entry(
308 __field( unsigned long long, ull )
309 __field( int, value1 )
310 __field( int, value2 )
311 __field( int, value3 )
313 TP_fast_assign(
314 __entry->ull = ull;
315 __entry->value1 = value1;
316 __entry->value2 = value2;
317 __entry->value3 = value3;
319 TP_printk("%llu %d %d %d",
320 __entry->ull, __entry->value1,
321 __entry->value2, __entry->value3)
324 #define DEFINE_OCFS2_ULL_INT_INT_INT_EVENT(name) \
325 DEFINE_EVENT(ocfs2__ull_int_int_int, name, \
326 TP_PROTO(unsigned long long ull, int value1, \
327 int value2, int value3), \
328 TP_ARGS(ull, value1, value2, value3))
330 DECLARE_EVENT_CLASS(ocfs2__ull_uint_uint_uint,
331 TP_PROTO(unsigned long long ull, unsigned int value1,
332 unsigned int value2, unsigned int value3),
333 TP_ARGS(ull, value1, value2, value3),
334 TP_STRUCT__entry(
335 __field(unsigned long long, ull)
336 __field(unsigned int, value1)
337 __field(unsigned int, value2)
338 __field(unsigned int, value3)
340 TP_fast_assign(
341 __entry->ull = ull;
342 __entry->value1 = value1;
343 __entry->value2 = value2;
344 __entry->value3 = value3;
346 TP_printk("%llu %u %u %u",
347 __entry->ull, __entry->value1,
348 __entry->value2, __entry->value3)
351 #define DEFINE_OCFS2_ULL_UINT_UINT_UINT_EVENT(name) \
352 DEFINE_EVENT(ocfs2__ull_uint_uint_uint, name, \
353 TP_PROTO(unsigned long long ull, unsigned int value1, \
354 unsigned int value2, unsigned int value3), \
355 TP_ARGS(ull, value1, value2, value3))
357 DECLARE_EVENT_CLASS(ocfs2__ull_ull_uint_uint,
358 TP_PROTO(unsigned long long value1, unsigned long long value2,
359 unsigned int value3, unsigned int value4),
360 TP_ARGS(value1, value2, value3, value4),
361 TP_STRUCT__entry(
362 __field(unsigned long long, value1)
363 __field(unsigned long long, value2)
364 __field(unsigned int, value3)
365 __field(unsigned int, value4)
367 TP_fast_assign(
368 __entry->value1 = value1;
369 __entry->value2 = value2;
370 __entry->value3 = value3;
371 __entry->value4 = value4;
373 TP_printk("%llu %llu %u %u",
374 __entry->value1, __entry->value2,
375 __entry->value3, __entry->value4)
378 #define DEFINE_OCFS2_ULL_ULL_UINT_UINT_EVENT(name) \
379 DEFINE_EVENT(ocfs2__ull_ull_uint_uint, name, \
380 TP_PROTO(unsigned long long ull, unsigned long long ull1, \
381 unsigned int value2, unsigned int value3), \
382 TP_ARGS(ull, ull1, value2, value3))
384 /* Trace events for fs/ocfs2/alloc.c. */
385 DECLARE_EVENT_CLASS(ocfs2__btree_ops,
386 TP_PROTO(unsigned long long owner,\
387 unsigned int value1, unsigned int value2),
388 TP_ARGS(owner, value1, value2),
389 TP_STRUCT__entry(
390 __field(unsigned long long, owner)
391 __field(unsigned int, value1)
392 __field(unsigned int, value2)
394 TP_fast_assign(
395 __entry->owner = owner;
396 __entry->value1 = value1;
397 __entry->value2 = value2;
399 TP_printk("%llu %u %u",
400 __entry->owner, __entry->value1, __entry->value2)
403 #define DEFINE_OCFS2_BTREE_EVENT(name) \
404 DEFINE_EVENT(ocfs2__btree_ops, name, \
405 TP_PROTO(unsigned long long owner, \
406 unsigned int value1, unsigned int value2), \
407 TP_ARGS(owner, value1, value2))
409 DEFINE_OCFS2_BTREE_EVENT(ocfs2_adjust_rightmost_branch);
411 DEFINE_OCFS2_BTREE_EVENT(ocfs2_rotate_tree_right);
413 DEFINE_OCFS2_BTREE_EVENT(ocfs2_append_rec_to_path);
415 DEFINE_OCFS2_BTREE_EVENT(ocfs2_insert_extent_start);
417 DEFINE_OCFS2_BTREE_EVENT(ocfs2_add_clusters_in_btree);
419 DEFINE_OCFS2_INT_EVENT(ocfs2_num_free_extents);
421 DEFINE_OCFS2_INT_EVENT(ocfs2_complete_edge_insert);
423 TRACE_EVENT(ocfs2_grow_tree,
424 TP_PROTO(unsigned long long owner, int depth),
425 TP_ARGS(owner, depth),
426 TP_STRUCT__entry(
427 __field(unsigned long long, owner)
428 __field(int, depth)
430 TP_fast_assign(
431 __entry->owner = owner;
432 __entry->depth = depth;
434 TP_printk("%llu %d", __entry->owner, __entry->depth)
437 TRACE_EVENT(ocfs2_rotate_subtree,
438 TP_PROTO(int subtree_root, unsigned long long blkno,
439 int depth),
440 TP_ARGS(subtree_root, blkno, depth),
441 TP_STRUCT__entry(
442 __field(int, subtree_root)
443 __field(unsigned long long, blkno)
444 __field(int, depth)
446 TP_fast_assign(
447 __entry->subtree_root = subtree_root;
448 __entry->blkno = blkno;
449 __entry->depth = depth;
451 TP_printk("%d %llu %d", __entry->subtree_root,
452 __entry->blkno, __entry->depth)
455 TRACE_EVENT(ocfs2_insert_extent,
456 TP_PROTO(unsigned int ins_appending, unsigned int ins_contig,
457 int ins_contig_index, int free_records, int ins_tree_depth),
458 TP_ARGS(ins_appending, ins_contig, ins_contig_index, free_records,
459 ins_tree_depth),
460 TP_STRUCT__entry(
461 __field(unsigned int, ins_appending)
462 __field(unsigned int, ins_contig)
463 __field(int, ins_contig_index)
464 __field(int, free_records)
465 __field(int, ins_tree_depth)
467 TP_fast_assign(
468 __entry->ins_appending = ins_appending;
469 __entry->ins_contig = ins_contig;
470 __entry->ins_contig_index = ins_contig_index;
471 __entry->free_records = free_records;
472 __entry->ins_tree_depth = ins_tree_depth;
474 TP_printk("%u %u %d %d %d",
475 __entry->ins_appending, __entry->ins_contig,
476 __entry->ins_contig_index, __entry->free_records,
477 __entry->ins_tree_depth)
480 TRACE_EVENT(ocfs2_split_extent,
481 TP_PROTO(int split_index, unsigned int c_contig_type,
482 unsigned int c_has_empty_extent,
483 unsigned int c_split_covers_rec),
484 TP_ARGS(split_index, c_contig_type,
485 c_has_empty_extent, c_split_covers_rec),
486 TP_STRUCT__entry(
487 __field(int, split_index)
488 __field(unsigned int, c_contig_type)
489 __field(unsigned int, c_has_empty_extent)
490 __field(unsigned int, c_split_covers_rec)
492 TP_fast_assign(
493 __entry->split_index = split_index;
494 __entry->c_contig_type = c_contig_type;
495 __entry->c_has_empty_extent = c_has_empty_extent;
496 __entry->c_split_covers_rec = c_split_covers_rec;
498 TP_printk("%d %u %u %u", __entry->split_index, __entry->c_contig_type,
499 __entry->c_has_empty_extent, __entry->c_split_covers_rec)
502 TRACE_EVENT(ocfs2_remove_extent,
503 TP_PROTO(unsigned long long owner, unsigned int cpos,
504 unsigned int len, int index,
505 unsigned int e_cpos, unsigned int clusters),
506 TP_ARGS(owner, cpos, len, index, e_cpos, clusters),
507 TP_STRUCT__entry(
508 __field(unsigned long long, owner)
509 __field(unsigned int, cpos)
510 __field(unsigned int, len)
511 __field(int, index)
512 __field(unsigned int, e_cpos)
513 __field(unsigned int, clusters)
515 TP_fast_assign(
516 __entry->owner = owner;
517 __entry->cpos = cpos;
518 __entry->len = len;
519 __entry->index = index;
520 __entry->e_cpos = e_cpos;
521 __entry->clusters = clusters;
523 TP_printk("%llu %u %u %d %u %u",
524 __entry->owner, __entry->cpos, __entry->len, __entry->index,
525 __entry->e_cpos, __entry->clusters)
528 TRACE_EVENT(ocfs2_commit_truncate,
529 TP_PROTO(unsigned long long ino, unsigned int new_cpos,
530 unsigned int clusters, unsigned int depth),
531 TP_ARGS(ino, new_cpos, clusters, depth),
532 TP_STRUCT__entry(
533 __field(unsigned long long, ino)
534 __field(unsigned int, new_cpos)
535 __field(unsigned int, clusters)
536 __field(unsigned int, depth)
538 TP_fast_assign(
539 __entry->ino = ino;
540 __entry->new_cpos = new_cpos;
541 __entry->clusters = clusters;
542 __entry->depth = depth;
544 TP_printk("%llu %u %u %u",
545 __entry->ino, __entry->new_cpos,
546 __entry->clusters, __entry->depth)
549 TRACE_EVENT(ocfs2_validate_extent_block,
550 TP_PROTO(unsigned long long blkno),
551 TP_ARGS(blkno),
552 TP_STRUCT__entry(
553 __field(unsigned long long, blkno)
555 TP_fast_assign(
556 __entry->blkno = blkno;
558 TP_printk("%llu ", __entry->blkno)
561 TRACE_EVENT(ocfs2_rotate_leaf,
562 TP_PROTO(unsigned int insert_cpos, int insert_index,
563 int has_empty, int next_free,
564 unsigned int l_count),
565 TP_ARGS(insert_cpos, insert_index, has_empty,
566 next_free, l_count),
567 TP_STRUCT__entry(
568 __field(unsigned int, insert_cpos)
569 __field(int, insert_index)
570 __field(int, has_empty)
571 __field(int, next_free)
572 __field(unsigned int, l_count)
574 TP_fast_assign(
575 __entry->insert_cpos = insert_cpos;
576 __entry->insert_index = insert_index;
577 __entry->has_empty = has_empty;
578 __entry->next_free = next_free;
579 __entry->l_count = l_count;
581 TP_printk("%u %d %d %d %u", __entry->insert_cpos,
582 __entry->insert_index, __entry->has_empty,
583 __entry->next_free, __entry->l_count)
586 TRACE_EVENT(ocfs2_add_clusters_in_btree_ret,
587 TP_PROTO(int status, int reason, int err),
588 TP_ARGS(status, reason, err),
589 TP_STRUCT__entry(
590 __field(int, status)
591 __field(int, reason)
592 __field(int, err)
594 TP_fast_assign(
595 __entry->status = status;
596 __entry->reason = reason;
597 __entry->err = err;
599 TP_printk("%d %d %d", __entry->status,
600 __entry->reason, __entry->err)
603 TRACE_EVENT(ocfs2_mark_extent_written,
604 TP_PROTO(unsigned long long owner, unsigned int cpos,
605 unsigned int len, unsigned int phys),
606 TP_ARGS(owner, cpos, len, phys),
607 TP_STRUCT__entry(
608 __field(unsigned long long, owner)
609 __field(unsigned int, cpos)
610 __field(unsigned int, len)
611 __field(unsigned int, phys)
613 TP_fast_assign(
614 __entry->owner = owner;
615 __entry->cpos = cpos;
616 __entry->len = len;
617 __entry->phys = phys;
619 TP_printk("%llu %u %u %u",
620 __entry->owner, __entry->cpos,
621 __entry->len, __entry->phys)
624 DECLARE_EVENT_CLASS(ocfs2__truncate_log_ops,
625 TP_PROTO(unsigned long long blkno, int index,
626 unsigned int start, unsigned int num),
627 TP_ARGS(blkno, index, start, num),
628 TP_STRUCT__entry(
629 __field(unsigned long long, blkno)
630 __field(int, index)
631 __field(unsigned int, start)
632 __field(unsigned int, num)
634 TP_fast_assign(
635 __entry->blkno = blkno;
636 __entry->index = index;
637 __entry->start = start;
638 __entry->num = num;
640 TP_printk("%llu %d %u %u",
641 __entry->blkno, __entry->index,
642 __entry->start, __entry->num)
645 #define DEFINE_OCFS2_TRUNCATE_LOG_OPS_EVENT(name) \
646 DEFINE_EVENT(ocfs2__truncate_log_ops, name, \
647 TP_PROTO(unsigned long long blkno, int index, \
648 unsigned int start, unsigned int num), \
649 TP_ARGS(blkno, index, start, num))
651 DEFINE_OCFS2_TRUNCATE_LOG_OPS_EVENT(ocfs2_truncate_log_append);
653 DEFINE_OCFS2_TRUNCATE_LOG_OPS_EVENT(ocfs2_replay_truncate_records);
655 DEFINE_OCFS2_ULL_UINT_EVENT(ocfs2_flush_truncate_log);
657 DEFINE_OCFS2_INT_EVENT(ocfs2_begin_truncate_log_recovery);
659 DEFINE_OCFS2_INT_EVENT(ocfs2_truncate_log_recovery_num);
661 DEFINE_OCFS2_ULL_UINT_EVENT(ocfs2_complete_truncate_log_recovery);
663 DEFINE_OCFS2_ULL_UINT_EVENT(ocfs2_free_cached_blocks);
665 DEFINE_OCFS2_ULL_UINT_EVENT(ocfs2_cache_cluster_dealloc);
667 DEFINE_OCFS2_INT_INT_EVENT(ocfs2_run_deallocs);
669 TRACE_EVENT(ocfs2_cache_block_dealloc,
670 TP_PROTO(int type, int slot, unsigned long long suballoc,
671 unsigned long long blkno, unsigned int bit),
672 TP_ARGS(type, slot, suballoc, blkno, bit),
673 TP_STRUCT__entry(
674 __field(int, type)
675 __field(int, slot)
676 __field(unsigned long long, suballoc)
677 __field(unsigned long long, blkno)
678 __field(unsigned int, bit)
680 TP_fast_assign(
681 __entry->type = type;
682 __entry->slot = slot;
683 __entry->suballoc = suballoc;
684 __entry->blkno = blkno;
685 __entry->bit = bit;
687 TP_printk("%d %d %llu %llu %u",
688 __entry->type, __entry->slot, __entry->suballoc,
689 __entry->blkno, __entry->bit)
692 TRACE_EVENT(ocfs2_trim_extent,
693 TP_PROTO(struct super_block *sb, unsigned long long blk,
694 unsigned long long count),
695 TP_ARGS(sb, blk, count),
696 TP_STRUCT__entry(
697 __field(int, dev_major)
698 __field(int, dev_minor)
699 __field(unsigned long long, blk)
700 __field(__u64, count)
702 TP_fast_assign(
703 __entry->dev_major = MAJOR(sb->s_dev);
704 __entry->dev_minor = MINOR(sb->s_dev);
705 __entry->blk = blk;
706 __entry->count = count;
708 TP_printk("%d %d %llu %llu",
709 __entry->dev_major, __entry->dev_minor,
710 __entry->blk, __entry->count)
713 DEFINE_OCFS2_ULL_UINT_UINT_UINT_EVENT(ocfs2_trim_group);
715 DEFINE_OCFS2_ULL_ULL_ULL_EVENT(ocfs2_trim_fs);
717 /* End of trace events for fs/ocfs2/alloc.c. */
719 /* Trace events for fs/ocfs2/localalloc.c. */
721 DEFINE_OCFS2_UINT_UINT_UINT_EVENT(ocfs2_la_set_sizes);
723 DEFINE_OCFS2_ULL_INT_INT_INT_EVENT(ocfs2_alloc_should_use_local);
725 DEFINE_OCFS2_INT_EVENT(ocfs2_load_local_alloc);
727 DEFINE_OCFS2_INT_EVENT(ocfs2_begin_local_alloc_recovery);
729 DEFINE_OCFS2_ULL_INT_INT_INT_EVENT(ocfs2_reserve_local_alloc_bits);
731 DEFINE_OCFS2_UINT_EVENT(ocfs2_local_alloc_count_bits);
733 DEFINE_OCFS2_INT_INT_EVENT(ocfs2_local_alloc_find_clear_bits_search_bitmap);
735 DEFINE_OCFS2_ULL_INT_INT_INT_EVENT(ocfs2_local_alloc_find_clear_bits);
737 DEFINE_OCFS2_INT_INT_EVENT(ocfs2_sync_local_to_main);
739 TRACE_EVENT(ocfs2_sync_local_to_main_free,
740 TP_PROTO(int count, int bit, unsigned long long start_blk,
741 unsigned long long blkno),
742 TP_ARGS(count, bit, start_blk, blkno),
743 TP_STRUCT__entry(
744 __field(int, count)
745 __field(int, bit)
746 __field(unsigned long long, start_blk)
747 __field(unsigned long long, blkno)
749 TP_fast_assign(
750 __entry->count = count;
751 __entry->bit = bit;
752 __entry->start_blk = start_blk;
753 __entry->blkno = blkno;
755 TP_printk("%d %d %llu %llu",
756 __entry->count, __entry->bit, __entry->start_blk,
757 __entry->blkno)
760 DEFINE_OCFS2_INT_INT_EVENT(ocfs2_local_alloc_new_window);
762 DEFINE_OCFS2_ULL_UINT_EVENT(ocfs2_local_alloc_new_window_result);
764 /* End of trace events for fs/ocfs2/localalloc.c. */
766 /* Trace events for fs/ocfs2/resize.c. */
768 DEFINE_OCFS2_UINT_UINT_EVENT(ocfs2_update_last_group_and_inode);
770 DEFINE_OCFS2_ULL_UINT_EVENT(ocfs2_group_extend);
772 DEFINE_OCFS2_ULL_UINT_UINT_UINT_EVENT(ocfs2_group_add);
774 /* End of trace events for fs/ocfs2/resize.c. */
776 /* Trace events for fs/ocfs2/suballoc.c. */
778 DEFINE_OCFS2_ULL_EVENT(ocfs2_validate_group_descriptor);
780 DEFINE_OCFS2_ULL_UINT_EVENT(ocfs2_block_group_alloc_contig);
782 DEFINE_OCFS2_ULL_UINT_EVENT(ocfs2_block_group_alloc_discontig);
784 DEFINE_OCFS2_ULL_EVENT(ocfs2_block_group_alloc);
786 DEFINE_OCFS2_UINT_UINT_EVENT(ocfs2_reserve_suballoc_bits_nospc);
788 DEFINE_OCFS2_UINT_UINT_UINT_EVENT(ocfs2_reserve_suballoc_bits_no_new_group);
790 DEFINE_OCFS2_ULL_EVENT(ocfs2_reserve_new_inode_new_group);
792 DEFINE_OCFS2_UINT_UINT_EVENT(ocfs2_block_group_set_bits);
794 TRACE_EVENT(ocfs2_relink_block_group,
795 TP_PROTO(unsigned long long i_blkno, unsigned int chain,
796 unsigned long long bg_blkno,
797 unsigned long long prev_blkno),
798 TP_ARGS(i_blkno, chain, bg_blkno, prev_blkno),
799 TP_STRUCT__entry(
800 __field(unsigned long long, i_blkno)
801 __field(unsigned int, chain)
802 __field(unsigned long long, bg_blkno)
803 __field(unsigned long long, prev_blkno)
805 TP_fast_assign(
806 __entry->i_blkno = i_blkno;
807 __entry->chain = chain;
808 __entry->bg_blkno = bg_blkno;
809 __entry->prev_blkno = prev_blkno;
811 TP_printk("%llu %u %llu %llu",
812 __entry->i_blkno, __entry->chain, __entry->bg_blkno,
813 __entry->prev_blkno)
816 DEFINE_OCFS2_ULL_UINT_UINT_UINT_EVENT(ocfs2_cluster_group_search_wrong_max_bits);
818 DEFINE_OCFS2_ULL_ULL_EVENT(ocfs2_cluster_group_search_max_block);
820 DEFINE_OCFS2_ULL_ULL_EVENT(ocfs2_block_group_search_max_block);
822 DEFINE_OCFS2_ULL_UINT_UINT_EVENT(ocfs2_search_chain_begin);
824 DEFINE_OCFS2_ULL_UINT_EVENT(ocfs2_search_chain_succ);
826 DEFINE_OCFS2_ULL_UINT_EVENT(ocfs2_search_chain_end);
828 DEFINE_OCFS2_UINT_EVENT(ocfs2_claim_suballoc_bits);
830 DEFINE_OCFS2_ULL_UINT_EVENT(ocfs2_claim_new_inode_at_loc);
832 DEFINE_OCFS2_UINT_UINT_EVENT(ocfs2_block_group_clear_bits);
834 TRACE_EVENT(ocfs2_free_suballoc_bits,
835 TP_PROTO(unsigned long long inode, unsigned long long group,
836 unsigned int start_bit, unsigned int count),
837 TP_ARGS(inode, group, start_bit, count),
838 TP_STRUCT__entry(
839 __field(unsigned long long, inode)
840 __field(unsigned long long, group)
841 __field(unsigned int, start_bit)
842 __field(unsigned int, count)
844 TP_fast_assign(
845 __entry->inode = inode;
846 __entry->group = group;
847 __entry->start_bit = start_bit;
848 __entry->count = count;
850 TP_printk("%llu %llu %u %u", __entry->inode, __entry->group,
851 __entry->start_bit, __entry->count)
854 TRACE_EVENT(ocfs2_free_clusters,
855 TP_PROTO(unsigned long long bg_blkno, unsigned long long start_blk,
856 unsigned int start_bit, unsigned int count),
857 TP_ARGS(bg_blkno, start_blk, start_bit, count),
858 TP_STRUCT__entry(
859 __field(unsigned long long, bg_blkno)
860 __field(unsigned long long, start_blk)
861 __field(unsigned int, start_bit)
862 __field(unsigned int, count)
864 TP_fast_assign(
865 __entry->bg_blkno = bg_blkno;
866 __entry->start_blk = start_blk;
867 __entry->start_bit = start_bit;
868 __entry->count = count;
870 TP_printk("%llu %llu %u %u", __entry->bg_blkno, __entry->start_blk,
871 __entry->start_bit, __entry->count)
874 DEFINE_OCFS2_ULL_EVENT(ocfs2_get_suballoc_slot_bit);
876 DEFINE_OCFS2_ULL_UINT_EVENT(ocfs2_test_suballoc_bit);
878 DEFINE_OCFS2_ULL_EVENT(ocfs2_test_inode_bit);
880 /* End of trace events for fs/ocfs2/suballoc.c. */
882 /* Trace events for fs/ocfs2/refcounttree.c. */
884 DEFINE_OCFS2_ULL_EVENT(ocfs2_validate_refcount_block);
886 DEFINE_OCFS2_ULL_EVENT(ocfs2_purge_refcount_trees);
888 DEFINE_OCFS2_ULL_EVENT(ocfs2_create_refcount_tree);
890 DEFINE_OCFS2_ULL_EVENT(ocfs2_create_refcount_tree_blkno);
892 DEFINE_OCFS2_ULL_INT_INT_INT_EVENT(ocfs2_change_refcount_rec);
894 DEFINE_OCFS2_ULL_UINT_EVENT(ocfs2_expand_inline_ref_root);
896 DEFINE_OCFS2_ULL_UINT_UINT_EVENT(ocfs2_divide_leaf_refcount_block);
898 DEFINE_OCFS2_ULL_UINT_EVENT(ocfs2_new_leaf_refcount_block);
900 DECLARE_EVENT_CLASS(ocfs2__refcount_tree_ops,
901 TP_PROTO(unsigned long long blkno, int index,
902 unsigned long long cpos,
903 unsigned int clusters, unsigned int refcount),
904 TP_ARGS(blkno, index, cpos, clusters, refcount),
905 TP_STRUCT__entry(
906 __field(unsigned long long, blkno)
907 __field(int, index)
908 __field(unsigned long long, cpos)
909 __field(unsigned int, clusters)
910 __field(unsigned int, refcount)
912 TP_fast_assign(
913 __entry->blkno = blkno;
914 __entry->index = index;
915 __entry->cpos = cpos;
916 __entry->clusters = clusters;
917 __entry->refcount = refcount;
919 TP_printk("%llu %d %llu %u %u", __entry->blkno, __entry->index,
920 __entry->cpos, __entry->clusters, __entry->refcount)
923 #define DEFINE_OCFS2_REFCOUNT_TREE_OPS_EVENT(name) \
924 DEFINE_EVENT(ocfs2__refcount_tree_ops, name, \
925 TP_PROTO(unsigned long long blkno, int index, \
926 unsigned long long cpos, \
927 unsigned int count, unsigned int refcount), \
928 TP_ARGS(blkno, index, cpos, count, refcount))
930 DEFINE_OCFS2_REFCOUNT_TREE_OPS_EVENT(ocfs2_insert_refcount_rec);
932 TRACE_EVENT(ocfs2_split_refcount_rec,
933 TP_PROTO(unsigned long long cpos,
934 unsigned int clusters, unsigned int refcount,
935 unsigned long long split_cpos,
936 unsigned int split_clusters, unsigned int split_refcount),
937 TP_ARGS(cpos, clusters, refcount,
938 split_cpos, split_clusters, split_refcount),
939 TP_STRUCT__entry(
940 __field(unsigned long long, cpos)
941 __field(unsigned int, clusters)
942 __field(unsigned int, refcount)
943 __field(unsigned long long, split_cpos)
944 __field(unsigned int, split_clusters)
945 __field(unsigned int, split_refcount)
947 TP_fast_assign(
948 __entry->cpos = cpos;
949 __entry->clusters = clusters;
950 __entry->refcount = refcount;
951 __entry->split_cpos = split_cpos;
952 __entry->split_clusters = split_clusters;
953 __entry->split_refcount = split_refcount;
955 TP_printk("%llu %u %u %llu %u %u",
956 __entry->cpos, __entry->clusters, __entry->refcount,
957 __entry->split_cpos, __entry->split_clusters,
958 __entry->split_refcount)
961 DEFINE_OCFS2_REFCOUNT_TREE_OPS_EVENT(ocfs2_split_refcount_rec_insert);
963 DEFINE_OCFS2_ULL_ULL_UINT_EVENT(ocfs2_increase_refcount_begin);
965 DEFINE_OCFS2_ULL_UINT_UINT_EVENT(ocfs2_increase_refcount_change);
967 DEFINE_OCFS2_ULL_UINT_EVENT(ocfs2_increase_refcount_insert);
969 DEFINE_OCFS2_ULL_UINT_UINT_EVENT(ocfs2_increase_refcount_split);
971 DEFINE_OCFS2_ULL_ULL_UINT_EVENT(ocfs2_remove_refcount_extent);
973 DEFINE_OCFS2_ULL_EVENT(ocfs2_restore_refcount_block);
975 DEFINE_OCFS2_ULL_ULL_UINT_EVENT(ocfs2_decrease_refcount_rec);
977 TRACE_EVENT(ocfs2_decrease_refcount,
978 TP_PROTO(unsigned long long owner,
979 unsigned long long cpos,
980 unsigned int len, int delete),
981 TP_ARGS(owner, cpos, len, delete),
982 TP_STRUCT__entry(
983 __field(unsigned long long, owner)
984 __field(unsigned long long, cpos)
985 __field(unsigned int, len)
986 __field(int, delete)
988 TP_fast_assign(
989 __entry->owner = owner;
990 __entry->cpos = cpos;
991 __entry->len = len;
992 __entry->delete = delete;
994 TP_printk("%llu %llu %u %d",
995 __entry->owner, __entry->cpos, __entry->len, __entry->delete)
998 DEFINE_OCFS2_ULL_UINT_UINT_UINT_EVENT(ocfs2_mark_extent_refcounted);
1000 DEFINE_OCFS2_ULL_UINT_UINT_UINT_EVENT(ocfs2_calc_refcount_meta_credits);
1002 TRACE_EVENT(ocfs2_calc_refcount_meta_credits_iterate,
1003 TP_PROTO(int recs_add, unsigned long long cpos,
1004 unsigned int clusters, unsigned long long r_cpos,
1005 unsigned int r_clusters, unsigned int refcount, int index),
1006 TP_ARGS(recs_add, cpos, clusters, r_cpos, r_clusters, refcount, index),
1007 TP_STRUCT__entry(
1008 __field(int, recs_add)
1009 __field(unsigned long long, cpos)
1010 __field(unsigned int, clusters)
1011 __field(unsigned long long, r_cpos)
1012 __field(unsigned int, r_clusters)
1013 __field(unsigned int, refcount)
1014 __field(int, index)
1016 TP_fast_assign(
1017 __entry->recs_add = recs_add;
1018 __entry->cpos = cpos;
1019 __entry->clusters = clusters;
1020 __entry->r_cpos = r_cpos;
1021 __entry->r_clusters = r_clusters;
1022 __entry->refcount = refcount;
1023 __entry->index = index;
1025 TP_printk("%d %llu %u %llu %u %u %d",
1026 __entry->recs_add, __entry->cpos, __entry->clusters,
1027 __entry->r_cpos, __entry->r_clusters,
1028 __entry->refcount, __entry->index)
1031 DEFINE_OCFS2_INT_INT_EVENT(ocfs2_add_refcount_flag);
1033 DEFINE_OCFS2_INT_INT_EVENT(ocfs2_prepare_refcount_change_for_del);
1035 DEFINE_OCFS2_INT_INT_EVENT(ocfs2_lock_refcount_allocators);
1037 DEFINE_OCFS2_ULL_UINT_UINT_UINT_EVENT(ocfs2_duplicate_clusters_by_page);
1039 DEFINE_OCFS2_ULL_UINT_UINT_UINT_EVENT(ocfs2_duplicate_clusters_by_jbd);
1041 TRACE_EVENT(ocfs2_clear_ext_refcount,
1042 TP_PROTO(unsigned long long ino, unsigned int cpos,
1043 unsigned int len, unsigned int p_cluster,
1044 unsigned int ext_flags),
1045 TP_ARGS(ino, cpos, len, p_cluster, ext_flags),
1046 TP_STRUCT__entry(
1047 __field(unsigned long long, ino)
1048 __field(unsigned int, cpos)
1049 __field(unsigned int, len)
1050 __field(unsigned int, p_cluster)
1051 __field(unsigned int, ext_flags)
1053 TP_fast_assign(
1054 __entry->ino = ino;
1055 __entry->cpos = cpos;
1056 __entry->len = len;
1057 __entry->p_cluster = p_cluster;
1058 __entry->ext_flags = ext_flags;
1060 TP_printk("%llu %u %u %u %u",
1061 __entry->ino, __entry->cpos, __entry->len,
1062 __entry->p_cluster, __entry->ext_flags)
1065 TRACE_EVENT(ocfs2_replace_clusters,
1066 TP_PROTO(unsigned long long ino, unsigned int cpos,
1067 unsigned int old, unsigned int new, unsigned int len,
1068 unsigned int ext_flags),
1069 TP_ARGS(ino, cpos, old, new, len, ext_flags),
1070 TP_STRUCT__entry(
1071 __field(unsigned long long, ino)
1072 __field(unsigned int, cpos)
1073 __field(unsigned int, old)
1074 __field(unsigned int, new)
1075 __field(unsigned int, len)
1076 __field(unsigned int, ext_flags)
1078 TP_fast_assign(
1079 __entry->ino = ino;
1080 __entry->cpos = cpos;
1081 __entry->old = old;
1082 __entry->new = new;
1083 __entry->len = len;
1084 __entry->ext_flags = ext_flags;
1086 TP_printk("%llu %u %u %u %u %u",
1087 __entry->ino, __entry->cpos, __entry->old, __entry->new,
1088 __entry->len, __entry->ext_flags)
1091 DEFINE_OCFS2_ULL_UINT_UINT_UINT_EVENT(ocfs2_make_clusters_writable);
1093 TRACE_EVENT(ocfs2_refcount_cow_hunk,
1094 TP_PROTO(unsigned long long ino, unsigned int cpos,
1095 unsigned int write_len, unsigned int max_cpos,
1096 unsigned int cow_start, unsigned int cow_len),
1097 TP_ARGS(ino, cpos, write_len, max_cpos, cow_start, cow_len),
1098 TP_STRUCT__entry(
1099 __field(unsigned long long, ino)
1100 __field(unsigned int, cpos)
1101 __field(unsigned int, write_len)
1102 __field(unsigned int, max_cpos)
1103 __field(unsigned int, cow_start)
1104 __field(unsigned int, cow_len)
1106 TP_fast_assign(
1107 __entry->ino = ino;
1108 __entry->cpos = cpos;
1109 __entry->write_len = write_len;
1110 __entry->max_cpos = max_cpos;
1111 __entry->cow_start = cow_start;
1112 __entry->cow_len = cow_len;
1114 TP_printk("%llu %u %u %u %u %u",
1115 __entry->ino, __entry->cpos, __entry->write_len,
1116 __entry->max_cpos, __entry->cow_start, __entry->cow_len)
1119 /* End of trace events for fs/ocfs2/refcounttree.c. */
1121 /* Trace events for fs/ocfs2/aops.c. */
1123 DECLARE_EVENT_CLASS(ocfs2__get_block,
1124 TP_PROTO(unsigned long long ino, unsigned long long iblock,
1125 void *bh_result, int create),
1126 TP_ARGS(ino, iblock, bh_result, create),
1127 TP_STRUCT__entry(
1128 __field(unsigned long long, ino)
1129 __field(unsigned long long, iblock)
1130 __field(void *, bh_result)
1131 __field(int, create)
1133 TP_fast_assign(
1134 __entry->ino = ino;
1135 __entry->iblock = iblock;
1136 __entry->bh_result = bh_result;
1137 __entry->create = create;
1139 TP_printk("%llu %llu %p %d",
1140 __entry->ino, __entry->iblock,
1141 __entry->bh_result, __entry->create)
1144 #define DEFINE_OCFS2_GET_BLOCK_EVENT(name) \
1145 DEFINE_EVENT(ocfs2__get_block, name, \
1146 TP_PROTO(unsigned long long ino, unsigned long long iblock, \
1147 void *bh_result, int create), \
1148 TP_ARGS(ino, iblock, bh_result, create))
1150 DEFINE_OCFS2_GET_BLOCK_EVENT(ocfs2_symlink_get_block);
1152 DEFINE_OCFS2_GET_BLOCK_EVENT(ocfs2_get_block);
1154 DEFINE_OCFS2_ULL_ULL_EVENT(ocfs2_get_block_end);
1156 DEFINE_OCFS2_ULL_ULL_EVENT(ocfs2_readpage);
1158 DEFINE_OCFS2_ULL_ULL_EVENT(ocfs2_writepage);
1160 DEFINE_OCFS2_ULL_ULL_EVENT(ocfs2_bmap);
1162 TRACE_EVENT(ocfs2_try_to_write_inline_data,
1163 TP_PROTO(unsigned long long ino, unsigned int len,
1164 unsigned long long pos, unsigned int flags),
1165 TP_ARGS(ino, len, pos, flags),
1166 TP_STRUCT__entry(
1167 __field(unsigned long long, ino)
1168 __field(unsigned int, len)
1169 __field(unsigned long long, pos)
1170 __field(unsigned int, flags)
1172 TP_fast_assign(
1173 __entry->ino = ino;
1174 __entry->len = len;
1175 __entry->pos = pos;
1176 __entry->flags = flags;
1178 TP_printk("%llu %u %llu 0x%x",
1179 __entry->ino, __entry->len, __entry->pos, __entry->flags)
1182 TRACE_EVENT(ocfs2_write_begin_nolock,
1183 TP_PROTO(unsigned long long ino,
1184 long long i_size, unsigned int i_clusters,
1185 unsigned long long pos, unsigned int len,
1186 unsigned int flags, void *page,
1187 unsigned int clusters, unsigned int extents_to_split),
1188 TP_ARGS(ino, i_size, i_clusters, pos, len, flags,
1189 page, clusters, extents_to_split),
1190 TP_STRUCT__entry(
1191 __field(unsigned long long, ino)
1192 __field(long long, i_size)
1193 __field(unsigned int, i_clusters)
1194 __field(unsigned long long, pos)
1195 __field(unsigned int, len)
1196 __field(unsigned int, flags)
1197 __field(void *, page)
1198 __field(unsigned int, clusters)
1199 __field(unsigned int, extents_to_split)
1201 TP_fast_assign(
1202 __entry->ino = ino;
1203 __entry->i_size = i_size;
1204 __entry->i_clusters = i_clusters;
1205 __entry->pos = pos;
1206 __entry->len = len;
1207 __entry->flags = flags;
1208 __entry->page = page;
1209 __entry->clusters = clusters;
1210 __entry->extents_to_split = extents_to_split;
1212 TP_printk("%llu %lld %u %llu %u %u %p %u %u",
1213 __entry->ino, __entry->i_size, __entry->i_clusters,
1214 __entry->pos, __entry->len,
1215 __entry->flags, __entry->page, __entry->clusters,
1216 __entry->extents_to_split)
1219 TRACE_EVENT(ocfs2_write_end_inline,
1220 TP_PROTO(unsigned long long ino,
1221 unsigned long long pos, unsigned int copied,
1222 unsigned int id_count, unsigned int features),
1223 TP_ARGS(ino, pos, copied, id_count, features),
1224 TP_STRUCT__entry(
1225 __field(unsigned long long, ino)
1226 __field(unsigned long long, pos)
1227 __field(unsigned int, copied)
1228 __field(unsigned int, id_count)
1229 __field(unsigned int, features)
1231 TP_fast_assign(
1232 __entry->ino = ino;
1233 __entry->pos = pos;
1234 __entry->copied = copied;
1235 __entry->id_count = id_count;
1236 __entry->features = features;
1238 TP_printk("%llu %llu %u %u %u",
1239 __entry->ino, __entry->pos, __entry->copied,
1240 __entry->id_count, __entry->features)
1243 /* End of trace events for fs/ocfs2/aops.c. */
1245 /* Trace events for fs/ocfs2/mmap.c. */
1247 TRACE_EVENT(ocfs2_fault,
1248 TP_PROTO(unsigned long long ino,
1249 void *area, void *page, unsigned long pgoff),
1250 TP_ARGS(ino, area, page, pgoff),
1251 TP_STRUCT__entry(
1252 __field(unsigned long long, ino)
1253 __field(void *, area)
1254 __field(void *, page)
1255 __field(unsigned long, pgoff)
1257 TP_fast_assign(
1258 __entry->ino = ino;
1259 __entry->area = area;
1260 __entry->page = page;
1261 __entry->pgoff = pgoff;
1263 TP_printk("%llu %p %p %lu",
1264 __entry->ino, __entry->area, __entry->page, __entry->pgoff)
1267 /* End of trace events for fs/ocfs2/mmap.c. */
1269 /* Trace events for fs/ocfs2/file.c. */
1271 DECLARE_EVENT_CLASS(ocfs2__file_ops,
1272 TP_PROTO(void *inode, void *file, void *dentry,
1273 unsigned long long ino,
1274 unsigned int d_len, const unsigned char *d_name,
1275 unsigned long long para),
1276 TP_ARGS(inode, file, dentry, ino, d_len, d_name, para),
1277 TP_STRUCT__entry(
1278 __field(void *, inode)
1279 __field(void *, file)
1280 __field(void *, dentry)
1281 __field(unsigned long long, ino)
1282 __field(unsigned int, d_len)
1283 __string(d_name, d_name)
1284 __field(unsigned long long, para)
1286 TP_fast_assign(
1287 __entry->inode = inode;
1288 __entry->file = file;
1289 __entry->dentry = dentry;
1290 __entry->ino = ino;
1291 __entry->d_len = d_len;
1292 __assign_str(d_name, d_name);
1293 __entry->para = para;
1295 TP_printk("%p %p %p %llu %llu %.*s", __entry->inode, __entry->file,
1296 __entry->dentry, __entry->ino, __entry->para,
1297 __entry->d_len, __get_str(d_name))
1300 #define DEFINE_OCFS2_FILE_OPS(name) \
1301 DEFINE_EVENT(ocfs2__file_ops, name, \
1302 TP_PROTO(void *inode, void *file, void *dentry, \
1303 unsigned long long ino, \
1304 unsigned int d_len, const unsigned char *d_name, \
1305 unsigned long long mode), \
1306 TP_ARGS(inode, file, dentry, ino, d_len, d_name, mode))
1308 DEFINE_OCFS2_FILE_OPS(ocfs2_file_open);
1310 DEFINE_OCFS2_FILE_OPS(ocfs2_file_release);
1312 DEFINE_OCFS2_FILE_OPS(ocfs2_sync_file);
1314 DEFINE_OCFS2_FILE_OPS(ocfs2_file_aio_write);
1316 DEFINE_OCFS2_FILE_OPS(ocfs2_file_splice_write);
1318 DEFINE_OCFS2_FILE_OPS(ocfs2_file_aio_read);
1320 DEFINE_OCFS2_ULL_ULL_ULL_EVENT(ocfs2_truncate_file);
1322 DEFINE_OCFS2_ULL_ULL_EVENT(ocfs2_truncate_file_error);
1324 TRACE_EVENT(ocfs2_extend_allocation,
1325 TP_PROTO(unsigned long long ip_blkno, unsigned long long size,
1326 unsigned int clusters, unsigned int clusters_to_add,
1327 int why, int restart_func),
1328 TP_ARGS(ip_blkno, size, clusters, clusters_to_add, why, restart_func),
1329 TP_STRUCT__entry(
1330 __field(unsigned long long, ip_blkno)
1331 __field(unsigned long long, size)
1332 __field(unsigned int, clusters)
1333 __field(unsigned int, clusters_to_add)
1334 __field(int, why)
1335 __field(int, restart_func)
1337 TP_fast_assign(
1338 __entry->ip_blkno = ip_blkno;
1339 __entry->size = size;
1340 __entry->clusters = clusters;
1341 __entry->clusters_to_add = clusters_to_add;
1342 __entry->why = why;
1343 __entry->restart_func = restart_func;
1345 TP_printk("%llu %llu %u %u %d %d",
1346 __entry->ip_blkno, __entry->size, __entry->clusters,
1347 __entry->clusters_to_add, __entry->why, __entry->restart_func)
1350 TRACE_EVENT(ocfs2_extend_allocation_end,
1351 TP_PROTO(unsigned long long ino,
1352 unsigned int di_clusters, unsigned long long di_size,
1353 unsigned int ip_clusters, unsigned long long i_size),
1354 TP_ARGS(ino, di_clusters, di_size, ip_clusters, i_size),
1355 TP_STRUCT__entry(
1356 __field(unsigned long long, ino)
1357 __field(unsigned int, di_clusters)
1358 __field(unsigned long long, di_size)
1359 __field(unsigned int, ip_clusters)
1360 __field(unsigned long long, i_size)
1362 TP_fast_assign(
1363 __entry->ino = ino;
1364 __entry->di_clusters = di_clusters;
1365 __entry->di_size = di_size;
1366 __entry->ip_clusters = ip_clusters;
1367 __entry->i_size = i_size;
1369 TP_printk("%llu %u %llu %u %llu", __entry->ino, __entry->di_clusters,
1370 __entry->di_size, __entry->ip_clusters, __entry->i_size)
1373 TRACE_EVENT(ocfs2_write_zero_page,
1374 TP_PROTO(unsigned long long ino,
1375 unsigned long long abs_from, unsigned long long abs_to,
1376 unsigned long index, unsigned int zero_from,
1377 unsigned int zero_to),
1378 TP_ARGS(ino, abs_from, abs_to, index, zero_from, zero_to),
1379 TP_STRUCT__entry(
1380 __field(unsigned long long, ino)
1381 __field(unsigned long long, abs_from)
1382 __field(unsigned long long, abs_to)
1383 __field(unsigned long, index)
1384 __field(unsigned int, zero_from)
1385 __field(unsigned int, zero_to)
1387 TP_fast_assign(
1388 __entry->ino = ino;
1389 __entry->abs_from = abs_from;
1390 __entry->abs_to = abs_to;
1391 __entry->index = index;
1392 __entry->zero_from = zero_from;
1393 __entry->zero_to = zero_to;
1395 TP_printk("%llu %llu %llu %lu %u %u", __entry->ino,
1396 __entry->abs_from, __entry->abs_to,
1397 __entry->index, __entry->zero_from, __entry->zero_to)
1400 DEFINE_OCFS2_ULL_ULL_ULL_EVENT(ocfs2_zero_extend_range);
1402 DEFINE_OCFS2_ULL_ULL_ULL_EVENT(ocfs2_zero_extend);
1404 TRACE_EVENT(ocfs2_setattr,
1405 TP_PROTO(void *inode, void *dentry,
1406 unsigned long long ino,
1407 unsigned int d_len, const unsigned char *d_name,
1408 unsigned int ia_valid, unsigned int ia_mode,
1409 unsigned int ia_uid, unsigned int ia_gid),
1410 TP_ARGS(inode, dentry, ino, d_len, d_name,
1411 ia_valid, ia_mode, ia_uid, ia_gid),
1412 TP_STRUCT__entry(
1413 __field(void *, inode)
1414 __field(void *, dentry)
1415 __field(unsigned long long, ino)
1416 __field(unsigned int, d_len)
1417 __string(d_name, d_name)
1418 __field(unsigned int, ia_valid)
1419 __field(unsigned int, ia_mode)
1420 __field(unsigned int, ia_uid)
1421 __field(unsigned int, ia_gid)
1423 TP_fast_assign(
1424 __entry->inode = inode;
1425 __entry->dentry = dentry;
1426 __entry->ino = ino;
1427 __entry->d_len = d_len;
1428 __assign_str(d_name, d_name);
1429 __entry->ia_valid = ia_valid;
1430 __entry->ia_mode = ia_mode;
1431 __entry->ia_uid = ia_uid;
1432 __entry->ia_gid = ia_gid;
1434 TP_printk("%p %p %llu %.*s %u %u %u %u", __entry->inode,
1435 __entry->dentry, __entry->ino, __entry->d_len,
1436 __get_str(d_name), __entry->ia_valid, __entry->ia_mode,
1437 __entry->ia_uid, __entry->ia_gid)
1440 DEFINE_OCFS2_ULL_UINT_EVENT(ocfs2_write_remove_suid);
1442 DEFINE_OCFS2_ULL_ULL_ULL_EVENT(ocfs2_zero_partial_clusters);
1444 DEFINE_OCFS2_ULL_ULL_EVENT(ocfs2_zero_partial_clusters_range1);
1446 DEFINE_OCFS2_ULL_ULL_EVENT(ocfs2_zero_partial_clusters_range2);
1448 DEFINE_OCFS2_ULL_ULL_ULL_EVENT(ocfs2_remove_inode_range);
1450 TRACE_EVENT(ocfs2_prepare_inode_for_write,
1451 TP_PROTO(unsigned long long ino, unsigned long long saved_pos,
1452 unsigned long count),
1453 TP_ARGS(ino, saved_pos, count),
1454 TP_STRUCT__entry(
1455 __field(unsigned long long, ino)
1456 __field(unsigned long long, saved_pos)
1457 __field(unsigned long, count)
1459 TP_fast_assign(
1460 __entry->ino = ino;
1461 __entry->saved_pos = saved_pos;
1462 __entry->count = count;
1464 TP_printk("%llu %llu %lu", __entry->ino,
1465 __entry->saved_pos, __entry->count)
1468 DEFINE_OCFS2_INT_EVENT(generic_file_aio_read_ret);
1470 /* End of trace events for fs/ocfs2/file.c. */
1472 /* Trace events for fs/ocfs2/inode.c. */
1474 TRACE_EVENT(ocfs2_iget_begin,
1475 TP_PROTO(unsigned long long ino, unsigned int flags, int sysfile_type),
1476 TP_ARGS(ino, flags, sysfile_type),
1477 TP_STRUCT__entry(
1478 __field(unsigned long long, ino)
1479 __field(unsigned int, flags)
1480 __field(int, sysfile_type)
1482 TP_fast_assign(
1483 __entry->ino = ino;
1484 __entry->flags = flags;
1485 __entry->sysfile_type = sysfile_type;
1487 TP_printk("%llu %u %d", __entry->ino,
1488 __entry->flags, __entry->sysfile_type)
1491 DEFINE_OCFS2_ULL_EVENT(ocfs2_iget5_locked);
1493 TRACE_EVENT(ocfs2_iget_end,
1494 TP_PROTO(void *inode, unsigned long long ino),
1495 TP_ARGS(inode, ino),
1496 TP_STRUCT__entry(
1497 __field(void *, inode)
1498 __field(unsigned long long, ino)
1500 TP_fast_assign(
1501 __entry->inode = inode;
1502 __entry->ino = ino;
1504 TP_printk("%p %llu", __entry->inode, __entry->ino)
1507 TRACE_EVENT(ocfs2_find_actor,
1508 TP_PROTO(void *inode, unsigned long long ino,
1509 void *args, unsigned long long fi_blkno),
1510 TP_ARGS(inode, ino, args, fi_blkno),
1511 TP_STRUCT__entry(
1512 __field(void *, inode)
1513 __field(unsigned long long, ino)
1514 __field(void *, args)
1515 __field(unsigned long long, fi_blkno)
1517 TP_fast_assign(
1518 __entry->inode = inode;
1519 __entry->ino = ino;
1520 __entry->args = args;
1521 __entry->fi_blkno = fi_blkno;
1523 TP_printk("%p %llu %p %llu", __entry->inode, __entry->ino,
1524 __entry->args, __entry->fi_blkno)
1527 DEFINE_OCFS2_ULL_UINT_EVENT(ocfs2_populate_inode);
1529 DEFINE_OCFS2_ULL_INT_EVENT(ocfs2_read_locked_inode);
1531 DEFINE_OCFS2_INT_INT_EVENT(ocfs2_check_orphan_recovery_state);
1533 DEFINE_OCFS2_ULL_EVENT(ocfs2_validate_inode_block);
1534 DEFINE_OCFS2_ULL_EVENT(ocfs2_filecheck_validate_inode_block);
1535 DEFINE_OCFS2_ULL_EVENT(ocfs2_filecheck_repair_inode_block);
1537 TRACE_EVENT(ocfs2_inode_is_valid_to_delete,
1538 TP_PROTO(void *task, void *dc_task, unsigned long long ino,
1539 unsigned int flags),
1540 TP_ARGS(task, dc_task, ino, flags),
1541 TP_STRUCT__entry(
1542 __field(void *, task)
1543 __field(void *, dc_task)
1544 __field(unsigned long long, ino)
1545 __field(unsigned int, flags)
1547 TP_fast_assign(
1548 __entry->task = task;
1549 __entry->dc_task = dc_task;
1550 __entry->ino = ino;
1551 __entry->flags = flags;
1553 TP_printk("%p %p %llu %u", __entry->task, __entry->dc_task,
1554 __entry->ino, __entry->flags)
1557 DEFINE_OCFS2_ULL_UINT_EVENT(ocfs2_query_inode_wipe_begin);
1559 DEFINE_OCFS2_UINT_EVENT(ocfs2_query_inode_wipe_succ);
1561 DEFINE_OCFS2_INT_INT_EVENT(ocfs2_query_inode_wipe_end);
1563 DEFINE_OCFS2_ULL_INT_EVENT(ocfs2_cleanup_delete_inode);
1565 DEFINE_OCFS2_ULL_ULL_UINT_EVENT(ocfs2_delete_inode);
1567 DEFINE_OCFS2_ULL_UINT_EVENT(ocfs2_clear_inode);
1569 DEFINE_OCFS2_ULL_UINT_UINT_EVENT(ocfs2_drop_inode);
1571 TRACE_EVENT(ocfs2_inode_revalidate,
1572 TP_PROTO(void *inode, unsigned long long ino,
1573 unsigned int flags),
1574 TP_ARGS(inode, ino, flags),
1575 TP_STRUCT__entry(
1576 __field(void *, inode)
1577 __field(unsigned long long, ino)
1578 __field(unsigned int, flags)
1580 TP_fast_assign(
1581 __entry->inode = inode;
1582 __entry->ino = ino;
1583 __entry->flags = flags;
1585 TP_printk("%p %llu %u", __entry->inode, __entry->ino, __entry->flags)
1588 DEFINE_OCFS2_ULL_EVENT(ocfs2_mark_inode_dirty);
1590 /* End of trace events for fs/ocfs2/inode.c. */
1592 /* Trace events for fs/ocfs2/extent_map.c. */
1594 TRACE_EVENT(ocfs2_read_virt_blocks,
1595 TP_PROTO(void *inode, unsigned long long vblock, int nr,
1596 void *bhs, unsigned int flags, void *validate),
1597 TP_ARGS(inode, vblock, nr, bhs, flags, validate),
1598 TP_STRUCT__entry(
1599 __field(void *, inode)
1600 __field(unsigned long long, vblock)
1601 __field(int, nr)
1602 __field(void *, bhs)
1603 __field(unsigned int, flags)
1604 __field(void *, validate)
1606 TP_fast_assign(
1607 __entry->inode = inode;
1608 __entry->vblock = vblock;
1609 __entry->nr = nr;
1610 __entry->bhs = bhs;
1611 __entry->flags = flags;
1612 __entry->validate = validate;
1614 TP_printk("%p %llu %d %p %x %p", __entry->inode, __entry->vblock,
1615 __entry->nr, __entry->bhs, __entry->flags, __entry->validate)
1618 /* End of trace events for fs/ocfs2/extent_map.c. */
1620 /* Trace events for fs/ocfs2/slot_map.c. */
1622 DEFINE_OCFS2_UINT_EVENT(ocfs2_refresh_slot_info);
1624 DEFINE_OCFS2_ULL_UINT_EVENT(ocfs2_map_slot_buffers);
1626 DEFINE_OCFS2_ULL_UINT_EVENT(ocfs2_map_slot_buffers_block);
1628 DEFINE_OCFS2_INT_EVENT(ocfs2_find_slot);
1630 /* End of trace events for fs/ocfs2/slot_map.c. */
1632 /* Trace events for fs/ocfs2/heartbeat.c. */
1634 DEFINE_OCFS2_INT_EVENT(ocfs2_do_node_down);
1636 /* End of trace events for fs/ocfs2/heartbeat.c. */
1638 /* Trace events for fs/ocfs2/super.c. */
1640 TRACE_EVENT(ocfs2_remount,
1641 TP_PROTO(unsigned long s_flags, unsigned long osb_flags, int flags),
1642 TP_ARGS(s_flags, osb_flags, flags),
1643 TP_STRUCT__entry(
1644 __field(unsigned long, s_flags)
1645 __field(unsigned long, osb_flags)
1646 __field(int, flags)
1648 TP_fast_assign(
1649 __entry->s_flags = s_flags;
1650 __entry->osb_flags = osb_flags;
1651 __entry->flags = flags;
1653 TP_printk("%lu %lu %d", __entry->s_flags,
1654 __entry->osb_flags, __entry->flags)
1657 TRACE_EVENT(ocfs2_fill_super,
1658 TP_PROTO(void *sb, void *data, int silent),
1659 TP_ARGS(sb, data, silent),
1660 TP_STRUCT__entry(
1661 __field(void *, sb)
1662 __field(void *, data)
1663 __field(int, silent)
1665 TP_fast_assign(
1666 __entry->sb = sb;
1667 __entry->data = data;
1668 __entry->silent = silent;
1670 TP_printk("%p %p %d", __entry->sb,
1671 __entry->data, __entry->silent)
1674 TRACE_EVENT(ocfs2_parse_options,
1675 TP_PROTO(int is_remount, char *options),
1676 TP_ARGS(is_remount, options),
1677 TP_STRUCT__entry(
1678 __field(int, is_remount)
1679 __string(options, options)
1681 TP_fast_assign(
1682 __entry->is_remount = is_remount;
1683 __assign_str(options, options);
1685 TP_printk("%d %s", __entry->is_remount, __get_str(options))
1688 DEFINE_OCFS2_POINTER_EVENT(ocfs2_put_super);
1690 TRACE_EVENT(ocfs2_statfs,
1691 TP_PROTO(void *sb, void *buf),
1692 TP_ARGS(sb, buf),
1693 TP_STRUCT__entry(
1694 __field(void *, sb)
1695 __field(void *, buf)
1697 TP_fast_assign(
1698 __entry->sb = sb;
1699 __entry->buf = buf;
1701 TP_printk("%p %p", __entry->sb, __entry->buf)
1704 DEFINE_OCFS2_POINTER_EVENT(ocfs2_dismount_volume);
1706 TRACE_EVENT(ocfs2_initialize_super,
1707 TP_PROTO(char *label, char *uuid_str, unsigned long long root_dir,
1708 unsigned long long system_dir, int cluster_bits),
1709 TP_ARGS(label, uuid_str, root_dir, system_dir, cluster_bits),
1710 TP_STRUCT__entry(
1711 __string(label, label)
1712 __string(uuid_str, uuid_str)
1713 __field(unsigned long long, root_dir)
1714 __field(unsigned long long, system_dir)
1715 __field(int, cluster_bits)
1717 TP_fast_assign(
1718 __assign_str(label, label);
1719 __assign_str(uuid_str, uuid_str);
1720 __entry->root_dir = root_dir;
1721 __entry->system_dir = system_dir;
1722 __entry->cluster_bits = cluster_bits;
1724 TP_printk("%s %s %llu %llu %d", __get_str(label), __get_str(uuid_str),
1725 __entry->root_dir, __entry->system_dir, __entry->cluster_bits)
1728 /* End of trace events for fs/ocfs2/super.c. */
1730 /* Trace events for fs/ocfs2/xattr.c. */
1732 DEFINE_OCFS2_ULL_EVENT(ocfs2_validate_xattr_block);
1734 DEFINE_OCFS2_UINT_EVENT(ocfs2_xattr_extend_allocation);
1736 TRACE_EVENT(ocfs2_init_xattr_set_ctxt,
1737 TP_PROTO(const char *name, int meta, int clusters, int credits),
1738 TP_ARGS(name, meta, clusters, credits),
1739 TP_STRUCT__entry(
1740 __string(name, name)
1741 __field(int, meta)
1742 __field(int, clusters)
1743 __field(int, credits)
1745 TP_fast_assign(
1746 __assign_str(name, name);
1747 __entry->meta = meta;
1748 __entry->clusters = clusters;
1749 __entry->credits = credits;
1751 TP_printk("%s %d %d %d", __get_str(name), __entry->meta,
1752 __entry->clusters, __entry->credits)
1755 DECLARE_EVENT_CLASS(ocfs2__xattr_find,
1756 TP_PROTO(unsigned long long ino, const char *name, int name_index,
1757 unsigned int hash, unsigned long long location,
1758 int xe_index),
1759 TP_ARGS(ino, name, name_index, hash, location, xe_index),
1760 TP_STRUCT__entry(
1761 __field(unsigned long long, ino)
1762 __string(name, name)
1763 __field(int, name_index)
1764 __field(unsigned int, hash)
1765 __field(unsigned long long, location)
1766 __field(int, xe_index)
1768 TP_fast_assign(
1769 __entry->ino = ino;
1770 __assign_str(name, name);
1771 __entry->name_index = name_index;
1772 __entry->hash = hash;
1773 __entry->location = location;
1774 __entry->xe_index = xe_index;
1776 TP_printk("%llu %s %d %u %llu %d", __entry->ino, __get_str(name),
1777 __entry->name_index, __entry->hash, __entry->location,
1778 __entry->xe_index)
1781 #define DEFINE_OCFS2_XATTR_FIND_EVENT(name) \
1782 DEFINE_EVENT(ocfs2__xattr_find, name, \
1783 TP_PROTO(unsigned long long ino, const char *name, int name_index, \
1784 unsigned int hash, unsigned long long bucket, \
1785 int xe_index), \
1786 TP_ARGS(ino, name, name_index, hash, bucket, xe_index))
1788 DEFINE_OCFS2_XATTR_FIND_EVENT(ocfs2_xattr_bucket_find);
1790 DEFINE_OCFS2_XATTR_FIND_EVENT(ocfs2_xattr_index_block_find);
1792 DEFINE_OCFS2_XATTR_FIND_EVENT(ocfs2_xattr_index_block_find_rec);
1794 DEFINE_OCFS2_ULL_ULL_UINT_EVENT(ocfs2_iterate_xattr_buckets);
1796 DEFINE_OCFS2_ULL_UINT_EVENT(ocfs2_iterate_xattr_bucket);
1798 DEFINE_OCFS2_ULL_ULL_EVENT(ocfs2_cp_xattr_block_to_bucket_begin);
1800 DEFINE_OCFS2_UINT_UINT_UINT_EVENT(ocfs2_cp_xattr_block_to_bucket_end);
1802 DEFINE_OCFS2_ULL_EVENT(ocfs2_xattr_create_index_block_begin);
1804 DEFINE_OCFS2_ULL_EVENT(ocfs2_xattr_create_index_block);
1806 DEFINE_OCFS2_ULL_UINT_UINT_UINT_EVENT(ocfs2_defrag_xattr_bucket);
1808 DEFINE_OCFS2_ULL_ULL_EVENT(ocfs2_mv_xattr_bucket_cross_cluster);
1810 DEFINE_OCFS2_ULL_ULL_EVENT(ocfs2_divide_xattr_bucket_begin);
1812 DEFINE_OCFS2_UINT_UINT_UINT_EVENT(ocfs2_divide_xattr_bucket_move);
1814 DEFINE_OCFS2_ULL_ULL_UINT_EVENT(ocfs2_cp_xattr_bucket);
1816 DEFINE_OCFS2_ULL_ULL_EVENT(ocfs2_mv_xattr_buckets);
1818 DEFINE_OCFS2_ULL_ULL_UINT_EVENT(ocfs2_adjust_xattr_cross_cluster);
1820 DEFINE_OCFS2_ULL_ULL_UINT_UINT_EVENT(ocfs2_add_new_xattr_cluster_begin);
1822 DEFINE_OCFS2_ULL_UINT_EVENT(ocfs2_add_new_xattr_cluster);
1824 DEFINE_OCFS2_ULL_UINT_UINT_EVENT(ocfs2_add_new_xattr_cluster_insert);
1826 DEFINE_OCFS2_ULL_ULL_UINT_UINT_EVENT(ocfs2_extend_xattr_bucket);
1828 DEFINE_OCFS2_ULL_EVENT(ocfs2_add_new_xattr_bucket);
1830 DEFINE_OCFS2_ULL_UINT_UINT_EVENT(ocfs2_xattr_bucket_value_truncate);
1832 DEFINE_OCFS2_ULL_ULL_UINT_UINT_EVENT(ocfs2_rm_xattr_cluster);
1834 DEFINE_OCFS2_ULL_UINT_EVENT(ocfs2_reflink_xattr_header);
1836 DEFINE_OCFS2_ULL_INT_EVENT(ocfs2_create_empty_xattr_block);
1838 DEFINE_OCFS2_STRING_EVENT(ocfs2_xattr_set_entry_bucket);
1840 DEFINE_OCFS2_STRING_EVENT(ocfs2_xattr_set_entry_index_block);
1842 DEFINE_OCFS2_ULL_UINT_EVENT(ocfs2_xattr_bucket_value_refcount);
1844 DEFINE_OCFS2_ULL_UINT_UINT_EVENT(ocfs2_reflink_xattr_buckets);
1846 DEFINE_OCFS2_ULL_UINT_EVENT(ocfs2_reflink_xattr_rec);
1848 /* End of trace events for fs/ocfs2/xattr.c. */
1850 /* Trace events for fs/ocfs2/reservations.c. */
1852 DEFINE_OCFS2_UINT_UINT_EVENT(ocfs2_resv_insert);
1854 DEFINE_OCFS2_ULL_UINT_UINT_UINT_EVENT(ocfs2_resmap_find_free_bits_begin);
1856 DEFINE_OCFS2_UINT_UINT_EVENT(ocfs2_resmap_find_free_bits_end);
1858 TRACE_EVENT(ocfs2_resv_find_window_begin,
1859 TP_PROTO(unsigned int r_start, unsigned int r_end, unsigned int goal,
1860 unsigned int wanted, int empty_root),
1861 TP_ARGS(r_start, r_end, goal, wanted, empty_root),
1862 TP_STRUCT__entry(
1863 __field(unsigned int, r_start)
1864 __field(unsigned int, r_end)
1865 __field(unsigned int, goal)
1866 __field(unsigned int, wanted)
1867 __field(int, empty_root)
1869 TP_fast_assign(
1870 __entry->r_start = r_start;
1871 __entry->r_end = r_end;
1872 __entry->goal = goal;
1873 __entry->wanted = wanted;
1874 __entry->empty_root = empty_root;
1876 TP_printk("%u %u %u %u %d", __entry->r_start, __entry->r_end,
1877 __entry->goal, __entry->wanted, __entry->empty_root)
1880 DEFINE_OCFS2_UINT_UINT_EVENT(ocfs2_resv_find_window_prev);
1882 DEFINE_OCFS2_INT_INT_EVENT(ocfs2_resv_find_window_next);
1884 DEFINE_OCFS2_UINT_UINT_UINT_EVENT(ocfs2_cannibalize_resv_begin);
1886 TRACE_EVENT(ocfs2_cannibalize_resv_end,
1887 TP_PROTO(unsigned int start, unsigned int end, unsigned int len,
1888 unsigned int last_start, unsigned int last_len),
1889 TP_ARGS(start, end, len, last_start, last_len),
1890 TP_STRUCT__entry(
1891 __field(unsigned int, start)
1892 __field(unsigned int, end)
1893 __field(unsigned int, len)
1894 __field(unsigned int, last_start)
1895 __field(unsigned int, last_len)
1897 TP_fast_assign(
1898 __entry->start = start;
1899 __entry->end = end;
1900 __entry->len = len;
1901 __entry->last_start = last_start;
1902 __entry->last_len = last_len;
1904 TP_printk("%u %u %u %u %u", __entry->start, __entry->end,
1905 __entry->len, __entry->last_start, __entry->last_len)
1908 DEFINE_OCFS2_UINT_UINT_EVENT(ocfs2_resmap_resv_bits);
1910 TRACE_EVENT(ocfs2_resmap_claimed_bits_begin,
1911 TP_PROTO(unsigned int cstart, unsigned int cend, unsigned int clen,
1912 unsigned int r_start, unsigned int r_end, unsigned int r_len,
1913 unsigned int last_start, unsigned int last_len),
1914 TP_ARGS(cstart, cend, clen, r_start, r_end,
1915 r_len, last_start, last_len),
1916 TP_STRUCT__entry(
1917 __field(unsigned int, cstart)
1918 __field(unsigned int, cend)
1919 __field(unsigned int, clen)
1920 __field(unsigned int, r_start)
1921 __field(unsigned int, r_end)
1922 __field(unsigned int, r_len)
1923 __field(unsigned int, last_start)
1924 __field(unsigned int, last_len)
1926 TP_fast_assign(
1927 __entry->cstart = cstart;
1928 __entry->cend = cend;
1929 __entry->clen = clen;
1930 __entry->r_start = r_start;
1931 __entry->r_end = r_end;
1932 __entry->r_len = r_len;
1933 __entry->last_start = last_start;
1934 __entry->last_len = last_len;
1936 TP_printk("%u %u %u %u %u %u %u %u",
1937 __entry->cstart, __entry->cend, __entry->clen,
1938 __entry->r_start, __entry->r_end, __entry->r_len,
1939 __entry->last_start, __entry->last_len)
1942 TRACE_EVENT(ocfs2_resmap_claimed_bits_end,
1943 TP_PROTO(unsigned int start, unsigned int end, unsigned int len,
1944 unsigned int last_start, unsigned int last_len),
1945 TP_ARGS(start, end, len, last_start, last_len),
1946 TP_STRUCT__entry(
1947 __field(unsigned int, start)
1948 __field(unsigned int, end)
1949 __field(unsigned int, len)
1950 __field(unsigned int, last_start)
1951 __field(unsigned int, last_len)
1953 TP_fast_assign(
1954 __entry->start = start;
1955 __entry->end = end;
1956 __entry->len = len;
1957 __entry->last_start = last_start;
1958 __entry->last_len = last_len;
1960 TP_printk("%u %u %u %u %u", __entry->start, __entry->end,
1961 __entry->len, __entry->last_start, __entry->last_len)
1964 /* End of trace events for fs/ocfs2/reservations.c. */
1966 /* Trace events for fs/ocfs2/quota_local.c. */
1968 DEFINE_OCFS2_ULL_UINT_EVENT(ocfs2_recover_local_quota_file);
1970 DEFINE_OCFS2_INT_EVENT(ocfs2_finish_quota_recovery);
1972 DEFINE_OCFS2_ULL_ULL_UINT_EVENT(olq_set_dquot);
1974 /* End of trace events for fs/ocfs2/quota_local.c. */
1976 /* Trace events for fs/ocfs2/quota_global.c. */
1978 DEFINE_OCFS2_ULL_EVENT(ocfs2_validate_quota_block);
1980 TRACE_EVENT(ocfs2_sync_dquot,
1981 TP_PROTO(unsigned int dq_id, long long dqb_curspace,
1982 long long spacechange, long long curinodes,
1983 long long inodechange),
1984 TP_ARGS(dq_id, dqb_curspace, spacechange, curinodes, inodechange),
1985 TP_STRUCT__entry(
1986 __field(unsigned int, dq_id)
1987 __field(long long, dqb_curspace)
1988 __field(long long, spacechange)
1989 __field(long long, curinodes)
1990 __field(long long, inodechange)
1992 TP_fast_assign(
1993 __entry->dq_id = dq_id;
1994 __entry->dqb_curspace = dqb_curspace;
1995 __entry->spacechange = spacechange;
1996 __entry->curinodes = curinodes;
1997 __entry->inodechange = inodechange;
1999 TP_printk("%u %lld %lld %lld %lld", __entry->dq_id,
2000 __entry->dqb_curspace, __entry->spacechange,
2001 __entry->curinodes, __entry->inodechange)
2004 TRACE_EVENT(ocfs2_sync_dquot_helper,
2005 TP_PROTO(unsigned int dq_id, unsigned int dq_type, unsigned long type,
2006 const char *s_id),
2007 TP_ARGS(dq_id, dq_type, type, s_id),
2009 TP_STRUCT__entry(
2010 __field(unsigned int, dq_id)
2011 __field(unsigned int, dq_type)
2012 __field(unsigned long, type)
2013 __string(s_id, s_id)
2015 TP_fast_assign(
2016 __entry->dq_id = dq_id;
2017 __entry->dq_type = dq_type;
2018 __entry->type = type;
2019 __assign_str(s_id, s_id);
2021 TP_printk("%u %u %lu %s", __entry->dq_id, __entry->dq_type,
2022 __entry->type, __get_str(s_id))
2025 DEFINE_OCFS2_UINT_INT_EVENT(ocfs2_write_dquot);
2027 DEFINE_OCFS2_UINT_INT_EVENT(ocfs2_release_dquot);
2029 DEFINE_OCFS2_UINT_INT_EVENT(ocfs2_acquire_dquot);
2031 DEFINE_OCFS2_UINT_INT_EVENT(ocfs2_get_next_id);
2033 DEFINE_OCFS2_UINT_INT_EVENT(ocfs2_mark_dquot_dirty);
2035 /* End of trace events for fs/ocfs2/quota_global.c. */
2037 /* Trace events for fs/ocfs2/dir.c. */
2038 DEFINE_OCFS2_INT_EVENT(ocfs2_search_dirblock);
2040 DEFINE_OCFS2_ULL_EVENT(ocfs2_validate_dir_block);
2042 DEFINE_OCFS2_POINTER_EVENT(ocfs2_find_entry_el);
2044 TRACE_EVENT(ocfs2_dx_dir_search,
2045 TP_PROTO(unsigned long long ino, int namelen, const char *name,
2046 unsigned int major_hash, unsigned int minor_hash,
2047 unsigned long long blkno),
2048 TP_ARGS(ino, namelen, name, major_hash, minor_hash, blkno),
2049 TP_STRUCT__entry(
2050 __field(unsigned long long, ino)
2051 __field(int, namelen)
2052 __string(name, name)
2053 __field(unsigned int, major_hash)
2054 __field(unsigned int,minor_hash)
2055 __field(unsigned long long, blkno)
2057 TP_fast_assign(
2058 __entry->ino = ino;
2059 __entry->namelen = namelen;
2060 __assign_str(name, name);
2061 __entry->major_hash = major_hash;
2062 __entry->minor_hash = minor_hash;
2063 __entry->blkno = blkno;
2065 TP_printk("%llu %.*s %u %u %llu", __entry->ino,
2066 __entry->namelen, __get_str(name),
2067 __entry->major_hash, __entry->minor_hash, __entry->blkno)
2070 DEFINE_OCFS2_UINT_UINT_EVENT(ocfs2_dx_dir_search_leaf_info);
2072 DEFINE_OCFS2_ULL_INT_EVENT(ocfs2_delete_entry_dx);
2074 DEFINE_OCFS2_ULL_EVENT(ocfs2_readdir);
2076 TRACE_EVENT(ocfs2_find_files_on_disk,
2077 TP_PROTO(int namelen, const char *name, void *blkno,
2078 unsigned long long dir),
2079 TP_ARGS(namelen, name, blkno, dir),
2080 TP_STRUCT__entry(
2081 __field(int, namelen)
2082 __string(name, name)
2083 __field(void *, blkno)
2084 __field(unsigned long long, dir)
2086 TP_fast_assign(
2087 __entry->namelen = namelen;
2088 __assign_str(name, name);
2089 __entry->blkno = blkno;
2090 __entry->dir = dir;
2092 TP_printk("%.*s %p %llu", __entry->namelen, __get_str(name),
2093 __entry->blkno, __entry->dir)
2096 TRACE_EVENT(ocfs2_check_dir_for_entry,
2097 TP_PROTO(unsigned long long dir, int namelen, const char *name),
2098 TP_ARGS(dir, namelen, name),
2099 TP_STRUCT__entry(
2100 __field(unsigned long long, dir)
2101 __field(int, namelen)
2102 __string(name, name)
2104 TP_fast_assign(
2105 __entry->dir = dir;
2106 __entry->namelen = namelen;
2107 __assign_str(name, name);
2109 TP_printk("%llu %.*s", __entry->dir,
2110 __entry->namelen, __get_str(name))
2113 DEFINE_OCFS2_ULL_ULL_EVENT(ocfs2_dx_dir_attach_index);
2115 DEFINE_OCFS2_ULL_ULL_UINT_EVENT(ocfs2_dx_dir_format_cluster);
2117 TRACE_EVENT(ocfs2_dx_dir_index_root_block,
2118 TP_PROTO(unsigned long long dir,
2119 unsigned int major_hash, unsigned int minor_hash,
2120 int namelen, const char *name, unsigned int num_used),
2121 TP_ARGS(dir, major_hash, minor_hash, namelen, name, num_used),
2122 TP_STRUCT__entry(
2123 __field(unsigned long long, dir)
2124 __field(unsigned int, major_hash)
2125 __field(unsigned int, minor_hash)
2126 __field(int, namelen)
2127 __string(name, name)
2128 __field(unsigned int, num_used)
2130 TP_fast_assign(
2131 __entry->dir = dir;
2132 __entry->major_hash = major_hash;
2133 __entry->minor_hash = minor_hash;
2134 __entry->namelen = namelen;
2135 __assign_str(name, name);
2136 __entry->num_used = num_used;
2138 TP_printk("%llu %x %x %.*s %u", __entry->dir,
2139 __entry->major_hash, __entry->minor_hash,
2140 __entry->namelen, __get_str(name), __entry->num_used)
2143 DEFINE_OCFS2_ULL_ULL_EVENT(ocfs2_extend_dir);
2145 DEFINE_OCFS2_ULL_ULL_UINT_EVENT(ocfs2_dx_dir_rebalance);
2147 DEFINE_OCFS2_UINT_UINT_UINT_EVENT(ocfs2_dx_dir_rebalance_split);
2149 DEFINE_OCFS2_ULL_INT_EVENT(ocfs2_prepare_dir_for_insert);
2151 /* End of trace events for fs/ocfs2/dir.c. */
2153 /* Trace events for fs/ocfs2/namei.c. */
2155 DECLARE_EVENT_CLASS(ocfs2__dentry_ops,
2156 TP_PROTO(void *dir, void *dentry, int name_len, const char *name,
2157 unsigned long long dir_blkno, unsigned long long extra),
2158 TP_ARGS(dir, dentry, name_len, name, dir_blkno, extra),
2159 TP_STRUCT__entry(
2160 __field(void *, dir)
2161 __field(void *, dentry)
2162 __field(int, name_len)
2163 __string(name, name)
2164 __field(unsigned long long, dir_blkno)
2165 __field(unsigned long long, extra)
2167 TP_fast_assign(
2168 __entry->dir = dir;
2169 __entry->dentry = dentry;
2170 __entry->name_len = name_len;
2171 __assign_str(name, name);
2172 __entry->dir_blkno = dir_blkno;
2173 __entry->extra = extra;
2175 TP_printk("%p %p %.*s %llu %llu", __entry->dir, __entry->dentry,
2176 __entry->name_len, __get_str(name),
2177 __entry->dir_blkno, __entry->extra)
2180 #define DEFINE_OCFS2_DENTRY_OPS(name) \
2181 DEFINE_EVENT(ocfs2__dentry_ops, name, \
2182 TP_PROTO(void *dir, void *dentry, int name_len, const char *name, \
2183 unsigned long long dir_blkno, unsigned long long extra), \
2184 TP_ARGS(dir, dentry, name_len, name, dir_blkno, extra))
2186 DEFINE_OCFS2_DENTRY_OPS(ocfs2_lookup);
2188 DEFINE_OCFS2_DENTRY_OPS(ocfs2_mkdir);
2190 DEFINE_OCFS2_DENTRY_OPS(ocfs2_create);
2192 DEFINE_OCFS2_DENTRY_OPS(ocfs2_unlink);
2194 DEFINE_OCFS2_DENTRY_OPS(ocfs2_symlink_create);
2196 DEFINE_OCFS2_DENTRY_OPS(ocfs2_mv_orphaned_inode_to_new);
2198 DEFINE_OCFS2_POINTER_EVENT(ocfs2_lookup_ret);
2200 TRACE_EVENT(ocfs2_mknod,
2201 TP_PROTO(void *dir, void *dentry, int name_len, const char *name,
2202 unsigned long long dir_blkno, unsigned long dev, int mode),
2203 TP_ARGS(dir, dentry, name_len, name, dir_blkno, dev, mode),
2204 TP_STRUCT__entry(
2205 __field(void *, dir)
2206 __field(void *, dentry)
2207 __field(int, name_len)
2208 __string(name, name)
2209 __field(unsigned long long, dir_blkno)
2210 __field(unsigned long, dev)
2211 __field(int, mode)
2213 TP_fast_assign(
2214 __entry->dir = dir;
2215 __entry->dentry = dentry;
2216 __entry->name_len = name_len;
2217 __assign_str(name, name);
2218 __entry->dir_blkno = dir_blkno;
2219 __entry->dev = dev;
2220 __entry->mode = mode;
2222 TP_printk("%p %p %.*s %llu %lu %d", __entry->dir, __entry->dentry,
2223 __entry->name_len, __get_str(name),
2224 __entry->dir_blkno, __entry->dev, __entry->mode)
2227 TRACE_EVENT(ocfs2_link,
2228 TP_PROTO(unsigned long long ino, int old_len, const char *old_name,
2229 int name_len, const char *name),
2230 TP_ARGS(ino, old_len, old_name, name_len, name),
2231 TP_STRUCT__entry(
2232 __field(unsigned long long, ino)
2233 __field(int, old_len)
2234 __string(old_name, old_name)
2235 __field(int, name_len)
2236 __string(name, name)
2238 TP_fast_assign(
2239 __entry->ino = ino;
2240 __entry->old_len = old_len;
2241 __assign_str(old_name, old_name);
2242 __entry->name_len = name_len;
2243 __assign_str(name, name);
2245 TP_printk("%llu %.*s %.*s", __entry->ino,
2246 __entry->old_len, __get_str(old_name),
2247 __entry->name_len, __get_str(name))
2250 DEFINE_OCFS2_ULL_ULL_UINT_EVENT(ocfs2_unlink_noent);
2252 DEFINE_OCFS2_ULL_ULL_EVENT(ocfs2_double_lock);
2254 DEFINE_OCFS2_ULL_ULL_EVENT(ocfs2_double_lock_end);
2256 TRACE_EVENT(ocfs2_rename,
2257 TP_PROTO(void *old_dir, void *old_dentry,
2258 void *new_dir, void *new_dentry,
2259 int old_len, const char *old_name,
2260 int new_len, const char *new_name),
2261 TP_ARGS(old_dir, old_dentry, new_dir, new_dentry,
2262 old_len, old_name, new_len, new_name),
2263 TP_STRUCT__entry(
2264 __field(void *, old_dir)
2265 __field(void *, old_dentry)
2266 __field(void *, new_dir)
2267 __field(void *, new_dentry)
2268 __field(int, old_len)
2269 __string(old_name, old_name)
2270 __field(int, new_len)
2271 __string(new_name, new_name)
2273 TP_fast_assign(
2274 __entry->old_dir = old_dir;
2275 __entry->old_dentry = old_dentry;
2276 __entry->new_dir = new_dir;
2277 __entry->new_dentry = new_dentry;
2278 __entry->old_len = old_len;
2279 __assign_str(old_name, old_name);
2280 __entry->new_len = new_len;
2281 __assign_str(new_name, new_name);
2283 TP_printk("%p %p %p %p %.*s %.*s",
2284 __entry->old_dir, __entry->old_dentry,
2285 __entry->new_dir, __entry->new_dentry,
2286 __entry->old_len, __get_str(old_name),
2287 __entry->new_len, __get_str(new_name))
2290 DEFINE_OCFS2_ULL_ULL_EVENT(ocfs2_rename_not_permitted);
2292 TRACE_EVENT(ocfs2_rename_target_exists,
2293 TP_PROTO(int new_len, const char *new_name),
2294 TP_ARGS(new_len, new_name),
2295 TP_STRUCT__entry(
2296 __field(int, new_len)
2297 __string(new_name, new_name)
2299 TP_fast_assign(
2300 __entry->new_len = new_len;
2301 __assign_str(new_name, new_name);
2303 TP_printk("%.*s", __entry->new_len, __get_str(new_name))
2306 DEFINE_OCFS2_ULL_ULL_UINT_EVENT(ocfs2_rename_disagree);
2308 TRACE_EVENT(ocfs2_rename_over_existing,
2309 TP_PROTO(unsigned long long new_blkno, void *new_bh,
2310 unsigned long long newdi_blkno),
2311 TP_ARGS(new_blkno, new_bh, newdi_blkno),
2312 TP_STRUCT__entry(
2313 __field(unsigned long long, new_blkno)
2314 __field(void *, new_bh)
2315 __field(unsigned long long, newdi_blkno)
2317 TP_fast_assign(
2318 __entry->new_blkno = new_blkno;
2319 __entry->new_bh = new_bh;
2320 __entry->newdi_blkno = newdi_blkno;
2322 TP_printk("%llu %p %llu", __entry->new_blkno, __entry->new_bh,
2323 __entry->newdi_blkno)
2326 DEFINE_OCFS2_ULL_ULL_UINT_EVENT(ocfs2_create_symlink_data);
2328 TRACE_EVENT(ocfs2_symlink_begin,
2329 TP_PROTO(void *dir, void *dentry, const char *symname,
2330 int len, const char *name),
2331 TP_ARGS(dir, dentry, symname, len, name),
2332 TP_STRUCT__entry(
2333 __field(void *, dir)
2334 __field(void *, dentry)
2335 __field(const char *, symname)
2336 __field(int, len)
2337 __string(name, name)
2339 TP_fast_assign(
2340 __entry->dir = dir;
2341 __entry->dentry = dentry;
2342 __entry->symname = symname;
2343 __entry->len = len;
2344 __assign_str(name, name);
2346 TP_printk("%p %p %s %.*s", __entry->dir, __entry->dentry,
2347 __entry->symname, __entry->len, __get_str(name))
2350 TRACE_EVENT(ocfs2_blkno_stringify,
2351 TP_PROTO(unsigned long long blkno, const char *name, int namelen),
2352 TP_ARGS(blkno, name, namelen),
2353 TP_STRUCT__entry(
2354 __field(unsigned long long, blkno)
2355 __string(name, name)
2356 __field(int, namelen)
2358 TP_fast_assign(
2359 __entry->blkno = blkno;
2360 __assign_str(name, name);
2361 __entry->namelen = namelen;
2363 TP_printk("%llu %s %d", __entry->blkno, __get_str(name),
2364 __entry->namelen)
2367 DEFINE_OCFS2_ULL_EVENT(ocfs2_orphan_add_begin);
2369 DEFINE_OCFS2_ULL_UINT_EVENT(ocfs2_orphan_add_end);
2371 TRACE_EVENT(ocfs2_orphan_del,
2372 TP_PROTO(unsigned long long dir, const char *name, int namelen),
2373 TP_ARGS(dir, name, namelen),
2374 TP_STRUCT__entry(
2375 __field(unsigned long long, dir)
2376 __string(name, name)
2377 __field(int, namelen)
2379 TP_fast_assign(
2380 __entry->dir = dir;
2381 __assign_str(name, name);
2382 __entry->namelen = namelen;
2384 TP_printk("%llu %s %d", __entry->dir, __get_str(name),
2385 __entry->namelen)
2388 /* End of trace events for fs/ocfs2/namei.c. */
2390 /* Trace events for fs/ocfs2/dcache.c. */
2392 TRACE_EVENT(ocfs2_dentry_revalidate,
2393 TP_PROTO(void *dentry, int len, const char *name),
2394 TP_ARGS(dentry, len, name),
2395 TP_STRUCT__entry(
2396 __field(void *, dentry)
2397 __field(int, len)
2398 __string(name, name)
2400 TP_fast_assign(
2401 __entry->dentry = dentry;
2402 __entry->len = len;
2403 __assign_str(name, name);
2405 TP_printk("%p %.*s", __entry->dentry, __entry->len, __get_str(name))
2408 TRACE_EVENT(ocfs2_dentry_revalidate_negative,
2409 TP_PROTO(int len, const char *name, unsigned long pgen,
2410 unsigned long gen),
2411 TP_ARGS(len, name, pgen, gen),
2412 TP_STRUCT__entry(
2413 __field(int, len)
2414 __string(name, name)
2415 __field(unsigned long, pgen)
2416 __field(unsigned long, gen)
2418 TP_fast_assign(
2419 __entry->len = len;
2420 __assign_str(name, name);
2421 __entry->pgen = pgen;
2422 __entry->gen = gen;
2424 TP_printk("%.*s %lu %lu", __entry->len, __get_str(name),
2425 __entry->pgen, __entry->gen)
2428 DEFINE_OCFS2_ULL_EVENT(ocfs2_dentry_revalidate_delete);
2430 DEFINE_OCFS2_ULL_INT_EVENT(ocfs2_dentry_revalidate_orphaned);
2432 DEFINE_OCFS2_ULL_EVENT(ocfs2_dentry_revalidate_nofsdata);
2434 DEFINE_OCFS2_INT_EVENT(ocfs2_dentry_revalidate_ret);
2436 TRACE_EVENT(ocfs2_find_local_alias,
2437 TP_PROTO(int len, const char *name),
2438 TP_ARGS(len, name),
2439 TP_STRUCT__entry(
2440 __field(int, len)
2441 __string(name, name)
2443 TP_fast_assign(
2444 __entry->len = len;
2445 __assign_str(name, name);
2447 TP_printk("%.*s", __entry->len, __get_str(name))
2450 TRACE_EVENT(ocfs2_dentry_attach_lock,
2451 TP_PROTO(int len, const char *name,
2452 unsigned long long parent, void *fsdata),
2453 TP_ARGS(len, name, parent, fsdata),
2454 TP_STRUCT__entry(
2455 __field(int, len)
2456 __string(name, name)
2457 __field(unsigned long long, parent)
2458 __field(void *, fsdata)
2460 TP_fast_assign(
2461 __entry->len = len;
2462 __assign_str(name, name);
2463 __entry->parent = parent;
2464 __entry->fsdata = fsdata;
2466 TP_printk("%.*s %llu %p", __entry->len, __get_str(name),
2467 __entry->parent, __entry->fsdata)
2470 TRACE_EVENT(ocfs2_dentry_attach_lock_found,
2471 TP_PROTO(const char *name, unsigned long long parent,
2472 unsigned long long ino),
2473 TP_ARGS(name, parent, ino),
2474 TP_STRUCT__entry(
2475 __string(name, name)
2476 __field(unsigned long long, parent)
2477 __field(unsigned long long, ino)
2479 TP_fast_assign(
2480 __assign_str(name, name);
2481 __entry->parent = parent;
2482 __entry->ino = ino;
2484 TP_printk("%s %llu %llu", __get_str(name), __entry->parent, __entry->ino)
2486 /* End of trace events for fs/ocfs2/dcache.c. */
2488 /* Trace events for fs/ocfs2/export.c. */
2490 TRACE_EVENT(ocfs2_get_dentry_begin,
2491 TP_PROTO(void *sb, void *handle, unsigned long long blkno),
2492 TP_ARGS(sb, handle, blkno),
2493 TP_STRUCT__entry(
2494 __field(void *, sb)
2495 __field(void *, handle)
2496 __field(unsigned long long, blkno)
2498 TP_fast_assign(
2499 __entry->sb = sb;
2500 __entry->handle = handle;
2501 __entry->blkno = blkno;
2503 TP_printk("%p %p %llu", __entry->sb, __entry->handle, __entry->blkno)
2506 DEFINE_OCFS2_INT_INT_EVENT(ocfs2_get_dentry_test_bit);
2508 DEFINE_OCFS2_ULL_UINT_EVENT(ocfs2_get_dentry_stale);
2510 DEFINE_OCFS2_ULL_UINT_UINT_EVENT(ocfs2_get_dentry_generation);
2512 DEFINE_OCFS2_POINTER_EVENT(ocfs2_get_dentry_end);
2514 TRACE_EVENT(ocfs2_get_parent,
2515 TP_PROTO(void *child, int len, const char *name,
2516 unsigned long long ino),
2517 TP_ARGS(child, len, name, ino),
2518 TP_STRUCT__entry(
2519 __field(void *, child)
2520 __field(int, len)
2521 __string(name, name)
2522 __field(unsigned long long, ino)
2524 TP_fast_assign(
2525 __entry->child = child;
2526 __entry->len = len;
2527 __assign_str(name, name);
2528 __entry->ino = ino;
2530 TP_printk("%p %.*s %llu", __entry->child, __entry->len,
2531 __get_str(name), __entry->ino)
2534 DEFINE_OCFS2_POINTER_EVENT(ocfs2_get_parent_end);
2536 TRACE_EVENT(ocfs2_encode_fh_begin,
2537 TP_PROTO(void *dentry, int name_len, const char *name,
2538 void *fh, int len, int connectable),
2539 TP_ARGS(dentry, name_len, name, fh, len, connectable),
2540 TP_STRUCT__entry(
2541 __field(void *, dentry)
2542 __field(int, name_len)
2543 __string(name, name)
2544 __field(void *, fh)
2545 __field(int, len)
2546 __field(int, connectable)
2548 TP_fast_assign(
2549 __entry->dentry = dentry;
2550 __entry->name_len = name_len;
2551 __assign_str(name, name);
2552 __entry->fh = fh;
2553 __entry->len = len;
2554 __entry->connectable = connectable;
2556 TP_printk("%p %.*s %p %d %d", __entry->dentry, __entry->name_len,
2557 __get_str(name), __entry->fh, __entry->len,
2558 __entry->connectable)
2561 DEFINE_OCFS2_ULL_UINT_EVENT(ocfs2_encode_fh_self);
2563 DEFINE_OCFS2_ULL_UINT_EVENT(ocfs2_encode_fh_parent);
2565 DEFINE_OCFS2_INT_EVENT(ocfs2_encode_fh_type);
2567 /* End of trace events for fs/ocfs2/export.c. */
2569 /* Trace events for fs/ocfs2/journal.c. */
2571 DEFINE_OCFS2_UINT_EVENT(ocfs2_commit_cache_begin);
2573 DEFINE_OCFS2_ULL_UINT_EVENT(ocfs2_commit_cache_end);
2575 DEFINE_OCFS2_INT_INT_EVENT(ocfs2_extend_trans);
2577 DEFINE_OCFS2_INT_EVENT(ocfs2_extend_trans_restart);
2579 DEFINE_OCFS2_INT_INT_EVENT(ocfs2_allocate_extend_trans);
2581 DEFINE_OCFS2_ULL_ULL_UINT_UINT_EVENT(ocfs2_journal_access);
2583 DEFINE_OCFS2_ULL_EVENT(ocfs2_journal_dirty);
2585 DEFINE_OCFS2_ULL_ULL_UINT_EVENT(ocfs2_journal_init);
2587 DEFINE_OCFS2_UINT_EVENT(ocfs2_journal_init_maxlen);
2589 DEFINE_OCFS2_INT_EVENT(ocfs2_journal_shutdown);
2591 DEFINE_OCFS2_POINTER_EVENT(ocfs2_journal_shutdown_wait);
2593 DEFINE_OCFS2_ULL_EVENT(ocfs2_complete_recovery);
2595 DEFINE_OCFS2_INT_EVENT(ocfs2_complete_recovery_end);
2597 TRACE_EVENT(ocfs2_complete_recovery_slot,
2598 TP_PROTO(int slot, unsigned long long la_ino,
2599 unsigned long long tl_ino, void *qrec),
2600 TP_ARGS(slot, la_ino, tl_ino, qrec),
2601 TP_STRUCT__entry(
2602 __field(int, slot)
2603 __field(unsigned long long, la_ino)
2604 __field(unsigned long long, tl_ino)
2605 __field(void *, qrec)
2607 TP_fast_assign(
2608 __entry->slot = slot;
2609 __entry->la_ino = la_ino;
2610 __entry->tl_ino = tl_ino;
2611 __entry->qrec = qrec;
2613 TP_printk("%d %llu %llu %p", __entry->slot, __entry->la_ino,
2614 __entry->tl_ino, __entry->qrec)
2617 DEFINE_OCFS2_INT_INT_EVENT(ocfs2_recovery_thread_node);
2619 DEFINE_OCFS2_INT_EVENT(ocfs2_recovery_thread_end);
2621 TRACE_EVENT(ocfs2_recovery_thread,
2622 TP_PROTO(int node_num, int osb_node_num, int disable,
2623 void *recovery_thread, int map_set),
2624 TP_ARGS(node_num, osb_node_num, disable, recovery_thread, map_set),
2625 TP_STRUCT__entry(
2626 __field(int, node_num)
2627 __field(int, osb_node_num)
2628 __field(int,disable)
2629 __field(void *, recovery_thread)
2630 __field(int,map_set)
2632 TP_fast_assign(
2633 __entry->node_num = node_num;
2634 __entry->osb_node_num = osb_node_num;
2635 __entry->disable = disable;
2636 __entry->recovery_thread = recovery_thread;
2637 __entry->map_set = map_set;
2639 TP_printk("%d %d %d %p %d", __entry->node_num,
2640 __entry->osb_node_num, __entry->disable,
2641 __entry->recovery_thread, __entry->map_set)
2644 DEFINE_OCFS2_UINT_UINT_UINT_EVENT(ocfs2_replay_journal_recovered);
2646 DEFINE_OCFS2_INT_EVENT(ocfs2_replay_journal_lock_err);
2648 DEFINE_OCFS2_INT_EVENT(ocfs2_replay_journal_skip);
2650 DEFINE_OCFS2_UINT_UINT_UINT_EVENT(ocfs2_recover_node);
2652 DEFINE_OCFS2_UINT_UINT_EVENT(ocfs2_recover_node_skip);
2654 DEFINE_OCFS2_UINT_UINT_EVENT(ocfs2_mark_dead_nodes);
2656 DEFINE_OCFS2_UINT_UINT_UINT_EVENT(ocfs2_queue_orphan_scan_begin);
2658 DEFINE_OCFS2_UINT_UINT_UINT_EVENT(ocfs2_queue_orphan_scan_end);
2660 DEFINE_OCFS2_ULL_EVENT(ocfs2_orphan_filldir);
2662 DEFINE_OCFS2_INT_EVENT(ocfs2_recover_orphans);
2664 DEFINE_OCFS2_ULL_EVENT(ocfs2_recover_orphans_iput);
2666 DEFINE_OCFS2_INT_EVENT(ocfs2_wait_on_mount);
2668 /* End of trace events for fs/ocfs2/journal.c. */
2670 /* Trace events for fs/ocfs2/buffer_head_io.c. */
2672 DEFINE_OCFS2_ULL_UINT_EVENT(ocfs2_read_blocks_sync);
2674 DEFINE_OCFS2_ULL_EVENT(ocfs2_read_blocks_sync_jbd);
2676 DEFINE_OCFS2_ULL_ULL_EVENT(ocfs2_read_blocks_from_disk);
2678 DEFINE_OCFS2_ULL_INT_INT_INT_EVENT(ocfs2_read_blocks_bh);
2680 DEFINE_OCFS2_ULL_INT_INT_INT_EVENT(ocfs2_read_blocks_end);
2682 TRACE_EVENT(ocfs2_write_block,
2683 TP_PROTO(unsigned long long block, void *ci),
2684 TP_ARGS(block, ci),
2685 TP_STRUCT__entry(
2686 __field(unsigned long long, block)
2687 __field(void *, ci)
2689 TP_fast_assign(
2690 __entry->block = block;
2691 __entry->ci = ci;
2693 TP_printk("%llu %p", __entry->block, __entry->ci)
2696 TRACE_EVENT(ocfs2_read_blocks_begin,
2697 TP_PROTO(void *ci, unsigned long long block,
2698 unsigned int nr, int flags),
2699 TP_ARGS(ci, block, nr, flags),
2700 TP_STRUCT__entry(
2701 __field(void *, ci)
2702 __field(unsigned long long, block)
2703 __field(unsigned int, nr)
2704 __field(int, flags)
2706 TP_fast_assign(
2707 __entry->ci = ci;
2708 __entry->block = block;
2709 __entry->nr = nr;
2710 __entry->flags = flags;
2712 TP_printk("%p %llu %u %d", __entry->ci, __entry->block,
2713 __entry->nr, __entry->flags)
2716 /* End of trace events for fs/ocfs2/buffer_head_io.c. */
2718 /* Trace events for fs/ocfs2/uptodate.c. */
2720 DEFINE_OCFS2_ULL_EVENT(ocfs2_purge_copied_metadata_tree);
2722 DEFINE_OCFS2_ULL_UINT_UINT_EVENT(ocfs2_metadata_cache_purge);
2724 DEFINE_OCFS2_ULL_ULL_UINT_EVENT(ocfs2_buffer_cached_begin);
2726 TRACE_EVENT(ocfs2_buffer_cached_end,
2727 TP_PROTO(int index, void *item),
2728 TP_ARGS(index, item),
2729 TP_STRUCT__entry(
2730 __field(int, index)
2731 __field(void *, item)
2733 TP_fast_assign(
2734 __entry->index = index;
2735 __entry->item = item;
2737 TP_printk("%d %p", __entry->index, __entry->item)
2740 DEFINE_OCFS2_ULL_ULL_UINT_EVENT(ocfs2_append_cache_array);
2742 DEFINE_OCFS2_ULL_ULL_UINT_EVENT(ocfs2_insert_cache_tree);
2744 DEFINE_OCFS2_ULL_UINT_UINT_EVENT(ocfs2_expand_cache);
2746 DEFINE_OCFS2_ULL_UINT_UINT_EVENT(ocfs2_set_buffer_uptodate);
2748 DEFINE_OCFS2_ULL_ULL_EVENT(ocfs2_set_buffer_uptodate_begin);
2750 DEFINE_OCFS2_ULL_UINT_UINT_EVENT(ocfs2_remove_metadata_array);
2752 DEFINE_OCFS2_ULL_ULL_EVENT(ocfs2_remove_metadata_tree);
2754 DEFINE_OCFS2_ULL_ULL_UINT_UINT_EVENT(ocfs2_remove_block_from_cache);
2756 /* End of trace events for fs/ocfs2/uptodate.c. */
2757 #endif /* _TRACE_OCFS2_H */
2759 /* This part must be outside protection */
2760 #undef TRACE_INCLUDE_PATH
2761 #define TRACE_INCLUDE_PATH .
2762 #define TRACE_INCLUDE_FILE ocfs2_trace
2763 #include <trace/define_trace.h>