aboutsummaryrefslogtreecommitdiffstats
path: root/include/trace/events
diff options
context:
space:
mode:
Diffstat (limited to 'include/trace/events')
-rw-r--r--include/trace/events/ext4.h775
-rw-r--r--include/trace/events/jbd2.h78
2 files changed, 609 insertions, 244 deletions
diff --git a/include/trace/events/ext4.h b/include/trace/events/ext4.h
index e5e345fb2a5c..e09592d2f916 100644
--- a/include/trace/events/ext4.h
+++ b/include/trace/events/ext4.h
@@ -21,8 +21,7 @@ TRACE_EVENT(ext4_free_inode,
21 TP_ARGS(inode), 21 TP_ARGS(inode),
22 22
23 TP_STRUCT__entry( 23 TP_STRUCT__entry(
24 __field( int, dev_major ) 24 __field( dev_t, dev )
25 __field( int, dev_minor )
26 __field( ino_t, ino ) 25 __field( ino_t, ino )
27 __field( umode_t, mode ) 26 __field( umode_t, mode )
28 __field( uid_t, uid ) 27 __field( uid_t, uid )
@@ -31,8 +30,7 @@ TRACE_EVENT(ext4_free_inode,
31 ), 30 ),
32 31
33 TP_fast_assign( 32 TP_fast_assign(
34 __entry->dev_major = MAJOR(inode->i_sb->s_dev); 33 __entry->dev = inode->i_sb->s_dev;
35 __entry->dev_minor = MINOR(inode->i_sb->s_dev);
36 __entry->ino = inode->i_ino; 34 __entry->ino = inode->i_ino;
37 __entry->mode = inode->i_mode; 35 __entry->mode = inode->i_mode;
38 __entry->uid = inode->i_uid; 36 __entry->uid = inode->i_uid;
@@ -41,9 +39,9 @@ TRACE_EVENT(ext4_free_inode,
41 ), 39 ),
42 40
43 TP_printk("dev %d,%d ino %lu mode 0%o uid %u gid %u blocks %llu", 41 TP_printk("dev %d,%d ino %lu mode 0%o uid %u gid %u blocks %llu",
44 __entry->dev_major, __entry->dev_minor, 42 MAJOR(__entry->dev), MINOR(__entry->dev),
45 (unsigned long) __entry->ino, __entry->mode, 43 (unsigned long) __entry->ino,
46 __entry->uid, __entry->gid, 44 __entry->mode, __entry->uid, __entry->gid,
47 (unsigned long long) __entry->blocks) 45 (unsigned long long) __entry->blocks)
48); 46);
49 47
@@ -53,21 +51,19 @@ TRACE_EVENT(ext4_request_inode,
53 TP_ARGS(dir, mode), 51 TP_ARGS(dir, mode),
54 52
55 TP_STRUCT__entry( 53 TP_STRUCT__entry(
56 __field( int, dev_major ) 54 __field( dev_t, dev )
57 __field( int, dev_minor )
58 __field( ino_t, dir ) 55 __field( ino_t, dir )
59 __field( umode_t, mode ) 56 __field( umode_t, mode )
60 ), 57 ),
61 58
62 TP_fast_assign( 59 TP_fast_assign(
63 __entry->dev_major = MAJOR(dir->i_sb->s_dev); 60 __entry->dev = dir->i_sb->s_dev;
64 __entry->dev_minor = MINOR(dir->i_sb->s_dev);
65 __entry->dir = dir->i_ino; 61 __entry->dir = dir->i_ino;
66 __entry->mode = mode; 62 __entry->mode = mode;
67 ), 63 ),
68 64
69 TP_printk("dev %d,%d dir %lu mode 0%o", 65 TP_printk("dev %d,%d dir %lu mode 0%o",
70 __entry->dev_major, __entry->dev_minor, 66 MAJOR(__entry->dev), MINOR(__entry->dev),
71 (unsigned long) __entry->dir, __entry->mode) 67 (unsigned long) __entry->dir, __entry->mode)
72); 68);
73 69
@@ -77,23 +73,21 @@ TRACE_EVENT(ext4_allocate_inode,
77 TP_ARGS(inode, dir, mode), 73 TP_ARGS(inode, dir, mode),
78 74
79 TP_STRUCT__entry( 75 TP_STRUCT__entry(
80 __field( int, dev_major ) 76 __field( dev_t, dev )
81 __field( int, dev_minor )
82 __field( ino_t, ino ) 77 __field( ino_t, ino )
83 __field( ino_t, dir ) 78 __field( ino_t, dir )
84 __field( umode_t, mode ) 79 __field( umode_t, mode )
85 ), 80 ),
86 81
87 TP_fast_assign( 82 TP_fast_assign(
88 __entry->dev_major = MAJOR(inode->i_sb->s_dev); 83 __entry->dev = inode->i_sb->s_dev;
89 __entry->dev_minor = MINOR(inode->i_sb->s_dev);
90 __entry->ino = inode->i_ino; 84 __entry->ino = inode->i_ino;
91 __entry->dir = dir->i_ino; 85 __entry->dir = dir->i_ino;
92 __entry->mode = mode; 86 __entry->mode = mode;
93 ), 87 ),
94 88
95 TP_printk("dev %d,%d ino %lu dir %lu mode 0%o", 89 TP_printk("dev %d,%d ino %lu dir %lu mode 0%o",
96 __entry->dev_major, __entry->dev_minor, 90 MAJOR(__entry->dev), MINOR(__entry->dev),
97 (unsigned long) __entry->ino, 91 (unsigned long) __entry->ino,
98 (unsigned long) __entry->dir, __entry->mode) 92 (unsigned long) __entry->dir, __entry->mode)
99); 93);
@@ -104,21 +98,19 @@ TRACE_EVENT(ext4_evict_inode,
104 TP_ARGS(inode), 98 TP_ARGS(inode),
105 99
106 TP_STRUCT__entry( 100 TP_STRUCT__entry(
107 __field( int, dev_major ) 101 __field( dev_t, dev )
108 __field( int, dev_minor )
109 __field( ino_t, ino ) 102 __field( ino_t, ino )
110 __field( int, nlink ) 103 __field( int, nlink )
111 ), 104 ),
112 105
113 TP_fast_assign( 106 TP_fast_assign(
114 __entry->dev_major = MAJOR(inode->i_sb->s_dev); 107 __entry->dev = inode->i_sb->s_dev;
115 __entry->dev_minor = MINOR(inode->i_sb->s_dev);
116 __entry->ino = inode->i_ino; 108 __entry->ino = inode->i_ino;
117 __entry->nlink = inode->i_nlink; 109 __entry->nlink = inode->i_nlink;
118 ), 110 ),
119 111
120 TP_printk("dev %d,%d ino %lu nlink %d", 112 TP_printk("dev %d,%d ino %lu nlink %d",
121 __entry->dev_major, __entry->dev_minor, 113 MAJOR(__entry->dev), MINOR(__entry->dev),
122 (unsigned long) __entry->ino, __entry->nlink) 114 (unsigned long) __entry->ino, __entry->nlink)
123); 115);
124 116
@@ -128,21 +120,19 @@ TRACE_EVENT(ext4_drop_inode,
128 TP_ARGS(inode, drop), 120 TP_ARGS(inode, drop),
129 121
130 TP_STRUCT__entry( 122 TP_STRUCT__entry(
131 __field( int, dev_major ) 123 __field( dev_t, dev )
132 __field( int, dev_minor )
133 __field( ino_t, ino ) 124 __field( ino_t, ino )
134 __field( int, drop ) 125 __field( int, drop )
135 ), 126 ),
136 127
137 TP_fast_assign( 128 TP_fast_assign(
138 __entry->dev_major = MAJOR(inode->i_sb->s_dev); 129 __entry->dev = inode->i_sb->s_dev;
139 __entry->dev_minor = MINOR(inode->i_sb->s_dev);
140 __entry->ino = inode->i_ino; 130 __entry->ino = inode->i_ino;
141 __entry->drop = drop; 131 __entry->drop = drop;
142 ), 132 ),
143 133
144 TP_printk("dev %d,%d ino %lu drop %d", 134 TP_printk("dev %d,%d ino %lu drop %d",
145 __entry->dev_major, __entry->dev_minor, 135 MAJOR(__entry->dev), MINOR(__entry->dev),
146 (unsigned long) __entry->ino, __entry->drop) 136 (unsigned long) __entry->ino, __entry->drop)
147); 137);
148 138
@@ -152,21 +142,19 @@ TRACE_EVENT(ext4_mark_inode_dirty,
152 TP_ARGS(inode, IP), 142 TP_ARGS(inode, IP),
153 143
154 TP_STRUCT__entry( 144 TP_STRUCT__entry(
155 __field( int, dev_major ) 145 __field( dev_t, dev )
156 __field( int, dev_minor )
157 __field( ino_t, ino ) 146 __field( ino_t, ino )
158 __field(unsigned long, ip ) 147 __field(unsigned long, ip )
159 ), 148 ),
160 149
161 TP_fast_assign( 150 TP_fast_assign(
162 __entry->dev_major = MAJOR(inode->i_sb->s_dev); 151 __entry->dev = inode->i_sb->s_dev;
163 __entry->dev_minor = MINOR(inode->i_sb->s_dev);
164 __entry->ino = inode->i_ino; 152 __entry->ino = inode->i_ino;
165 __entry->ip = IP; 153 __entry->ip = IP;
166 ), 154 ),
167 155
168 TP_printk("dev %d,%d ino %lu caller %pF", 156 TP_printk("dev %d,%d ino %lu caller %pF",
169 __entry->dev_major, __entry->dev_minor, 157 MAJOR(__entry->dev), MINOR(__entry->dev),
170 (unsigned long) __entry->ino, (void *)__entry->ip) 158 (unsigned long) __entry->ino, (void *)__entry->ip)
171); 159);
172 160
@@ -176,21 +164,19 @@ TRACE_EVENT(ext4_begin_ordered_truncate,
176 TP_ARGS(inode, new_size), 164 TP_ARGS(inode, new_size),
177 165
178 TP_STRUCT__entry( 166 TP_STRUCT__entry(
179 __field( int, dev_major ) 167 __field( dev_t, dev )
180 __field( int, dev_minor )
181 __field( ino_t, ino ) 168 __field( ino_t, ino )
182 __field( loff_t, new_size ) 169 __field( loff_t, new_size )
183 ), 170 ),
184 171
185 TP_fast_assign( 172 TP_fast_assign(
186 __entry->dev_major = MAJOR(inode->i_sb->s_dev); 173 __entry->dev = inode->i_sb->s_dev;
187 __entry->dev_minor = MINOR(inode->i_sb->s_dev);
188 __entry->ino = inode->i_ino; 174 __entry->ino = inode->i_ino;
189 __entry->new_size = new_size; 175 __entry->new_size = new_size;
190 ), 176 ),
191 177
192 TP_printk("dev %d,%d ino %lu new_size %lld", 178 TP_printk("dev %d,%d ino %lu new_size %lld",
193 __entry->dev_major, __entry->dev_minor, 179 MAJOR(__entry->dev), MINOR(__entry->dev),
194 (unsigned long) __entry->ino, 180 (unsigned long) __entry->ino,
195 (long long) __entry->new_size) 181 (long long) __entry->new_size)
196); 182);
@@ -203,8 +189,7 @@ DECLARE_EVENT_CLASS(ext4__write_begin,
203 TP_ARGS(inode, pos, len, flags), 189 TP_ARGS(inode, pos, len, flags),
204 190
205 TP_STRUCT__entry( 191 TP_STRUCT__entry(
206 __field( int, dev_major ) 192 __field( dev_t, dev )
207 __field( int, dev_minor )
208 __field( ino_t, ino ) 193 __field( ino_t, ino )
209 __field( loff_t, pos ) 194 __field( loff_t, pos )
210 __field( unsigned int, len ) 195 __field( unsigned int, len )
@@ -212,8 +197,7 @@ DECLARE_EVENT_CLASS(ext4__write_begin,
212 ), 197 ),
213 198
214 TP_fast_assign( 199 TP_fast_assign(
215 __entry->dev_major = MAJOR(inode->i_sb->s_dev); 200 __entry->dev = inode->i_sb->s_dev;
216 __entry->dev_minor = MINOR(inode->i_sb->s_dev);
217 __entry->ino = inode->i_ino; 201 __entry->ino = inode->i_ino;
218 __entry->pos = pos; 202 __entry->pos = pos;
219 __entry->len = len; 203 __entry->len = len;
@@ -221,7 +205,7 @@ DECLARE_EVENT_CLASS(ext4__write_begin,
221 ), 205 ),
222 206
223 TP_printk("dev %d,%d ino %lu pos %llu len %u flags %u", 207 TP_printk("dev %d,%d ino %lu pos %llu len %u flags %u",
224 __entry->dev_major, __entry->dev_minor, 208 MAJOR(__entry->dev), MINOR(__entry->dev),
225 (unsigned long) __entry->ino, 209 (unsigned long) __entry->ino,
226 __entry->pos, __entry->len, __entry->flags) 210 __entry->pos, __entry->len, __entry->flags)
227); 211);
@@ -249,8 +233,7 @@ DECLARE_EVENT_CLASS(ext4__write_end,
249 TP_ARGS(inode, pos, len, copied), 233 TP_ARGS(inode, pos, len, copied),
250 234
251 TP_STRUCT__entry( 235 TP_STRUCT__entry(
252 __field( int, dev_major ) 236 __field( dev_t, dev )
253 __field( int, dev_minor )
254 __field( ino_t, ino ) 237 __field( ino_t, ino )
255 __field( loff_t, pos ) 238 __field( loff_t, pos )
256 __field( unsigned int, len ) 239 __field( unsigned int, len )
@@ -258,8 +241,7 @@ DECLARE_EVENT_CLASS(ext4__write_end,
258 ), 241 ),
259 242
260 TP_fast_assign( 243 TP_fast_assign(
261 __entry->dev_major = MAJOR(inode->i_sb->s_dev); 244 __entry->dev = inode->i_sb->s_dev;
262 __entry->dev_minor = MINOR(inode->i_sb->s_dev);
263 __entry->ino = inode->i_ino; 245 __entry->ino = inode->i_ino;
264 __entry->pos = pos; 246 __entry->pos = pos;
265 __entry->len = len; 247 __entry->len = len;
@@ -267,9 +249,9 @@ DECLARE_EVENT_CLASS(ext4__write_end,
267 ), 249 ),
268 250
269 TP_printk("dev %d,%d ino %lu pos %llu len %u copied %u", 251 TP_printk("dev %d,%d ino %lu pos %llu len %u copied %u",
270 __entry->dev_major, __entry->dev_minor, 252 MAJOR(__entry->dev), MINOR(__entry->dev),
271 (unsigned long) __entry->ino, __entry->pos, 253 (unsigned long) __entry->ino,
272 __entry->len, __entry->copied) 254 __entry->pos, __entry->len, __entry->copied)
273); 255);
274 256
275DEFINE_EVENT(ext4__write_end, ext4_ordered_write_end, 257DEFINE_EVENT(ext4__write_end, ext4_ordered_write_end,
@@ -310,22 +292,20 @@ TRACE_EVENT(ext4_writepage,
310 TP_ARGS(inode, page), 292 TP_ARGS(inode, page),
311 293
312 TP_STRUCT__entry( 294 TP_STRUCT__entry(
313 __field( int, dev_major ) 295 __field( dev_t, dev )
314 __field( int, dev_minor )
315 __field( ino_t, ino ) 296 __field( ino_t, ino )
316 __field( pgoff_t, index ) 297 __field( pgoff_t, index )
317 298
318 ), 299 ),
319 300
320 TP_fast_assign( 301 TP_fast_assign(
321 __entry->dev_major = MAJOR(inode->i_sb->s_dev); 302 __entry->dev = inode->i_sb->s_dev;
322 __entry->dev_minor = MINOR(inode->i_sb->s_dev);
323 __entry->ino = inode->i_ino; 303 __entry->ino = inode->i_ino;
324 __entry->index = page->index; 304 __entry->index = page->index;
325 ), 305 ),
326 306
327 TP_printk("dev %d,%d ino %lu page_index %lu", 307 TP_printk("dev %d,%d ino %lu page_index %lu",
328 __entry->dev_major, __entry->dev_minor, 308 MAJOR(__entry->dev), MINOR(__entry->dev),
329 (unsigned long) __entry->ino, __entry->index) 309 (unsigned long) __entry->ino, __entry->index)
330); 310);
331 311
@@ -335,43 +315,39 @@ TRACE_EVENT(ext4_da_writepages,
335 TP_ARGS(inode, wbc), 315 TP_ARGS(inode, wbc),
336 316
337 TP_STRUCT__entry( 317 TP_STRUCT__entry(
338 __field( int, dev_major ) 318 __field( dev_t, dev )
339 __field( int, dev_minor )
340 __field( ino_t, ino ) 319 __field( ino_t, ino )
341 __field( long, nr_to_write ) 320 __field( long, nr_to_write )
342 __field( long, pages_skipped ) 321 __field( long, pages_skipped )
343 __field( loff_t, range_start ) 322 __field( loff_t, range_start )
344 __field( loff_t, range_end ) 323 __field( loff_t, range_end )
324 __field( int, sync_mode )
345 __field( char, for_kupdate ) 325 __field( char, for_kupdate )
346 __field( char, for_reclaim )
347 __field( char, range_cyclic ) 326 __field( char, range_cyclic )
348 __field( pgoff_t, writeback_index ) 327 __field( pgoff_t, writeback_index )
349 ), 328 ),
350 329
351 TP_fast_assign( 330 TP_fast_assign(
352 __entry->dev_major = MAJOR(inode->i_sb->s_dev); 331 __entry->dev = inode->i_sb->s_dev;
353 __entry->dev_minor = MINOR(inode->i_sb->s_dev);
354 __entry->ino = inode->i_ino; 332 __entry->ino = inode->i_ino;
355 __entry->nr_to_write = wbc->nr_to_write; 333 __entry->nr_to_write = wbc->nr_to_write;
356 __entry->pages_skipped = wbc->pages_skipped; 334 __entry->pages_skipped = wbc->pages_skipped;
357 __entry->range_start = wbc->range_start; 335 __entry->range_start = wbc->range_start;
358 __entry->range_end = wbc->range_end; 336 __entry->range_end = wbc->range_end;
337 __entry->sync_mode = wbc->sync_mode;
359 __entry->for_kupdate = wbc->for_kupdate; 338 __entry->for_kupdate = wbc->for_kupdate;
360 __entry->for_reclaim = wbc->for_reclaim;
361 __entry->range_cyclic = wbc->range_cyclic; 339 __entry->range_cyclic = wbc->range_cyclic;
362 __entry->writeback_index = inode->i_mapping->writeback_index; 340 __entry->writeback_index = inode->i_mapping->writeback_index;
363 ), 341 ),
364 342
365 TP_printk("dev %d,%d ino %lu nr_to_write %ld pages_skipped %ld " 343 TP_printk("dev %d,%d ino %lu nr_to_write %ld pages_skipped %ld "
366 "range_start %llu range_end %llu " 344 "range_start %llu range_end %llu sync_mode %d"
367 "for_kupdate %d for_reclaim %d " 345 "for_kupdate %d range_cyclic %d writeback_index %lu",
368 "range_cyclic %d writeback_index %lu", 346 MAJOR(__entry->dev), MINOR(__entry->dev),
369 __entry->dev_major, __entry->dev_minor,
370 (unsigned long) __entry->ino, __entry->nr_to_write, 347 (unsigned long) __entry->ino, __entry->nr_to_write,
371 __entry->pages_skipped, __entry->range_start, 348 __entry->pages_skipped, __entry->range_start,
372 __entry->range_end, 349 __entry->range_end, __entry->sync_mode,
373 __entry->for_kupdate, __entry->for_reclaim, 350 __entry->for_kupdate, __entry->range_cyclic,
374 __entry->range_cyclic,
375 (unsigned long) __entry->writeback_index) 351 (unsigned long) __entry->writeback_index)
376); 352);
377 353
@@ -381,8 +357,7 @@ TRACE_EVENT(ext4_da_write_pages,
381 TP_ARGS(inode, mpd), 357 TP_ARGS(inode, mpd),
382 358
383 TP_STRUCT__entry( 359 TP_STRUCT__entry(
384 __field( int, dev_major ) 360 __field( dev_t, dev )
385 __field( int, dev_minor )
386 __field( ino_t, ino ) 361 __field( ino_t, ino )
387 __field( __u64, b_blocknr ) 362 __field( __u64, b_blocknr )
388 __field( __u32, b_size ) 363 __field( __u32, b_size )
@@ -390,11 +365,11 @@ TRACE_EVENT(ext4_da_write_pages,
390 __field( unsigned long, first_page ) 365 __field( unsigned long, first_page )
391 __field( int, io_done ) 366 __field( int, io_done )
392 __field( int, pages_written ) 367 __field( int, pages_written )
368 __field( int, sync_mode )
393 ), 369 ),
394 370
395 TP_fast_assign( 371 TP_fast_assign(
396 __entry->dev_major = MAJOR(inode->i_sb->s_dev); 372 __entry->dev = inode->i_sb->s_dev;
397 __entry->dev_minor = MINOR(inode->i_sb->s_dev);
398 __entry->ino = inode->i_ino; 373 __entry->ino = inode->i_ino;
399 __entry->b_blocknr = mpd->b_blocknr; 374 __entry->b_blocknr = mpd->b_blocknr;
400 __entry->b_size = mpd->b_size; 375 __entry->b_size = mpd->b_size;
@@ -402,14 +377,18 @@ TRACE_EVENT(ext4_da_write_pages,
402 __entry->first_page = mpd->first_page; 377 __entry->first_page = mpd->first_page;
403 __entry->io_done = mpd->io_done; 378 __entry->io_done = mpd->io_done;
404 __entry->pages_written = mpd->pages_written; 379 __entry->pages_written = mpd->pages_written;
380 __entry->sync_mode = mpd->wbc->sync_mode;
405 ), 381 ),
406 382
407 TP_printk("dev %d,%d ino %lu b_blocknr %llu b_size %u b_state 0x%04x first_page %lu io_done %d pages_written %d", 383 TP_printk("dev %d,%d ino %lu b_blocknr %llu b_size %u b_state 0x%04x "
408 __entry->dev_major, __entry->dev_minor, 384 "first_page %lu io_done %d pages_written %d sync_mode %d",
385 MAJOR(__entry->dev), MINOR(__entry->dev),
409 (unsigned long) __entry->ino, 386 (unsigned long) __entry->ino,
410 __entry->b_blocknr, __entry->b_size, 387 __entry->b_blocknr, __entry->b_size,
411 __entry->b_state, __entry->first_page, 388 __entry->b_state, __entry->first_page,
412 __entry->io_done, __entry->pages_written) 389 __entry->io_done, __entry->pages_written,
390 __entry->sync_mode
391 )
413); 392);
414 393
415TRACE_EVENT(ext4_da_writepages_result, 394TRACE_EVENT(ext4_da_writepages_result,
@@ -419,35 +398,100 @@ TRACE_EVENT(ext4_da_writepages_result,
419 TP_ARGS(inode, wbc, ret, pages_written), 398 TP_ARGS(inode, wbc, ret, pages_written),
420 399
421 TP_STRUCT__entry( 400 TP_STRUCT__entry(
422 __field( int, dev_major ) 401 __field( dev_t, dev )
423 __field( int, dev_minor )
424 __field( ino_t, ino ) 402 __field( ino_t, ino )
425 __field( int, ret ) 403 __field( int, ret )
426 __field( int, pages_written ) 404 __field( int, pages_written )
427 __field( long, pages_skipped ) 405 __field( long, pages_skipped )
406 __field( int, sync_mode )
428 __field( char, more_io ) 407 __field( char, more_io )
429 __field( pgoff_t, writeback_index ) 408 __field( pgoff_t, writeback_index )
430 ), 409 ),
431 410
432 TP_fast_assign( 411 TP_fast_assign(
433 __entry->dev_major = MAJOR(inode->i_sb->s_dev); 412 __entry->dev = inode->i_sb->s_dev;
434 __entry->dev_minor = MINOR(inode->i_sb->s_dev);
435 __entry->ino = inode->i_ino; 413 __entry->ino = inode->i_ino;
436 __entry->ret = ret; 414 __entry->ret = ret;
437 __entry->pages_written = pages_written; 415 __entry->pages_written = pages_written;
438 __entry->pages_skipped = wbc->pages_skipped; 416 __entry->pages_skipped = wbc->pages_skipped;
417 __entry->sync_mode = wbc->sync_mode;
439 __entry->more_io = wbc->more_io; 418 __entry->more_io = wbc->more_io;
440 __entry->writeback_index = inode->i_mapping->writeback_index; 419 __entry->writeback_index = inode->i_mapping->writeback_index;
441 ), 420 ),
442 421
443 TP_printk("dev %d,%d ino %lu ret %d pages_written %d pages_skipped %ld more_io %d writeback_index %lu", 422 TP_printk("dev %d,%d ino %lu ret %d pages_written %d pages_skipped %ld "
444 __entry->dev_major, __entry->dev_minor, 423 " more_io %d sync_mode %d writeback_index %lu",
424 MAJOR(__entry->dev), MINOR(__entry->dev),
445 (unsigned long) __entry->ino, __entry->ret, 425 (unsigned long) __entry->ino, __entry->ret,
446 __entry->pages_written, __entry->pages_skipped, 426 __entry->pages_written, __entry->pages_skipped,
447 __entry->more_io, 427 __entry->more_io, __entry->sync_mode,
448 (unsigned long) __entry->writeback_index) 428 (unsigned long) __entry->writeback_index)
449); 429);
450 430
431DECLARE_EVENT_CLASS(ext4__page_op,
432 TP_PROTO(struct page *page),
433
434 TP_ARGS(page),
435
436 TP_STRUCT__entry(
437 __field( pgoff_t, index )
438 __field( ino_t, ino )
439 __field( dev_t, dev )
440
441 ),
442
443 TP_fast_assign(
444 __entry->index = page->index;
445 __entry->ino = page->mapping->host->i_ino;
446 __entry->dev = page->mapping->host->i_sb->s_dev;
447 ),
448
449 TP_printk("dev %d,%d ino %lu page_index %lu",
450 MAJOR(__entry->dev), MINOR(__entry->dev),
451 (unsigned long) __entry->ino,
452 __entry->index)
453);
454
455DEFINE_EVENT(ext4__page_op, ext4_readpage,
456
457 TP_PROTO(struct page *page),
458
459 TP_ARGS(page)
460);
461
462DEFINE_EVENT(ext4__page_op, ext4_releasepage,
463
464 TP_PROTO(struct page *page),
465
466 TP_ARGS(page)
467);
468
469TRACE_EVENT(ext4_invalidatepage,
470 TP_PROTO(struct page *page, unsigned long offset),
471
472 TP_ARGS(page, offset),
473
474 TP_STRUCT__entry(
475 __field( pgoff_t, index )
476 __field( unsigned long, offset )
477 __field( ino_t, ino )
478 __field( dev_t, dev )
479
480 ),
481
482 TP_fast_assign(
483 __entry->index = page->index;
484 __entry->offset = offset;
485 __entry->ino = page->mapping->host->i_ino;
486 __entry->dev = page->mapping->host->i_sb->s_dev;
487 ),
488
489 TP_printk("dev %d,%d ino %lu page_index %lu offset %lu",
490 MAJOR(__entry->dev), MINOR(__entry->dev),
491 (unsigned long) __entry->ino,
492 __entry->index, __entry->offset)
493);
494
451TRACE_EVENT(ext4_discard_blocks, 495TRACE_EVENT(ext4_discard_blocks,
452 TP_PROTO(struct super_block *sb, unsigned long long blk, 496 TP_PROTO(struct super_block *sb, unsigned long long blk,
453 unsigned long long count), 497 unsigned long long count),
@@ -455,22 +499,20 @@ TRACE_EVENT(ext4_discard_blocks,
455 TP_ARGS(sb, blk, count), 499 TP_ARGS(sb, blk, count),
456 500
457 TP_STRUCT__entry( 501 TP_STRUCT__entry(
458 __field( int, dev_major ) 502 __field( dev_t, dev )
459 __field( int, dev_minor )
460 __field( __u64, blk ) 503 __field( __u64, blk )
461 __field( __u64, count ) 504 __field( __u64, count )
462 505
463 ), 506 ),
464 507
465 TP_fast_assign( 508 TP_fast_assign(
466 __entry->dev_major = MAJOR(sb->s_dev); 509 __entry->dev = sb->s_dev;
467 __entry->dev_minor = MINOR(sb->s_dev);
468 __entry->blk = blk; 510 __entry->blk = blk;
469 __entry->count = count; 511 __entry->count = count;
470 ), 512 ),
471 513
472 TP_printk("dev %d,%d blk %llu count %llu", 514 TP_printk("dev %d,%d blk %llu count %llu",
473 __entry->dev_major, __entry->dev_minor, 515 MAJOR(__entry->dev), MINOR(__entry->dev),
474 __entry->blk, __entry->count) 516 __entry->blk, __entry->count)
475); 517);
476 518
@@ -481,8 +523,7 @@ DECLARE_EVENT_CLASS(ext4__mb_new_pa,
481 TP_ARGS(ac, pa), 523 TP_ARGS(ac, pa),
482 524
483 TP_STRUCT__entry( 525 TP_STRUCT__entry(
484 __field( int, dev_major ) 526 __field( dev_t, dev )
485 __field( int, dev_minor )
486 __field( ino_t, ino ) 527 __field( ino_t, ino )
487 __field( __u64, pa_pstart ) 528 __field( __u64, pa_pstart )
488 __field( __u32, pa_len ) 529 __field( __u32, pa_len )
@@ -491,8 +532,7 @@ DECLARE_EVENT_CLASS(ext4__mb_new_pa,
491 ), 532 ),
492 533
493 TP_fast_assign( 534 TP_fast_assign(
494 __entry->dev_major = MAJOR(ac->ac_sb->s_dev); 535 __entry->dev = ac->ac_sb->s_dev;
495 __entry->dev_minor = MINOR(ac->ac_sb->s_dev);
496 __entry->ino = ac->ac_inode->i_ino; 536 __entry->ino = ac->ac_inode->i_ino;
497 __entry->pa_pstart = pa->pa_pstart; 537 __entry->pa_pstart = pa->pa_pstart;
498 __entry->pa_len = pa->pa_len; 538 __entry->pa_len = pa->pa_len;
@@ -500,9 +540,9 @@ DECLARE_EVENT_CLASS(ext4__mb_new_pa,
500 ), 540 ),
501 541
502 TP_printk("dev %d,%d ino %lu pstart %llu len %u lstart %llu", 542 TP_printk("dev %d,%d ino %lu pstart %llu len %u lstart %llu",
503 __entry->dev_major, __entry->dev_minor, 543 MAJOR(__entry->dev), MINOR(__entry->dev),
504 (unsigned long) __entry->ino, __entry->pa_pstart, 544 (unsigned long) __entry->ino,
505 __entry->pa_len, __entry->pa_lstart) 545 __entry->pa_pstart, __entry->pa_len, __entry->pa_lstart)
506); 546);
507 547
508DEFINE_EVENT(ext4__mb_new_pa, ext4_mb_new_inode_pa, 548DEFINE_EVENT(ext4__mb_new_pa, ext4_mb_new_inode_pa,
@@ -530,8 +570,7 @@ TRACE_EVENT(ext4_mb_release_inode_pa,
530 TP_ARGS(sb, inode, pa, block, count), 570 TP_ARGS(sb, inode, pa, block, count),
531 571
532 TP_STRUCT__entry( 572 TP_STRUCT__entry(
533 __field( int, dev_major ) 573 __field( dev_t, dev )
534 __field( int, dev_minor )
535 __field( ino_t, ino ) 574 __field( ino_t, ino )
536 __field( __u64, block ) 575 __field( __u64, block )
537 __field( __u32, count ) 576 __field( __u32, count )
@@ -539,16 +578,16 @@ TRACE_EVENT(ext4_mb_release_inode_pa,
539 ), 578 ),
540 579
541 TP_fast_assign( 580 TP_fast_assign(
542 __entry->dev_major = MAJOR(sb->s_dev); 581 __entry->dev = sb->s_dev;
543 __entry->dev_minor = MINOR(sb->s_dev);
544 __entry->ino = inode->i_ino; 582 __entry->ino = inode->i_ino;
545 __entry->block = block; 583 __entry->block = block;
546 __entry->count = count; 584 __entry->count = count;
547 ), 585 ),
548 586
549 TP_printk("dev %d,%d ino %lu block %llu count %u", 587 TP_printk("dev %d,%d ino %lu block %llu count %u",
550 __entry->dev_major, __entry->dev_minor, 588 MAJOR(__entry->dev), MINOR(__entry->dev),
551 (unsigned long) __entry->ino, __entry->block, __entry->count) 589 (unsigned long) __entry->ino,
590 __entry->block, __entry->count)
552); 591);
553 592
554TRACE_EVENT(ext4_mb_release_group_pa, 593TRACE_EVENT(ext4_mb_release_group_pa,
@@ -558,22 +597,20 @@ TRACE_EVENT(ext4_mb_release_group_pa,
558 TP_ARGS(sb, pa), 597 TP_ARGS(sb, pa),
559 598
560 TP_STRUCT__entry( 599 TP_STRUCT__entry(
561 __field( int, dev_major ) 600 __field( dev_t, dev )
562 __field( int, dev_minor )
563 __field( __u64, pa_pstart ) 601 __field( __u64, pa_pstart )
564 __field( __u32, pa_len ) 602 __field( __u32, pa_len )
565 603
566 ), 604 ),
567 605
568 TP_fast_assign( 606 TP_fast_assign(
569 __entry->dev_major = MAJOR(sb->s_dev); 607 __entry->dev = sb->s_dev;
570 __entry->dev_minor = MINOR(sb->s_dev);
571 __entry->pa_pstart = pa->pa_pstart; 608 __entry->pa_pstart = pa->pa_pstart;
572 __entry->pa_len = pa->pa_len; 609 __entry->pa_len = pa->pa_len;
573 ), 610 ),
574 611
575 TP_printk("dev %d,%d pstart %llu len %u", 612 TP_printk("dev %d,%d pstart %llu len %u",
576 __entry->dev_major, __entry->dev_minor, 613 MAJOR(__entry->dev), MINOR(__entry->dev),
577 __entry->pa_pstart, __entry->pa_len) 614 __entry->pa_pstart, __entry->pa_len)
578); 615);
579 616
@@ -583,20 +620,18 @@ TRACE_EVENT(ext4_discard_preallocations,
583 TP_ARGS(inode), 620 TP_ARGS(inode),
584 621
585 TP_STRUCT__entry( 622 TP_STRUCT__entry(
586 __field( int, dev_major ) 623 __field( dev_t, dev )
587 __field( int, dev_minor )
588 __field( ino_t, ino ) 624 __field( ino_t, ino )
589 625
590 ), 626 ),
591 627
592 TP_fast_assign( 628 TP_fast_assign(
593 __entry->dev_major = MAJOR(inode->i_sb->s_dev); 629 __entry->dev = inode->i_sb->s_dev;
594 __entry->dev_minor = MINOR(inode->i_sb->s_dev);
595 __entry->ino = inode->i_ino; 630 __entry->ino = inode->i_ino;
596 ), 631 ),
597 632
598 TP_printk("dev %d,%d ino %lu", 633 TP_printk("dev %d,%d ino %lu",
599 __entry->dev_major, __entry->dev_minor, 634 MAJOR(__entry->dev), MINOR(__entry->dev),
600 (unsigned long) __entry->ino) 635 (unsigned long) __entry->ino)
601); 636);
602 637
@@ -606,20 +641,19 @@ TRACE_EVENT(ext4_mb_discard_preallocations,
606 TP_ARGS(sb, needed), 641 TP_ARGS(sb, needed),
607 642
608 TP_STRUCT__entry( 643 TP_STRUCT__entry(
609 __field( int, dev_major ) 644 __field( dev_t, dev )
610 __field( int, dev_minor )
611 __field( int, needed ) 645 __field( int, needed )
612 646
613 ), 647 ),
614 648
615 TP_fast_assign( 649 TP_fast_assign(
616 __entry->dev_major = MAJOR(sb->s_dev); 650 __entry->dev = sb->s_dev;
617 __entry->dev_minor = MINOR(sb->s_dev);
618 __entry->needed = needed; 651 __entry->needed = needed;
619 ), 652 ),
620 653
621 TP_printk("dev %d,%d needed %d", 654 TP_printk("dev %d,%d needed %d",
622 __entry->dev_major, __entry->dev_minor, __entry->needed) 655 MAJOR(__entry->dev), MINOR(__entry->dev),
656 __entry->needed)
623); 657);
624 658
625TRACE_EVENT(ext4_request_blocks, 659TRACE_EVENT(ext4_request_blocks,
@@ -628,8 +662,7 @@ TRACE_EVENT(ext4_request_blocks,
628 TP_ARGS(ar), 662 TP_ARGS(ar),
629 663
630 TP_STRUCT__entry( 664 TP_STRUCT__entry(
631 __field( int, dev_major ) 665 __field( dev_t, dev )
632 __field( int, dev_minor )
633 __field( ino_t, ino ) 666 __field( ino_t, ino )
634 __field( unsigned int, flags ) 667 __field( unsigned int, flags )
635 __field( unsigned int, len ) 668 __field( unsigned int, len )
@@ -642,8 +675,7 @@ TRACE_EVENT(ext4_request_blocks,
642 ), 675 ),
643 676
644 TP_fast_assign( 677 TP_fast_assign(
645 __entry->dev_major = MAJOR(ar->inode->i_sb->s_dev); 678 __entry->dev = ar->inode->i_sb->s_dev;
646 __entry->dev_minor = MINOR(ar->inode->i_sb->s_dev);
647 __entry->ino = ar->inode->i_ino; 679 __entry->ino = ar->inode->i_ino;
648 __entry->flags = ar->flags; 680 __entry->flags = ar->flags;
649 __entry->len = ar->len; 681 __entry->len = ar->len;
@@ -655,8 +687,9 @@ TRACE_EVENT(ext4_request_blocks,
655 __entry->pright = ar->pright; 687 __entry->pright = ar->pright;
656 ), 688 ),
657 689
658 TP_printk("dev %d,%d ino %lu flags %u len %u lblk %llu goal %llu lleft %llu lright %llu pleft %llu pright %llu ", 690 TP_printk("dev %d,%d ino %lu flags %u len %u lblk %llu goal %llu "
659 __entry->dev_major, __entry->dev_minor, 691 "lleft %llu lright %llu pleft %llu pright %llu ",
692 MAJOR(__entry->dev), MINOR(__entry->dev),
660 (unsigned long) __entry->ino, 693 (unsigned long) __entry->ino,
661 __entry->flags, __entry->len, 694 __entry->flags, __entry->len,
662 (unsigned long long) __entry->logical, 695 (unsigned long long) __entry->logical,
@@ -673,8 +706,7 @@ TRACE_EVENT(ext4_allocate_blocks,
673 TP_ARGS(ar, block), 706 TP_ARGS(ar, block),
674 707
675 TP_STRUCT__entry( 708 TP_STRUCT__entry(
676 __field( int, dev_major ) 709 __field( dev_t, dev )
677 __field( int, dev_minor )
678 __field( ino_t, ino ) 710 __field( ino_t, ino )
679 __field( __u64, block ) 711 __field( __u64, block )
680 __field( unsigned int, flags ) 712 __field( unsigned int, flags )
@@ -688,8 +720,7 @@ TRACE_EVENT(ext4_allocate_blocks,
688 ), 720 ),
689 721
690 TP_fast_assign( 722 TP_fast_assign(
691 __entry->dev_major = MAJOR(ar->inode->i_sb->s_dev); 723 __entry->dev = ar->inode->i_sb->s_dev;
692 __entry->dev_minor = MINOR(ar->inode->i_sb->s_dev);
693 __entry->ino = ar->inode->i_ino; 724 __entry->ino = ar->inode->i_ino;
694 __entry->block = block; 725 __entry->block = block;
695 __entry->flags = ar->flags; 726 __entry->flags = ar->flags;
@@ -702,10 +733,11 @@ TRACE_EVENT(ext4_allocate_blocks,
702 __entry->pright = ar->pright; 733 __entry->pright = ar->pright;
703 ), 734 ),
704 735
705 TP_printk("dev %d,%d ino %lu flags %u len %u block %llu lblk %llu goal %llu lleft %llu lright %llu pleft %llu pright %llu ", 736 TP_printk("dev %d,%d ino %lu flags %u len %u block %llu lblk %llu "
706 __entry->dev_major, __entry->dev_minor, 737 "goal %llu lleft %llu lright %llu pleft %llu pright %llu",
707 (unsigned long) __entry->ino, __entry->flags, 738 MAJOR(__entry->dev), MINOR(__entry->dev),
708 __entry->len, __entry->block, 739 (unsigned long) __entry->ino,
740 __entry->flags, __entry->len, __entry->block,
709 (unsigned long long) __entry->logical, 741 (unsigned long long) __entry->logical,
710 (unsigned long long) __entry->goal, 742 (unsigned long long) __entry->goal,
711 (unsigned long long) __entry->lleft, 743 (unsigned long long) __entry->lleft,
@@ -721,8 +753,7 @@ TRACE_EVENT(ext4_free_blocks,
721 TP_ARGS(inode, block, count, flags), 753 TP_ARGS(inode, block, count, flags),
722 754
723 TP_STRUCT__entry( 755 TP_STRUCT__entry(
724 __field( int, dev_major ) 756 __field( dev_t, dev )
725 __field( int, dev_minor )
726 __field( ino_t, ino ) 757 __field( ino_t, ino )
727 __field( umode_t, mode ) 758 __field( umode_t, mode )
728 __field( __u64, block ) 759 __field( __u64, block )
@@ -731,8 +762,7 @@ TRACE_EVENT(ext4_free_blocks,
731 ), 762 ),
732 763
733 TP_fast_assign( 764 TP_fast_assign(
734 __entry->dev_major = MAJOR(inode->i_sb->s_dev); 765 __entry->dev = inode->i_sb->s_dev;
735 __entry->dev_minor = MINOR(inode->i_sb->s_dev);
736 __entry->ino = inode->i_ino; 766 __entry->ino = inode->i_ino;
737 __entry->mode = inode->i_mode; 767 __entry->mode = inode->i_mode;
738 __entry->block = block; 768 __entry->block = block;
@@ -741,20 +771,19 @@ TRACE_EVENT(ext4_free_blocks,
741 ), 771 ),
742 772
743 TP_printk("dev %d,%d ino %lu mode 0%o block %llu count %lu flags %d", 773 TP_printk("dev %d,%d ino %lu mode 0%o block %llu count %lu flags %d",
744 __entry->dev_major, __entry->dev_minor, 774 MAJOR(__entry->dev), MINOR(__entry->dev),
745 (unsigned long) __entry->ino, 775 (unsigned long) __entry->ino,
746 __entry->mode, __entry->block, __entry->count, 776 __entry->mode, __entry->block, __entry->count,
747 __entry->flags) 777 __entry->flags)
748); 778);
749 779
750TRACE_EVENT(ext4_sync_file, 780TRACE_EVENT(ext4_sync_file_enter,
751 TP_PROTO(struct file *file, int datasync), 781 TP_PROTO(struct file *file, int datasync),
752 782
753 TP_ARGS(file, datasync), 783 TP_ARGS(file, datasync),
754 784
755 TP_STRUCT__entry( 785 TP_STRUCT__entry(
756 __field( int, dev_major ) 786 __field( dev_t, dev )
757 __field( int, dev_minor )
758 __field( ino_t, ino ) 787 __field( ino_t, ino )
759 __field( ino_t, parent ) 788 __field( ino_t, parent )
760 __field( int, datasync ) 789 __field( int, datasync )
@@ -763,39 +792,60 @@ TRACE_EVENT(ext4_sync_file,
763 TP_fast_assign( 792 TP_fast_assign(
764 struct dentry *dentry = file->f_path.dentry; 793 struct dentry *dentry = file->f_path.dentry;
765 794
766 __entry->dev_major = MAJOR(dentry->d_inode->i_sb->s_dev); 795 __entry->dev = dentry->d_inode->i_sb->s_dev;
767 __entry->dev_minor = MINOR(dentry->d_inode->i_sb->s_dev);
768 __entry->ino = dentry->d_inode->i_ino; 796 __entry->ino = dentry->d_inode->i_ino;
769 __entry->datasync = datasync; 797 __entry->datasync = datasync;
770 __entry->parent = dentry->d_parent->d_inode->i_ino; 798 __entry->parent = dentry->d_parent->d_inode->i_ino;
771 ), 799 ),
772 800
773 TP_printk("dev %d,%d ino %ld parent %ld datasync %d ", 801 TP_printk("dev %d,%d ino %ld parent %ld datasync %d ",
774 __entry->dev_major, __entry->dev_minor, 802 MAJOR(__entry->dev), MINOR(__entry->dev),
775 (unsigned long) __entry->ino, 803 (unsigned long) __entry->ino,
776 (unsigned long) __entry->parent, __entry->datasync) 804 (unsigned long) __entry->parent, __entry->datasync)
777); 805);
778 806
807TRACE_EVENT(ext4_sync_file_exit,
808 TP_PROTO(struct inode *inode, int ret),
809
810 TP_ARGS(inode, ret),
811
812 TP_STRUCT__entry(
813 __field( int, ret )
814 __field( ino_t, ino )
815 __field( dev_t, dev )
816 ),
817
818 TP_fast_assign(
819 __entry->ret = ret;
820 __entry->ino = inode->i_ino;
821 __entry->dev = inode->i_sb->s_dev;
822 ),
823
824 TP_printk("dev %d,%d ino %ld ret %d",
825 MAJOR(__entry->dev), MINOR(__entry->dev),
826 (unsigned long) __entry->ino,
827 __entry->ret)
828);
829
779TRACE_EVENT(ext4_sync_fs, 830TRACE_EVENT(ext4_sync_fs,
780 TP_PROTO(struct super_block *sb, int wait), 831 TP_PROTO(struct super_block *sb, int wait),
781 832
782 TP_ARGS(sb, wait), 833 TP_ARGS(sb, wait),
783 834
784 TP_STRUCT__entry( 835 TP_STRUCT__entry(
785 __field( int, dev_major ) 836 __field( dev_t, dev )
786 __field( int, dev_minor )
787 __field( int, wait ) 837 __field( int, wait )
788 838
789 ), 839 ),
790 840
791 TP_fast_assign( 841 TP_fast_assign(
792 __entry->dev_major = MAJOR(sb->s_dev); 842 __entry->dev = sb->s_dev;
793 __entry->dev_minor = MINOR(sb->s_dev);
794 __entry->wait = wait; 843 __entry->wait = wait;
795 ), 844 ),
796 845
797 TP_printk("dev %d,%d wait %d", __entry->dev_major, 846 TP_printk("dev %d,%d wait %d",
798 __entry->dev_minor, __entry->wait) 847 MAJOR(__entry->dev), MINOR(__entry->dev),
848 __entry->wait)
799); 849);
800 850
801TRACE_EVENT(ext4_alloc_da_blocks, 851TRACE_EVENT(ext4_alloc_da_blocks,
@@ -804,23 +854,21 @@ TRACE_EVENT(ext4_alloc_da_blocks,
804 TP_ARGS(inode), 854 TP_ARGS(inode),
805 855
806 TP_STRUCT__entry( 856 TP_STRUCT__entry(
807 __field( int, dev_major ) 857 __field( dev_t, dev )
808 __field( int, dev_minor )
809 __field( ino_t, ino ) 858 __field( ino_t, ino )
810 __field( unsigned int, data_blocks ) 859 __field( unsigned int, data_blocks )
811 __field( unsigned int, meta_blocks ) 860 __field( unsigned int, meta_blocks )
812 ), 861 ),
813 862
814 TP_fast_assign( 863 TP_fast_assign(
815 __entry->dev_major = MAJOR(inode->i_sb->s_dev); 864 __entry->dev = inode->i_sb->s_dev;
816 __entry->dev_minor = MINOR(inode->i_sb->s_dev);
817 __entry->ino = inode->i_ino; 865 __entry->ino = inode->i_ino;
818 __entry->data_blocks = EXT4_I(inode)->i_reserved_data_blocks; 866 __entry->data_blocks = EXT4_I(inode)->i_reserved_data_blocks;
819 __entry->meta_blocks = EXT4_I(inode)->i_reserved_meta_blocks; 867 __entry->meta_blocks = EXT4_I(inode)->i_reserved_meta_blocks;
820 ), 868 ),
821 869
822 TP_printk("dev %d,%d ino %lu data_blocks %u meta_blocks %u", 870 TP_printk("dev %d,%d ino %lu data_blocks %u meta_blocks %u",
823 __entry->dev_major, __entry->dev_minor, 871 MAJOR(__entry->dev), MINOR(__entry->dev),
824 (unsigned long) __entry->ino, 872 (unsigned long) __entry->ino,
825 __entry->data_blocks, __entry->meta_blocks) 873 __entry->data_blocks, __entry->meta_blocks)
826); 874);
@@ -831,8 +879,7 @@ TRACE_EVENT(ext4_mballoc_alloc,
831 TP_ARGS(ac), 879 TP_ARGS(ac),
832 880
833 TP_STRUCT__entry( 881 TP_STRUCT__entry(
834 __field( int, dev_major ) 882 __field( dev_t, dev )
835 __field( int, dev_minor )
836 __field( ino_t, ino ) 883 __field( ino_t, ino )
837 __field( __u16, found ) 884 __field( __u16, found )
838 __field( __u16, groups ) 885 __field( __u16, groups )
@@ -855,8 +902,7 @@ TRACE_EVENT(ext4_mballoc_alloc,
855 ), 902 ),
856 903
857 TP_fast_assign( 904 TP_fast_assign(
858 __entry->dev_major = MAJOR(ac->ac_inode->i_sb->s_dev); 905 __entry->dev = ac->ac_inode->i_sb->s_dev;
859 __entry->dev_minor = MINOR(ac->ac_inode->i_sb->s_dev);
860 __entry->ino = ac->ac_inode->i_ino; 906 __entry->ino = ac->ac_inode->i_ino;
861 __entry->found = ac->ac_found; 907 __entry->found = ac->ac_found;
862 __entry->flags = ac->ac_flags; 908 __entry->flags = ac->ac_flags;
@@ -881,7 +927,7 @@ TRACE_EVENT(ext4_mballoc_alloc,
881 TP_printk("dev %d,%d inode %lu orig %u/%d/%u@%u goal %u/%d/%u@%u " 927 TP_printk("dev %d,%d inode %lu orig %u/%d/%u@%u goal %u/%d/%u@%u "
882 "result %u/%d/%u@%u blks %u grps %u cr %u flags 0x%04x " 928 "result %u/%d/%u@%u blks %u grps %u cr %u flags 0x%04x "
883 "tail %u broken %u", 929 "tail %u broken %u",
884 __entry->dev_major, __entry->dev_minor, 930 MAJOR(__entry->dev), MINOR(__entry->dev),
885 (unsigned long) __entry->ino, 931 (unsigned long) __entry->ino,
886 __entry->orig_group, __entry->orig_start, 932 __entry->orig_group, __entry->orig_start,
887 __entry->orig_len, __entry->orig_logical, 933 __entry->orig_len, __entry->orig_logical,
@@ -900,8 +946,7 @@ TRACE_EVENT(ext4_mballoc_prealloc,
900 TP_ARGS(ac), 946 TP_ARGS(ac),
901 947
902 TP_STRUCT__entry( 948 TP_STRUCT__entry(
903 __field( int, dev_major ) 949 __field( dev_t, dev )
904 __field( int, dev_minor )
905 __field( ino_t, ino ) 950 __field( ino_t, ino )
906 __field( __u32, orig_logical ) 951 __field( __u32, orig_logical )
907 __field( int, orig_start ) 952 __field( int, orig_start )
@@ -914,8 +959,7 @@ TRACE_EVENT(ext4_mballoc_prealloc,
914 ), 959 ),
915 960
916 TP_fast_assign( 961 TP_fast_assign(
917 __entry->dev_major = MAJOR(ac->ac_inode->i_sb->s_dev); 962 __entry->dev = ac->ac_inode->i_sb->s_dev;
918 __entry->dev_minor = MINOR(ac->ac_inode->i_sb->s_dev);
919 __entry->ino = ac->ac_inode->i_ino; 963 __entry->ino = ac->ac_inode->i_ino;
920 __entry->orig_logical = ac->ac_o_ex.fe_logical; 964 __entry->orig_logical = ac->ac_o_ex.fe_logical;
921 __entry->orig_start = ac->ac_o_ex.fe_start; 965 __entry->orig_start = ac->ac_o_ex.fe_start;
@@ -928,7 +972,7 @@ TRACE_EVENT(ext4_mballoc_prealloc,
928 ), 972 ),
929 973
930 TP_printk("dev %d,%d inode %lu orig %u/%d/%u@%u result %u/%d/%u@%u", 974 TP_printk("dev %d,%d inode %lu orig %u/%d/%u@%u result %u/%d/%u@%u",
931 __entry->dev_major, __entry->dev_minor, 975 MAJOR(__entry->dev), MINOR(__entry->dev),
932 (unsigned long) __entry->ino, 976 (unsigned long) __entry->ino,
933 __entry->orig_group, __entry->orig_start, 977 __entry->orig_group, __entry->orig_start,
934 __entry->orig_len, __entry->orig_logical, 978 __entry->orig_len, __entry->orig_logical,
@@ -946,8 +990,7 @@ DECLARE_EVENT_CLASS(ext4__mballoc,
946 TP_ARGS(sb, inode, group, start, len), 990 TP_ARGS(sb, inode, group, start, len),
947 991
948 TP_STRUCT__entry( 992 TP_STRUCT__entry(
949 __field( int, dev_major ) 993 __field( dev_t, dev )
950 __field( int, dev_minor )
951 __field( ino_t, ino ) 994 __field( ino_t, ino )
952 __field( int, result_start ) 995 __field( int, result_start )
953 __field( __u32, result_group ) 996 __field( __u32, result_group )
@@ -955,8 +998,7 @@ DECLARE_EVENT_CLASS(ext4__mballoc,
955 ), 998 ),
956 999
957 TP_fast_assign( 1000 TP_fast_assign(
958 __entry->dev_major = MAJOR(sb->s_dev); 1001 __entry->dev = sb->s_dev;
959 __entry->dev_minor = MINOR(sb->s_dev);
960 __entry->ino = inode ? inode->i_ino : 0; 1002 __entry->ino = inode ? inode->i_ino : 0;
961 __entry->result_start = start; 1003 __entry->result_start = start;
962 __entry->result_group = group; 1004 __entry->result_group = group;
@@ -964,7 +1006,7 @@ DECLARE_EVENT_CLASS(ext4__mballoc,
964 ), 1006 ),
965 1007
966 TP_printk("dev %d,%d inode %lu extent %u/%d/%u ", 1008 TP_printk("dev %d,%d inode %lu extent %u/%d/%u ",
967 __entry->dev_major, __entry->dev_minor, 1009 MAJOR(__entry->dev), MINOR(__entry->dev),
968 (unsigned long) __entry->ino, 1010 (unsigned long) __entry->ino,
969 __entry->result_group, __entry->result_start, 1011 __entry->result_group, __entry->result_start,
970 __entry->result_len) 1012 __entry->result_len)
@@ -998,8 +1040,7 @@ TRACE_EVENT(ext4_forget,
998 TP_ARGS(inode, is_metadata, block), 1040 TP_ARGS(inode, is_metadata, block),
999 1041
1000 TP_STRUCT__entry( 1042 TP_STRUCT__entry(
1001 __field( int, dev_major ) 1043 __field( dev_t, dev )
1002 __field( int, dev_minor )
1003 __field( ino_t, ino ) 1044 __field( ino_t, ino )
1004 __field( umode_t, mode ) 1045 __field( umode_t, mode )
1005 __field( int, is_metadata ) 1046 __field( int, is_metadata )
@@ -1007,8 +1048,7 @@ TRACE_EVENT(ext4_forget,
1007 ), 1048 ),
1008 1049
1009 TP_fast_assign( 1050 TP_fast_assign(
1010 __entry->dev_major = MAJOR(inode->i_sb->s_dev); 1051 __entry->dev = inode->i_sb->s_dev;
1011 __entry->dev_minor = MINOR(inode->i_sb->s_dev);
1012 __entry->ino = inode->i_ino; 1052 __entry->ino = inode->i_ino;
1013 __entry->mode = inode->i_mode; 1053 __entry->mode = inode->i_mode;
1014 __entry->is_metadata = is_metadata; 1054 __entry->is_metadata = is_metadata;
@@ -1016,9 +1056,9 @@ TRACE_EVENT(ext4_forget,
1016 ), 1056 ),
1017 1057
1018 TP_printk("dev %d,%d ino %lu mode 0%o is_metadata %d block %llu", 1058 TP_printk("dev %d,%d ino %lu mode 0%o is_metadata %d block %llu",
1019 __entry->dev_major, __entry->dev_minor, 1059 MAJOR(__entry->dev), MINOR(__entry->dev),
1020 (unsigned long) __entry->ino, __entry->mode, 1060 (unsigned long) __entry->ino,
1021 __entry->is_metadata, __entry->block) 1061 __entry->mode, __entry->is_metadata, __entry->block)
1022); 1062);
1023 1063
1024TRACE_EVENT(ext4_da_update_reserve_space, 1064TRACE_EVENT(ext4_da_update_reserve_space,
@@ -1027,8 +1067,7 @@ TRACE_EVENT(ext4_da_update_reserve_space,
1027 TP_ARGS(inode, used_blocks), 1067 TP_ARGS(inode, used_blocks),
1028 1068
1029 TP_STRUCT__entry( 1069 TP_STRUCT__entry(
1030 __field( int, dev_major ) 1070 __field( dev_t, dev )
1031 __field( int, dev_minor )
1032 __field( ino_t, ino ) 1071 __field( ino_t, ino )
1033 __field( umode_t, mode ) 1072 __field( umode_t, mode )
1034 __field( __u64, i_blocks ) 1073 __field( __u64, i_blocks )
@@ -1039,8 +1078,7 @@ TRACE_EVENT(ext4_da_update_reserve_space,
1039 ), 1078 ),
1040 1079
1041 TP_fast_assign( 1080 TP_fast_assign(
1042 __entry->dev_major = MAJOR(inode->i_sb->s_dev); 1081 __entry->dev = inode->i_sb->s_dev;
1043 __entry->dev_minor = MINOR(inode->i_sb->s_dev);
1044 __entry->ino = inode->i_ino; 1082 __entry->ino = inode->i_ino;
1045 __entry->mode = inode->i_mode; 1083 __entry->mode = inode->i_mode;
1046 __entry->i_blocks = inode->i_blocks; 1084 __entry->i_blocks = inode->i_blocks;
@@ -1050,10 +1088,12 @@ TRACE_EVENT(ext4_da_update_reserve_space,
1050 __entry->allocated_meta_blocks = EXT4_I(inode)->i_allocated_meta_blocks; 1088 __entry->allocated_meta_blocks = EXT4_I(inode)->i_allocated_meta_blocks;
1051 ), 1089 ),
1052 1090
1053 TP_printk("dev %d,%d ino %lu mode 0%o i_blocks %llu used_blocks %d reserved_data_blocks %d reserved_meta_blocks %d allocated_meta_blocks %d", 1091 TP_printk("dev %d,%d ino %lu mode 0%o i_blocks %llu used_blocks %d "
1054 __entry->dev_major, __entry->dev_minor, 1092 "reserved_data_blocks %d reserved_meta_blocks %d "
1055 (unsigned long) __entry->ino, __entry->mode, 1093 "allocated_meta_blocks %d",
1056 (unsigned long long) __entry->i_blocks, 1094 MAJOR(__entry->dev), MINOR(__entry->dev),
1095 (unsigned long) __entry->ino,
1096 __entry->mode, (unsigned long long) __entry->i_blocks,
1057 __entry->used_blocks, __entry->reserved_data_blocks, 1097 __entry->used_blocks, __entry->reserved_data_blocks,
1058 __entry->reserved_meta_blocks, __entry->allocated_meta_blocks) 1098 __entry->reserved_meta_blocks, __entry->allocated_meta_blocks)
1059); 1099);
@@ -1064,8 +1104,7 @@ TRACE_EVENT(ext4_da_reserve_space,
1064 TP_ARGS(inode, md_needed), 1104 TP_ARGS(inode, md_needed),
1065 1105
1066 TP_STRUCT__entry( 1106 TP_STRUCT__entry(
1067 __field( int, dev_major ) 1107 __field( dev_t, dev )
1068 __field( int, dev_minor )
1069 __field( ino_t, ino ) 1108 __field( ino_t, ino )
1070 __field( umode_t, mode ) 1109 __field( umode_t, mode )
1071 __field( __u64, i_blocks ) 1110 __field( __u64, i_blocks )
@@ -1075,8 +1114,7 @@ TRACE_EVENT(ext4_da_reserve_space,
1075 ), 1114 ),
1076 1115
1077 TP_fast_assign( 1116 TP_fast_assign(
1078 __entry->dev_major = MAJOR(inode->i_sb->s_dev); 1117 __entry->dev = inode->i_sb->s_dev;
1079 __entry->dev_minor = MINOR(inode->i_sb->s_dev);
1080 __entry->ino = inode->i_ino; 1118 __entry->ino = inode->i_ino;
1081 __entry->mode = inode->i_mode; 1119 __entry->mode = inode->i_mode;
1082 __entry->i_blocks = inode->i_blocks; 1120 __entry->i_blocks = inode->i_blocks;
@@ -1085,8 +1123,9 @@ TRACE_EVENT(ext4_da_reserve_space,
1085 __entry->reserved_meta_blocks = EXT4_I(inode)->i_reserved_meta_blocks; 1123 __entry->reserved_meta_blocks = EXT4_I(inode)->i_reserved_meta_blocks;
1086 ), 1124 ),
1087 1125
1088 TP_printk("dev %d,%d ino %lu mode 0%o i_blocks %llu md_needed %d reserved_data_blocks %d reserved_meta_blocks %d", 1126 TP_printk("dev %d,%d ino %lu mode 0%o i_blocks %llu md_needed %d "
1089 __entry->dev_major, __entry->dev_minor, 1127 "reserved_data_blocks %d reserved_meta_blocks %d",
1128 MAJOR(__entry->dev), MINOR(__entry->dev),
1090 (unsigned long) __entry->ino, 1129 (unsigned long) __entry->ino,
1091 __entry->mode, (unsigned long long) __entry->i_blocks, 1130 __entry->mode, (unsigned long long) __entry->i_blocks,
1092 __entry->md_needed, __entry->reserved_data_blocks, 1131 __entry->md_needed, __entry->reserved_data_blocks,
@@ -1099,8 +1138,7 @@ TRACE_EVENT(ext4_da_release_space,
1099 TP_ARGS(inode, freed_blocks), 1138 TP_ARGS(inode, freed_blocks),
1100 1139
1101 TP_STRUCT__entry( 1140 TP_STRUCT__entry(
1102 __field( int, dev_major ) 1141 __field( dev_t, dev )
1103 __field( int, dev_minor )
1104 __field( ino_t, ino ) 1142 __field( ino_t, ino )
1105 __field( umode_t, mode ) 1143 __field( umode_t, mode )
1106 __field( __u64, i_blocks ) 1144 __field( __u64, i_blocks )
@@ -1111,8 +1149,7 @@ TRACE_EVENT(ext4_da_release_space,
1111 ), 1149 ),
1112 1150
1113 TP_fast_assign( 1151 TP_fast_assign(
1114 __entry->dev_major = MAJOR(inode->i_sb->s_dev); 1152 __entry->dev = inode->i_sb->s_dev;
1115 __entry->dev_minor = MINOR(inode->i_sb->s_dev);
1116 __entry->ino = inode->i_ino; 1153 __entry->ino = inode->i_ino;
1117 __entry->mode = inode->i_mode; 1154 __entry->mode = inode->i_mode;
1118 __entry->i_blocks = inode->i_blocks; 1155 __entry->i_blocks = inode->i_blocks;
@@ -1122,8 +1159,10 @@ TRACE_EVENT(ext4_da_release_space,
1122 __entry->allocated_meta_blocks = EXT4_I(inode)->i_allocated_meta_blocks; 1159 __entry->allocated_meta_blocks = EXT4_I(inode)->i_allocated_meta_blocks;
1123 ), 1160 ),
1124 1161
1125 TP_printk("dev %d,%d ino %lu mode 0%o i_blocks %llu freed_blocks %d reserved_data_blocks %d reserved_meta_blocks %d allocated_meta_blocks %d", 1162 TP_printk("dev %d,%d ino %lu mode 0%o i_blocks %llu freed_blocks %d "
1126 __entry->dev_major, __entry->dev_minor, 1163 "reserved_data_blocks %d reserved_meta_blocks %d "
1164 "allocated_meta_blocks %d",
1165 MAJOR(__entry->dev), MINOR(__entry->dev),
1127 (unsigned long) __entry->ino, 1166 (unsigned long) __entry->ino,
1128 __entry->mode, (unsigned long long) __entry->i_blocks, 1167 __entry->mode, (unsigned long long) __entry->i_blocks,
1129 __entry->freed_blocks, __entry->reserved_data_blocks, 1168 __entry->freed_blocks, __entry->reserved_data_blocks,
@@ -1136,20 +1175,19 @@ DECLARE_EVENT_CLASS(ext4__bitmap_load,
1136 TP_ARGS(sb, group), 1175 TP_ARGS(sb, group),
1137 1176
1138 TP_STRUCT__entry( 1177 TP_STRUCT__entry(
1139 __field( int, dev_major ) 1178 __field( dev_t, dev )
1140 __field( int, dev_minor )
1141 __field( __u32, group ) 1179 __field( __u32, group )
1142 1180
1143 ), 1181 ),
1144 1182
1145 TP_fast_assign( 1183 TP_fast_assign(
1146 __entry->dev_major = MAJOR(sb->s_dev); 1184 __entry->dev = sb->s_dev;
1147 __entry->dev_minor = MINOR(sb->s_dev);
1148 __entry->group = group; 1185 __entry->group = group;
1149 ), 1186 ),
1150 1187
1151 TP_printk("dev %d,%d group %u", 1188 TP_printk("dev %d,%d group %u",
1152 __entry->dev_major, __entry->dev_minor, __entry->group) 1189 MAJOR(__entry->dev), MINOR(__entry->dev),
1190 __entry->group)
1153); 1191);
1154 1192
1155DEFINE_EVENT(ext4__bitmap_load, ext4_mb_bitmap_load, 1193DEFINE_EVENT(ext4__bitmap_load, ext4_mb_bitmap_load,
@@ -1166,6 +1204,349 @@ DEFINE_EVENT(ext4__bitmap_load, ext4_mb_buddy_bitmap_load,
1166 TP_ARGS(sb, group) 1204 TP_ARGS(sb, group)
1167); 1205);
1168 1206
1207DEFINE_EVENT(ext4__bitmap_load, ext4_read_block_bitmap_load,
1208
1209 TP_PROTO(struct super_block *sb, unsigned long group),
1210
1211 TP_ARGS(sb, group)
1212);
1213
1214DEFINE_EVENT(ext4__bitmap_load, ext4_load_inode_bitmap,
1215
1216 TP_PROTO(struct super_block *sb, unsigned long group),
1217
1218 TP_ARGS(sb, group)
1219);
1220
1221TRACE_EVENT(ext4_direct_IO_enter,
1222 TP_PROTO(struct inode *inode, loff_t offset, unsigned long len, int rw),
1223
1224 TP_ARGS(inode, offset, len, rw),
1225
1226 TP_STRUCT__entry(
1227 __field( ino_t, ino )
1228 __field( dev_t, dev )
1229 __field( loff_t, pos )
1230 __field( unsigned long, len )
1231 __field( int, rw )
1232 ),
1233
1234 TP_fast_assign(
1235 __entry->ino = inode->i_ino;
1236 __entry->dev = inode->i_sb->s_dev;
1237 __entry->pos = offset;
1238 __entry->len = len;
1239 __entry->rw = rw;
1240 ),
1241
1242 TP_printk("dev %d,%d ino %lu pos %llu len %lu rw %d",
1243 MAJOR(__entry->dev), MINOR(__entry->dev),
1244 (unsigned long) __entry->ino,
1245 (unsigned long long) __entry->pos, __entry->len, __entry->rw)
1246);
1247
1248TRACE_EVENT(ext4_direct_IO_exit,
1249 TP_PROTO(struct inode *inode, loff_t offset, unsigned long len, int rw, int ret),
1250
1251 TP_ARGS(inode, offset, len, rw, ret),
1252
1253 TP_STRUCT__entry(
1254 __field( ino_t, ino )
1255 __field( dev_t, dev )
1256 __field( loff_t, pos )
1257 __field( unsigned long, len )
1258 __field( int, rw )
1259 __field( int, ret )
1260 ),
1261
1262 TP_fast_assign(
1263 __entry->ino = inode->i_ino;
1264 __entry->dev = inode->i_sb->s_dev;
1265 __entry->pos = offset;
1266 __entry->len = len;
1267 __entry->rw = rw;
1268 __entry->ret = ret;
1269 ),
1270
1271 TP_printk("dev %d,%d ino %lu pos %llu len %lu rw %d ret %d",
1272 MAJOR(__entry->dev), MINOR(__entry->dev),
1273 (unsigned long) __entry->ino,
1274 (unsigned long long) __entry->pos, __entry->len,
1275 __entry->rw, __entry->ret)
1276);
1277
1278TRACE_EVENT(ext4_fallocate_enter,
1279 TP_PROTO(struct inode *inode, loff_t offset, loff_t len, int mode),
1280
1281 TP_ARGS(inode, offset, len, mode),
1282
1283 TP_STRUCT__entry(
1284 __field( ino_t, ino )
1285 __field( dev_t, dev )
1286 __field( loff_t, pos )
1287 __field( loff_t, len )
1288 __field( int, mode )
1289 ),
1290
1291 TP_fast_assign(
1292 __entry->ino = inode->i_ino;
1293 __entry->dev = inode->i_sb->s_dev;
1294 __entry->pos = offset;
1295 __entry->len = len;
1296 __entry->mode = mode;
1297 ),
1298
1299 TP_printk("dev %d,%d ino %ld pos %llu len %llu mode %d",
1300 MAJOR(__entry->dev), MINOR(__entry->dev),
1301 (unsigned long) __entry->ino,
1302 (unsigned long long) __entry->pos,
1303 (unsigned long long) __entry->len, __entry->mode)
1304);
1305
1306TRACE_EVENT(ext4_fallocate_exit,
1307 TP_PROTO(struct inode *inode, loff_t offset, unsigned int max_blocks, int ret),
1308
1309 TP_ARGS(inode, offset, max_blocks, ret),
1310
1311 TP_STRUCT__entry(
1312 __field( ino_t, ino )
1313 __field( dev_t, dev )
1314 __field( loff_t, pos )
1315 __field( unsigned, blocks )
1316 __field( int, ret )
1317 ),
1318
1319 TP_fast_assign(
1320 __entry->ino = inode->i_ino;
1321 __entry->dev = inode->i_sb->s_dev;
1322 __entry->pos = offset;
1323 __entry->blocks = max_blocks;
1324 __entry->ret = ret;
1325 ),
1326
1327 TP_printk("dev %d,%d ino %ld pos %llu blocks %d ret %d",
1328 MAJOR(__entry->dev), MINOR(__entry->dev),
1329 (unsigned long) __entry->ino,
1330 (unsigned long long) __entry->pos, __entry->blocks,
1331 __entry->ret)
1332);
1333
1334TRACE_EVENT(ext4_unlink_enter,
1335 TP_PROTO(struct inode *parent, struct dentry *dentry),
1336
1337 TP_ARGS(parent, dentry),
1338
1339 TP_STRUCT__entry(
1340 __field( ino_t, parent )
1341 __field( ino_t, ino )
1342 __field( loff_t, size )
1343 __field( dev_t, dev )
1344 ),
1345
1346 TP_fast_assign(
1347 __entry->parent = parent->i_ino;
1348 __entry->ino = dentry->d_inode->i_ino;
1349 __entry->size = dentry->d_inode->i_size;
1350 __entry->dev = dentry->d_inode->i_sb->s_dev;
1351 ),
1352
1353 TP_printk("dev %d,%d ino %ld size %lld parent %ld",
1354 MAJOR(__entry->dev), MINOR(__entry->dev),
1355 (unsigned long) __entry->ino, __entry->size,
1356 (unsigned long) __entry->parent)
1357);
1358
1359TRACE_EVENT(ext4_unlink_exit,
1360 TP_PROTO(struct dentry *dentry, int ret),
1361
1362 TP_ARGS(dentry, ret),
1363
1364 TP_STRUCT__entry(
1365 __field( ino_t, ino )
1366 __field( dev_t, dev )
1367 __field( int, ret )
1368 ),
1369
1370 TP_fast_assign(
1371 __entry->ino = dentry->d_inode->i_ino;
1372 __entry->dev = dentry->d_inode->i_sb->s_dev;
1373 __entry->ret = ret;
1374 ),
1375
1376 TP_printk("dev %d,%d ino %ld ret %d",
1377 MAJOR(__entry->dev), MINOR(__entry->dev),
1378 (unsigned long) __entry->ino,
1379 __entry->ret)
1380);
1381
1382DECLARE_EVENT_CLASS(ext4__truncate,
1383 TP_PROTO(struct inode *inode),
1384
1385 TP_ARGS(inode),
1386
1387 TP_STRUCT__entry(
1388 __field( ino_t, ino )
1389 __field( dev_t, dev )
1390 __field( blkcnt_t, blocks )
1391 ),
1392
1393 TP_fast_assign(
1394 __entry->ino = inode->i_ino;
1395 __entry->dev = inode->i_sb->s_dev;
1396 __entry->blocks = inode->i_blocks;
1397 ),
1398
1399 TP_printk("dev %d,%d ino %lu blocks %lu",
1400 MAJOR(__entry->dev), MINOR(__entry->dev),
1401 (unsigned long) __entry->ino, (unsigned long) __entry->blocks)
1402);
1403
1404DEFINE_EVENT(ext4__truncate, ext4_truncate_enter,
1405
1406 TP_PROTO(struct inode *inode),
1407
1408 TP_ARGS(inode)
1409);
1410
1411DEFINE_EVENT(ext4__truncate, ext4_truncate_exit,
1412
1413 TP_PROTO(struct inode *inode),
1414
1415 TP_ARGS(inode)
1416);
1417
1418DECLARE_EVENT_CLASS(ext4__map_blocks_enter,
1419 TP_PROTO(struct inode *inode, ext4_lblk_t lblk,
1420 unsigned len, unsigned flags),
1421
1422 TP_ARGS(inode, lblk, len, flags),
1423
1424 TP_STRUCT__entry(
1425 __field( ino_t, ino )
1426 __field( dev_t, dev )
1427 __field( ext4_lblk_t, lblk )
1428 __field( unsigned, len )
1429 __field( unsigned, flags )
1430 ),
1431
1432 TP_fast_assign(
1433 __entry->ino = inode->i_ino;
1434 __entry->dev = inode->i_sb->s_dev;
1435 __entry->lblk = lblk;
1436 __entry->len = len;
1437 __entry->flags = flags;
1438 ),
1439
1440 TP_printk("dev %d,%d ino %lu lblk %u len %u flags %u",
1441 MAJOR(__entry->dev), MINOR(__entry->dev),
1442 (unsigned long) __entry->ino,
1443 (unsigned) __entry->lblk, __entry->len, __entry->flags)
1444);
1445
1446DEFINE_EVENT(ext4__map_blocks_enter, ext4_ext_map_blocks_enter,
1447 TP_PROTO(struct inode *inode, ext4_lblk_t lblk,
1448 unsigned len, unsigned flags),
1449
1450 TP_ARGS(inode, lblk, len, flags)
1451);
1452
1453DEFINE_EVENT(ext4__map_blocks_enter, ext4_ind_map_blocks_enter,
1454 TP_PROTO(struct inode *inode, ext4_lblk_t lblk,
1455 unsigned len, unsigned flags),
1456
1457 TP_ARGS(inode, lblk, len, flags)
1458);
1459
1460DECLARE_EVENT_CLASS(ext4__map_blocks_exit,
1461 TP_PROTO(struct inode *inode, ext4_lblk_t lblk,
1462 ext4_fsblk_t pblk, unsigned len, int ret),
1463
1464 TP_ARGS(inode, lblk, pblk, len, ret),
1465
1466 TP_STRUCT__entry(
1467 __field( ino_t, ino )
1468 __field( dev_t, dev )
1469 __field( ext4_lblk_t, lblk )
1470 __field( ext4_fsblk_t, pblk )
1471 __field( unsigned, len )
1472 __field( int, ret )
1473 ),
1474
1475 TP_fast_assign(
1476 __entry->ino = inode->i_ino;
1477 __entry->dev = inode->i_sb->s_dev;
1478 __entry->lblk = lblk;
1479 __entry->pblk = pblk;
1480 __entry->len = len;
1481 __entry->ret = ret;
1482 ),
1483
1484 TP_printk("dev %d,%d ino %lu lblk %u pblk %llu len %u ret %d",
1485 MAJOR(__entry->dev), MINOR(__entry->dev),
1486 (unsigned long) __entry->ino,
1487 (unsigned) __entry->lblk, (unsigned long long) __entry->pblk,
1488 __entry->len, __entry->ret)
1489);
1490
1491DEFINE_EVENT(ext4__map_blocks_exit, ext4_ext_map_blocks_exit,
1492 TP_PROTO(struct inode *inode, ext4_lblk_t lblk,
1493 ext4_fsblk_t pblk, unsigned len, int ret),
1494
1495 TP_ARGS(inode, lblk, pblk, len, ret)
1496);
1497
1498DEFINE_EVENT(ext4__map_blocks_exit, ext4_ind_map_blocks_exit,
1499 TP_PROTO(struct inode *inode, ext4_lblk_t lblk,
1500 ext4_fsblk_t pblk, unsigned len, int ret),
1501
1502 TP_ARGS(inode, lblk, pblk, len, ret)
1503);
1504
1505TRACE_EVENT(ext4_ext_load_extent,
1506 TP_PROTO(struct inode *inode, ext4_lblk_t lblk, ext4_fsblk_t pblk),
1507
1508 TP_ARGS(inode, lblk, pblk),
1509
1510 TP_STRUCT__entry(
1511 __field( ino_t, ino )
1512 __field( dev_t, dev )
1513 __field( ext4_lblk_t, lblk )
1514 __field( ext4_fsblk_t, pblk )
1515 ),
1516
1517 TP_fast_assign(
1518 __entry->ino = inode->i_ino;
1519 __entry->dev = inode->i_sb->s_dev;
1520 __entry->lblk = lblk;
1521 __entry->pblk = pblk;
1522 ),
1523
1524 TP_printk("dev %d,%d ino %lu lblk %u pblk %llu",
1525 MAJOR(__entry->dev), MINOR(__entry->dev),
1526 (unsigned long) __entry->ino,
1527 (unsigned) __entry->lblk, (unsigned long long) __entry->pblk)
1528);
1529
1530TRACE_EVENT(ext4_load_inode,
1531 TP_PROTO(struct inode *inode),
1532
1533 TP_ARGS(inode),
1534
1535 TP_STRUCT__entry(
1536 __field( ino_t, ino )
1537 __field( dev_t, dev )
1538 ),
1539
1540 TP_fast_assign(
1541 __entry->ino = inode->i_ino;
1542 __entry->dev = inode->i_sb->s_dev;
1543 ),
1544
1545 TP_printk("dev %d,%d ino %ld",
1546 MAJOR(__entry->dev), MINOR(__entry->dev),
1547 (unsigned long) __entry->ino)
1548);
1549
1169#endif /* _TRACE_EXT4_H */ 1550#endif /* _TRACE_EXT4_H */
1170 1551
1171/* This part must be outside protection */ 1552/* This part must be outside protection */
diff --git a/include/trace/events/jbd2.h b/include/trace/events/jbd2.h
index 7447ea9305b5..bf16545cc977 100644
--- a/include/trace/events/jbd2.h
+++ b/include/trace/events/jbd2.h
@@ -17,19 +17,17 @@ TRACE_EVENT(jbd2_checkpoint,
17 TP_ARGS(journal, result), 17 TP_ARGS(journal, result),
18 18
19 TP_STRUCT__entry( 19 TP_STRUCT__entry(
20 __field( int, dev_major ) 20 __field( dev_t, dev )
21 __field( int, dev_minor )
22 __field( int, result ) 21 __field( int, result )
23 ), 22 ),
24 23
25 TP_fast_assign( 24 TP_fast_assign(
26 __entry->dev_major = MAJOR(journal->j_fs_dev->bd_dev); 25 __entry->dev = journal->j_fs_dev->bd_dev;
27 __entry->dev_minor = MINOR(journal->j_fs_dev->bd_dev);
28 __entry->result = result; 26 __entry->result = result;
29 ), 27 ),
30 28
31 TP_printk("dev %d,%d result %d", 29 TP_printk("dev %s result %d",
32 __entry->dev_major, __entry->dev_minor, __entry->result) 30 jbd2_dev_to_name(__entry->dev), __entry->result)
33); 31);
34 32
35DECLARE_EVENT_CLASS(jbd2_commit, 33DECLARE_EVENT_CLASS(jbd2_commit,
@@ -39,22 +37,20 @@ DECLARE_EVENT_CLASS(jbd2_commit,
39 TP_ARGS(journal, commit_transaction), 37 TP_ARGS(journal, commit_transaction),
40 38
41 TP_STRUCT__entry( 39 TP_STRUCT__entry(
42 __field( int, dev_major ) 40 __field( dev_t, dev )
43 __field( int, dev_minor )
44 __field( char, sync_commit ) 41 __field( char, sync_commit )
45 __field( int, transaction ) 42 __field( int, transaction )
46 ), 43 ),
47 44
48 TP_fast_assign( 45 TP_fast_assign(
49 __entry->dev_major = MAJOR(journal->j_fs_dev->bd_dev); 46 __entry->dev = journal->j_fs_dev->bd_dev;
50 __entry->dev_minor = MINOR(journal->j_fs_dev->bd_dev);
51 __entry->sync_commit = commit_transaction->t_synchronous_commit; 47 __entry->sync_commit = commit_transaction->t_synchronous_commit;
52 __entry->transaction = commit_transaction->t_tid; 48 __entry->transaction = commit_transaction->t_tid;
53 ), 49 ),
54 50
55 TP_printk("dev %d,%d transaction %d sync %d", 51 TP_printk("dev %s transaction %d sync %d",
56 __entry->dev_major, __entry->dev_minor, 52 jbd2_dev_to_name(__entry->dev), __entry->transaction,
57 __entry->transaction, __entry->sync_commit) 53 __entry->sync_commit)
58); 54);
59 55
60DEFINE_EVENT(jbd2_commit, jbd2_start_commit, 56DEFINE_EVENT(jbd2_commit, jbd2_start_commit,
@@ -91,24 +87,22 @@ TRACE_EVENT(jbd2_end_commit,
91 TP_ARGS(journal, commit_transaction), 87 TP_ARGS(journal, commit_transaction),
92 88
93 TP_STRUCT__entry( 89 TP_STRUCT__entry(
94 __field( int, dev_major ) 90 __field( dev_t, dev )
95 __field( int, dev_minor )
96 __field( char, sync_commit ) 91 __field( char, sync_commit )
97 __field( int, transaction ) 92 __field( int, transaction )
98 __field( int, head ) 93 __field( int, head )
99 ), 94 ),
100 95
101 TP_fast_assign( 96 TP_fast_assign(
102 __entry->dev_major = MAJOR(journal->j_fs_dev->bd_dev); 97 __entry->dev = journal->j_fs_dev->bd_dev;
103 __entry->dev_minor = MINOR(journal->j_fs_dev->bd_dev);
104 __entry->sync_commit = commit_transaction->t_synchronous_commit; 98 __entry->sync_commit = commit_transaction->t_synchronous_commit;
105 __entry->transaction = commit_transaction->t_tid; 99 __entry->transaction = commit_transaction->t_tid;
106 __entry->head = journal->j_tail_sequence; 100 __entry->head = journal->j_tail_sequence;
107 ), 101 ),
108 102
109 TP_printk("dev %d,%d transaction %d sync %d head %d", 103 TP_printk("dev %s transaction %d sync %d head %d",
110 __entry->dev_major, __entry->dev_minor, 104 jbd2_dev_to_name(__entry->dev), __entry->transaction,
111 __entry->transaction, __entry->sync_commit, __entry->head) 105 __entry->sync_commit, __entry->head)
112); 106);
113 107
114TRACE_EVENT(jbd2_submit_inode_data, 108TRACE_EVENT(jbd2_submit_inode_data,
@@ -117,20 +111,17 @@ TRACE_EVENT(jbd2_submit_inode_data,
117 TP_ARGS(inode), 111 TP_ARGS(inode),
118 112
119 TP_STRUCT__entry( 113 TP_STRUCT__entry(
120 __field( int, dev_major ) 114 __field( dev_t, dev )
121 __field( int, dev_minor )
122 __field( ino_t, ino ) 115 __field( ino_t, ino )
123 ), 116 ),
124 117
125 TP_fast_assign( 118 TP_fast_assign(
126 __entry->dev_major = MAJOR(inode->i_sb->s_dev); 119 __entry->dev = inode->i_sb->s_dev;
127 __entry->dev_minor = MINOR(inode->i_sb->s_dev);
128 __entry->ino = inode->i_ino; 120 __entry->ino = inode->i_ino;
129 ), 121 ),
130 122
131 TP_printk("dev %d,%d ino %lu", 123 TP_printk("dev %s ino %lu",
132 __entry->dev_major, __entry->dev_minor, 124 jbd2_dev_to_name(__entry->dev), (unsigned long) __entry->ino)
133 (unsigned long) __entry->ino)
134); 125);
135 126
136TRACE_EVENT(jbd2_run_stats, 127TRACE_EVENT(jbd2_run_stats,
@@ -140,8 +131,7 @@ TRACE_EVENT(jbd2_run_stats,
140 TP_ARGS(dev, tid, stats), 131 TP_ARGS(dev, tid, stats),
141 132
142 TP_STRUCT__entry( 133 TP_STRUCT__entry(
143 __field( int, dev_major ) 134 __field( dev_t, dev )
144 __field( int, dev_minor )
145 __field( unsigned long, tid ) 135 __field( unsigned long, tid )
146 __field( unsigned long, wait ) 136 __field( unsigned long, wait )
147 __field( unsigned long, running ) 137 __field( unsigned long, running )
@@ -154,8 +144,7 @@ TRACE_EVENT(jbd2_run_stats,
154 ), 144 ),
155 145
156 TP_fast_assign( 146 TP_fast_assign(
157 __entry->dev_major = MAJOR(dev); 147 __entry->dev = dev;
158 __entry->dev_minor = MINOR(dev);
159 __entry->tid = tid; 148 __entry->tid = tid;
160 __entry->wait = stats->rs_wait; 149 __entry->wait = stats->rs_wait;
161 __entry->running = stats->rs_running; 150 __entry->running = stats->rs_running;
@@ -167,9 +156,9 @@ TRACE_EVENT(jbd2_run_stats,
167 __entry->blocks_logged = stats->rs_blocks_logged; 156 __entry->blocks_logged = stats->rs_blocks_logged;
168 ), 157 ),
169 158
170 TP_printk("dev %d,%d tid %lu wait %u running %u locked %u flushing %u " 159 TP_printk("dev %s tid %lu wait %u running %u locked %u flushing %u "
171 "logging %u handle_count %u blocks %u blocks_logged %u", 160 "logging %u handle_count %u blocks %u blocks_logged %u",
172 __entry->dev_major, __entry->dev_minor, __entry->tid, 161 jbd2_dev_to_name(__entry->dev), __entry->tid,
173 jiffies_to_msecs(__entry->wait), 162 jiffies_to_msecs(__entry->wait),
174 jiffies_to_msecs(__entry->running), 163 jiffies_to_msecs(__entry->running),
175 jiffies_to_msecs(__entry->locked), 164 jiffies_to_msecs(__entry->locked),
@@ -186,8 +175,7 @@ TRACE_EVENT(jbd2_checkpoint_stats,
186 TP_ARGS(dev, tid, stats), 175 TP_ARGS(dev, tid, stats),
187 176
188 TP_STRUCT__entry( 177 TP_STRUCT__entry(
189 __field( int, dev_major ) 178 __field( dev_t, dev )
190 __field( int, dev_minor )
191 __field( unsigned long, tid ) 179 __field( unsigned long, tid )
192 __field( unsigned long, chp_time ) 180 __field( unsigned long, chp_time )
193 __field( __u32, forced_to_close ) 181 __field( __u32, forced_to_close )
@@ -196,8 +184,7 @@ TRACE_EVENT(jbd2_checkpoint_stats,
196 ), 184 ),
197 185
198 TP_fast_assign( 186 TP_fast_assign(
199 __entry->dev_major = MAJOR(dev); 187 __entry->dev = dev;
200 __entry->dev_minor = MINOR(dev);
201 __entry->tid = tid; 188 __entry->tid = tid;
202 __entry->chp_time = stats->cs_chp_time; 189 __entry->chp_time = stats->cs_chp_time;
203 __entry->forced_to_close= stats->cs_forced_to_close; 190 __entry->forced_to_close= stats->cs_forced_to_close;
@@ -205,9 +192,9 @@ TRACE_EVENT(jbd2_checkpoint_stats,
205 __entry->dropped = stats->cs_dropped; 192 __entry->dropped = stats->cs_dropped;
206 ), 193 ),
207 194
208 TP_printk("dev %d,%d tid %lu chp_time %u forced_to_close %u " 195 TP_printk("dev %s tid %lu chp_time %u forced_to_close %u "
209 "written %u dropped %u", 196 "written %u dropped %u",
210 __entry->dev_major, __entry->dev_minor, __entry->tid, 197 jbd2_dev_to_name(__entry->dev), __entry->tid,
211 jiffies_to_msecs(__entry->chp_time), 198 jiffies_to_msecs(__entry->chp_time),
212 __entry->forced_to_close, __entry->written, __entry->dropped) 199 __entry->forced_to_close, __entry->written, __entry->dropped)
213); 200);
@@ -220,8 +207,7 @@ TRACE_EVENT(jbd2_cleanup_journal_tail,
220 TP_ARGS(journal, first_tid, block_nr, freed), 207 TP_ARGS(journal, first_tid, block_nr, freed),
221 208
222 TP_STRUCT__entry( 209 TP_STRUCT__entry(
223 __field( int, dev_major ) 210 __field( dev_t, dev )
224 __field( int, dev_minor )
225 __field( tid_t, tail_sequence ) 211 __field( tid_t, tail_sequence )
226 __field( tid_t, first_tid ) 212 __field( tid_t, first_tid )
227 __field(unsigned long, block_nr ) 213 __field(unsigned long, block_nr )
@@ -229,18 +215,16 @@ TRACE_EVENT(jbd2_cleanup_journal_tail,
229 ), 215 ),
230 216
231 TP_fast_assign( 217 TP_fast_assign(
232 __entry->dev_major = MAJOR(journal->j_fs_dev->bd_dev); 218 __entry->dev = journal->j_fs_dev->bd_dev;
233 __entry->dev_minor = MINOR(journal->j_fs_dev->bd_dev);
234 __entry->tail_sequence = journal->j_tail_sequence; 219 __entry->tail_sequence = journal->j_tail_sequence;
235 __entry->first_tid = first_tid; 220 __entry->first_tid = first_tid;
236 __entry->block_nr = block_nr; 221 __entry->block_nr = block_nr;
237 __entry->freed = freed; 222 __entry->freed = freed;
238 ), 223 ),
239 224
240 TP_printk("dev %d,%d from %u to %u offset %lu freed %lu", 225 TP_printk("dev %s from %u to %u offset %lu freed %lu",
241 __entry->dev_major, __entry->dev_minor, 226 jbd2_dev_to_name(__entry->dev), __entry->tail_sequence,
242 __entry->tail_sequence, __entry->first_tid, 227 __entry->first_tid, __entry->block_nr, __entry->freed)
243 __entry->block_nr, __entry->freed)
244); 228);
245 229
246#endif /* _TRACE_JBD2_H */ 230#endif /* _TRACE_JBD2_H */