aboutsummaryrefslogtreecommitdiffstats
path: root/include/trace
diff options
context:
space:
mode:
authorTheodore Ts'o <tytso@mit.edu>2010-10-27 22:08:50 -0400
committerTheodore Ts'o <tytso@mit.edu>2010-10-27 22:08:50 -0400
commita269029d0e2192046be4c07ed78a45022469ee4c (patch)
tree6ec7b7d2686a344ac77d10c4930fc3699461d198 /include/trace
parent3d287de3b828226e5a450c7fd5bf4283792dc2b0 (diff)
ext4,jbd2: convert tracepoints to use major/minor numbers
Unfortunately perf can't deal with anything other than direct structure accesses in the TP_printk() section. It will drop dead when it sees jbd2_dev_to_name() in the "print fmt" section of the tracepoint. Addresses-Google-Bug: 3138508 Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Diffstat (limited to 'include/trace')
-rw-r--r--include/trace/events/ext4.h329
-rw-r--r--include/trace/events/jbd2.h78
2 files changed, 251 insertions, 156 deletions
diff --git a/include/trace/events/ext4.h b/include/trace/events/ext4.h
index b5f4938d612d..8f59db107bbb 100644
--- a/include/trace/events/ext4.h
+++ b/include/trace/events/ext4.h
@@ -21,7 +21,8 @@ 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( dev_t, dev ) 24 __field( int, dev_major )
25 __field( int, dev_minor )
25 __field( ino_t, ino ) 26 __field( ino_t, ino )
26 __field( umode_t, mode ) 27 __field( umode_t, mode )
27 __field( uid_t, uid ) 28 __field( uid_t, uid )
@@ -30,7 +31,8 @@ TRACE_EVENT(ext4_free_inode,
30 ), 31 ),
31 32
32 TP_fast_assign( 33 TP_fast_assign(
33 __entry->dev = inode->i_sb->s_dev; 34 __entry->dev_major = MAJOR(inode->i_sb->s_dev);
35 __entry->dev_minor = MINOR(inode->i_sb->s_dev);
34 __entry->ino = inode->i_ino; 36 __entry->ino = inode->i_ino;
35 __entry->mode = inode->i_mode; 37 __entry->mode = inode->i_mode;
36 __entry->uid = inode->i_uid; 38 __entry->uid = inode->i_uid;
@@ -38,9 +40,10 @@ TRACE_EVENT(ext4_free_inode,
38 __entry->blocks = inode->i_blocks; 40 __entry->blocks = inode->i_blocks;
39 ), 41 ),
40 42
41 TP_printk("dev %s ino %lu mode 0%o uid %u gid %u blocks %llu", 43 TP_printk("dev %d,%d ino %lu mode 0%o uid %u gid %u blocks %llu",
42 jbd2_dev_to_name(__entry->dev), (unsigned long) __entry->ino, 44 __entry->dev_major, __entry->dev_minor,
43 __entry->mode, __entry->uid, __entry->gid, 45 (unsigned long) __entry->ino, __entry->mode,
46 __entry->uid, __entry->gid,
44 (unsigned long long) __entry->blocks) 47 (unsigned long long) __entry->blocks)
45); 48);
46 49
@@ -50,20 +53,22 @@ TRACE_EVENT(ext4_request_inode,
50 TP_ARGS(dir, mode), 53 TP_ARGS(dir, mode),
51 54
52 TP_STRUCT__entry( 55 TP_STRUCT__entry(
53 __field( dev_t, dev ) 56 __field( int, dev_major )
57 __field( int, dev_minor )
54 __field( ino_t, dir ) 58 __field( ino_t, dir )
55 __field( umode_t, mode ) 59 __field( umode_t, mode )
56 ), 60 ),
57 61
58 TP_fast_assign( 62 TP_fast_assign(
59 __entry->dev = dir->i_sb->s_dev; 63 __entry->dev_major = MAJOR(dir->i_sb->s_dev);
64 __entry->dev_minor = MINOR(dir->i_sb->s_dev);
60 __entry->dir = dir->i_ino; 65 __entry->dir = dir->i_ino;
61 __entry->mode = mode; 66 __entry->mode = mode;
62 ), 67 ),
63 68
64 TP_printk("dev %s dir %lu mode 0%o", 69 TP_printk("dev %d,%d dir %lu mode 0%o",
65 jbd2_dev_to_name(__entry->dev), (unsigned long) __entry->dir, 70 __entry->dev_major, __entry->dev_minor,
66 __entry->mode) 71 (unsigned long) __entry->dir, __entry->mode)
67); 72);
68 73
69TRACE_EVENT(ext4_allocate_inode, 74TRACE_EVENT(ext4_allocate_inode,
@@ -72,21 +77,24 @@ TRACE_EVENT(ext4_allocate_inode,
72 TP_ARGS(inode, dir, mode), 77 TP_ARGS(inode, dir, mode),
73 78
74 TP_STRUCT__entry( 79 TP_STRUCT__entry(
75 __field( dev_t, dev ) 80 __field( int, dev_major )
81 __field( int, dev_minor )
76 __field( ino_t, ino ) 82 __field( ino_t, ino )
77 __field( ino_t, dir ) 83 __field( ino_t, dir )
78 __field( umode_t, mode ) 84 __field( umode_t, mode )
79 ), 85 ),
80 86
81 TP_fast_assign( 87 TP_fast_assign(
82 __entry->dev = inode->i_sb->s_dev; 88 __entry->dev_major = MAJOR(inode->i_sb->s_dev);
89 __entry->dev_minor = MINOR(inode->i_sb->s_dev);
83 __entry->ino = inode->i_ino; 90 __entry->ino = inode->i_ino;
84 __entry->dir = dir->i_ino; 91 __entry->dir = dir->i_ino;
85 __entry->mode = mode; 92 __entry->mode = mode;
86 ), 93 ),
87 94
88 TP_printk("dev %s ino %lu dir %lu mode 0%o", 95 TP_printk("dev %d,%d ino %lu dir %lu mode 0%o",
89 jbd2_dev_to_name(__entry->dev), (unsigned long) __entry->ino, 96 __entry->dev_major, __entry->dev_minor,
97 (unsigned long) __entry->ino,
90 (unsigned long) __entry->dir, __entry->mode) 98 (unsigned long) __entry->dir, __entry->mode)
91); 99);
92 100
@@ -98,7 +106,8 @@ DECLARE_EVENT_CLASS(ext4__write_begin,
98 TP_ARGS(inode, pos, len, flags), 106 TP_ARGS(inode, pos, len, flags),
99 107
100 TP_STRUCT__entry( 108 TP_STRUCT__entry(
101 __field( dev_t, dev ) 109 __field( int, dev_major )
110 __field( int, dev_minor )
102 __field( ino_t, ino ) 111 __field( ino_t, ino )
103 __field( loff_t, pos ) 112 __field( loff_t, pos )
104 __field( unsigned int, len ) 113 __field( unsigned int, len )
@@ -106,15 +115,17 @@ DECLARE_EVENT_CLASS(ext4__write_begin,
106 ), 115 ),
107 116
108 TP_fast_assign( 117 TP_fast_assign(
109 __entry->dev = inode->i_sb->s_dev; 118 __entry->dev_major = MAJOR(inode->i_sb->s_dev);
119 __entry->dev_minor = MINOR(inode->i_sb->s_dev);
110 __entry->ino = inode->i_ino; 120 __entry->ino = inode->i_ino;
111 __entry->pos = pos; 121 __entry->pos = pos;
112 __entry->len = len; 122 __entry->len = len;
113 __entry->flags = flags; 123 __entry->flags = flags;
114 ), 124 ),
115 125
116 TP_printk("dev %s ino %lu pos %llu len %u flags %u", 126 TP_printk("dev %d,%d ino %lu pos %llu len %u flags %u",
117 jbd2_dev_to_name(__entry->dev), (unsigned long) __entry->ino, 127 __entry->dev_major, __entry->dev_minor,
128 (unsigned long) __entry->ino,
118 __entry->pos, __entry->len, __entry->flags) 129 __entry->pos, __entry->len, __entry->flags)
119); 130);
120 131
@@ -141,7 +152,8 @@ DECLARE_EVENT_CLASS(ext4__write_end,
141 TP_ARGS(inode, pos, len, copied), 152 TP_ARGS(inode, pos, len, copied),
142 153
143 TP_STRUCT__entry( 154 TP_STRUCT__entry(
144 __field( dev_t, dev ) 155 __field( int, dev_major )
156 __field( int, dev_minor )
145 __field( ino_t, ino ) 157 __field( ino_t, ino )
146 __field( loff_t, pos ) 158 __field( loff_t, pos )
147 __field( unsigned int, len ) 159 __field( unsigned int, len )
@@ -149,16 +161,18 @@ DECLARE_EVENT_CLASS(ext4__write_end,
149 ), 161 ),
150 162
151 TP_fast_assign( 163 TP_fast_assign(
152 __entry->dev = inode->i_sb->s_dev; 164 __entry->dev_major = MAJOR(inode->i_sb->s_dev);
165 __entry->dev_minor = MINOR(inode->i_sb->s_dev);
153 __entry->ino = inode->i_ino; 166 __entry->ino = inode->i_ino;
154 __entry->pos = pos; 167 __entry->pos = pos;
155 __entry->len = len; 168 __entry->len = len;
156 __entry->copied = copied; 169 __entry->copied = copied;
157 ), 170 ),
158 171
159 TP_printk("dev %s ino %lu pos %llu len %u copied %u", 172 TP_printk("dev %d,%d ino %lu pos %llu len %u copied %u",
160 jbd2_dev_to_name(__entry->dev), (unsigned long) __entry->ino, 173 __entry->dev_major, __entry->dev_minor,
161 __entry->pos, __entry->len, __entry->copied) 174 (unsigned long) __entry->ino, __entry->pos,
175 __entry->len, __entry->copied)
162); 176);
163 177
164DEFINE_EVENT(ext4__write_end, ext4_ordered_write_end, 178DEFINE_EVENT(ext4__write_end, ext4_ordered_write_end,
@@ -199,21 +213,23 @@ TRACE_EVENT(ext4_writepage,
199 TP_ARGS(inode, page), 213 TP_ARGS(inode, page),
200 214
201 TP_STRUCT__entry( 215 TP_STRUCT__entry(
202 __field( dev_t, dev ) 216 __field( int, dev_major )
217 __field( int, dev_minor )
203 __field( ino_t, ino ) 218 __field( ino_t, ino )
204 __field( pgoff_t, index ) 219 __field( pgoff_t, index )
205 220
206 ), 221 ),
207 222
208 TP_fast_assign( 223 TP_fast_assign(
209 __entry->dev = inode->i_sb->s_dev; 224 __entry->dev_major = MAJOR(inode->i_sb->s_dev);
225 __entry->dev_minor = MINOR(inode->i_sb->s_dev);
210 __entry->ino = inode->i_ino; 226 __entry->ino = inode->i_ino;
211 __entry->index = page->index; 227 __entry->index = page->index;
212 ), 228 ),
213 229
214 TP_printk("dev %s ino %lu page_index %lu", 230 TP_printk("dev %d,%d ino %lu page_index %lu",
215 jbd2_dev_to_name(__entry->dev), (unsigned long) __entry->ino, 231 __entry->dev_major, __entry->dev_minor,
216 __entry->index) 232 (unsigned long) __entry->ino, __entry->index)
217); 233);
218 234
219TRACE_EVENT(ext4_da_writepages, 235TRACE_EVENT(ext4_da_writepages,
@@ -222,7 +238,8 @@ TRACE_EVENT(ext4_da_writepages,
222 TP_ARGS(inode, wbc), 238 TP_ARGS(inode, wbc),
223 239
224 TP_STRUCT__entry( 240 TP_STRUCT__entry(
225 __field( dev_t, dev ) 241 __field( int, dev_major )
242 __field( int, dev_minor )
226 __field( ino_t, ino ) 243 __field( ino_t, ino )
227 __field( long, nr_to_write ) 244 __field( long, nr_to_write )
228 __field( long, pages_skipped ) 245 __field( long, pages_skipped )
@@ -236,7 +253,8 @@ TRACE_EVENT(ext4_da_writepages,
236 ), 253 ),
237 254
238 TP_fast_assign( 255 TP_fast_assign(
239 __entry->dev = inode->i_sb->s_dev; 256 __entry->dev_major = MAJOR(inode->i_sb->s_dev);
257 __entry->dev_minor = MINOR(inode->i_sb->s_dev);
240 __entry->ino = inode->i_ino; 258 __entry->ino = inode->i_ino;
241 __entry->nr_to_write = wbc->nr_to_write; 259 __entry->nr_to_write = wbc->nr_to_write;
242 __entry->pages_skipped = wbc->pages_skipped; 260 __entry->pages_skipped = wbc->pages_skipped;
@@ -249,8 +267,8 @@ TRACE_EVENT(ext4_da_writepages,
249 __entry->writeback_index = inode->i_mapping->writeback_index; 267 __entry->writeback_index = inode->i_mapping->writeback_index;
250 ), 268 ),
251 269
252 TP_printk("dev %s ino %lu nr_to_write %ld pages_skipped %ld range_start %llu range_end %llu nonblocking %d for_kupdate %d for_reclaim %d range_cyclic %d writeback_index %lu", 270 TP_printk("dev %d,%d ino %lu nr_to_write %ld pages_skipped %ld range_start %llu range_end %llu nonblocking %d for_kupdate %d for_reclaim %d range_cyclic %d writeback_index %lu",
253 jbd2_dev_to_name(__entry->dev), 271 __entry->dev_major, __entry->dev_minor,
254 (unsigned long) __entry->ino, __entry->nr_to_write, 272 (unsigned long) __entry->ino, __entry->nr_to_write,
255 __entry->pages_skipped, __entry->range_start, 273 __entry->pages_skipped, __entry->range_start,
256 __entry->range_end, __entry->nonblocking, 274 __entry->range_end, __entry->nonblocking,
@@ -265,7 +283,8 @@ TRACE_EVENT(ext4_da_write_pages,
265 TP_ARGS(inode, mpd), 283 TP_ARGS(inode, mpd),
266 284
267 TP_STRUCT__entry( 285 TP_STRUCT__entry(
268 __field( dev_t, dev ) 286 __field( int, dev_major )
287 __field( int, dev_minor )
269 __field( ino_t, ino ) 288 __field( ino_t, ino )
270 __field( __u64, b_blocknr ) 289 __field( __u64, b_blocknr )
271 __field( __u32, b_size ) 290 __field( __u32, b_size )
@@ -276,7 +295,8 @@ TRACE_EVENT(ext4_da_write_pages,
276 ), 295 ),
277 296
278 TP_fast_assign( 297 TP_fast_assign(
279 __entry->dev = inode->i_sb->s_dev; 298 __entry->dev_major = MAJOR(inode->i_sb->s_dev);
299 __entry->dev_minor = MINOR(inode->i_sb->s_dev);
280 __entry->ino = inode->i_ino; 300 __entry->ino = inode->i_ino;
281 __entry->b_blocknr = mpd->b_blocknr; 301 __entry->b_blocknr = mpd->b_blocknr;
282 __entry->b_size = mpd->b_size; 302 __entry->b_size = mpd->b_size;
@@ -286,8 +306,9 @@ TRACE_EVENT(ext4_da_write_pages,
286 __entry->pages_written = mpd->pages_written; 306 __entry->pages_written = mpd->pages_written;
287 ), 307 ),
288 308
289 TP_printk("dev %s ino %lu b_blocknr %llu b_size %u b_state 0x%04x first_page %lu io_done %d pages_written %d", 309 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",
290 jbd2_dev_to_name(__entry->dev), (unsigned long) __entry->ino, 310 __entry->dev_major, __entry->dev_minor,
311 (unsigned long) __entry->ino,
291 __entry->b_blocknr, __entry->b_size, 312 __entry->b_blocknr, __entry->b_size,
292 __entry->b_state, __entry->first_page, 313 __entry->b_state, __entry->first_page,
293 __entry->io_done, __entry->pages_written) 314 __entry->io_done, __entry->pages_written)
@@ -300,7 +321,8 @@ TRACE_EVENT(ext4_da_writepages_result,
300 TP_ARGS(inode, wbc, ret, pages_written), 321 TP_ARGS(inode, wbc, ret, pages_written),
301 322
302 TP_STRUCT__entry( 323 TP_STRUCT__entry(
303 __field( dev_t, dev ) 324 __field( int, dev_major )
325 __field( int, dev_minor )
304 __field( ino_t, ino ) 326 __field( ino_t, ino )
305 __field( int, ret ) 327 __field( int, ret )
306 __field( int, pages_written ) 328 __field( int, pages_written )
@@ -310,7 +332,8 @@ TRACE_EVENT(ext4_da_writepages_result,
310 ), 332 ),
311 333
312 TP_fast_assign( 334 TP_fast_assign(
313 __entry->dev = inode->i_sb->s_dev; 335 __entry->dev_major = MAJOR(inode->i_sb->s_dev);
336 __entry->dev_minor = MINOR(inode->i_sb->s_dev);
314 __entry->ino = inode->i_ino; 337 __entry->ino = inode->i_ino;
315 __entry->ret = ret; 338 __entry->ret = ret;
316 __entry->pages_written = pages_written; 339 __entry->pages_written = pages_written;
@@ -319,8 +342,8 @@ TRACE_EVENT(ext4_da_writepages_result,
319 __entry->writeback_index = inode->i_mapping->writeback_index; 342 __entry->writeback_index = inode->i_mapping->writeback_index;
320 ), 343 ),
321 344
322 TP_printk("dev %s ino %lu ret %d pages_written %d pages_skipped %ld more_io %d writeback_index %lu", 345 TP_printk("dev %d,%d ino %lu ret %d pages_written %d pages_skipped %ld more_io %d writeback_index %lu",
323 jbd2_dev_to_name(__entry->dev), 346 __entry->dev_major, __entry->dev_minor,
324 (unsigned long) __entry->ino, __entry->ret, 347 (unsigned long) __entry->ino, __entry->ret,
325 __entry->pages_written, __entry->pages_skipped, 348 __entry->pages_written, __entry->pages_skipped,
326 __entry->more_io, 349 __entry->more_io,
@@ -334,20 +357,23 @@ TRACE_EVENT(ext4_discard_blocks,
334 TP_ARGS(sb, blk, count), 357 TP_ARGS(sb, blk, count),
335 358
336 TP_STRUCT__entry( 359 TP_STRUCT__entry(
337 __field( dev_t, dev ) 360 __field( int, dev_major )
361 __field( int, dev_minor )
338 __field( __u64, blk ) 362 __field( __u64, blk )
339 __field( __u64, count ) 363 __field( __u64, count )
340 364
341 ), 365 ),
342 366
343 TP_fast_assign( 367 TP_fast_assign(
344 __entry->dev = sb->s_dev; 368 __entry->dev_major = MAJOR(sb->s_dev);
369 __entry->dev_minor = MINOR(sb->s_dev);
345 __entry->blk = blk; 370 __entry->blk = blk;
346 __entry->count = count; 371 __entry->count = count;
347 ), 372 ),
348 373
349 TP_printk("dev %s blk %llu count %llu", 374 TP_printk("dev %d,%d blk %llu count %llu",
350 jbd2_dev_to_name(__entry->dev), __entry->blk, __entry->count) 375 __entry->dev_major, __entry->dev_minor,
376 __entry->blk, __entry->count)
351); 377);
352 378
353DECLARE_EVENT_CLASS(ext4__mb_new_pa, 379DECLARE_EVENT_CLASS(ext4__mb_new_pa,
@@ -357,7 +383,8 @@ DECLARE_EVENT_CLASS(ext4__mb_new_pa,
357 TP_ARGS(ac, pa), 383 TP_ARGS(ac, pa),
358 384
359 TP_STRUCT__entry( 385 TP_STRUCT__entry(
360 __field( dev_t, dev ) 386 __field( int, dev_major )
387 __field( int, dev_minor )
361 __field( ino_t, ino ) 388 __field( ino_t, ino )
362 __field( __u64, pa_pstart ) 389 __field( __u64, pa_pstart )
363 __field( __u32, pa_len ) 390 __field( __u32, pa_len )
@@ -366,16 +393,18 @@ DECLARE_EVENT_CLASS(ext4__mb_new_pa,
366 ), 393 ),
367 394
368 TP_fast_assign( 395 TP_fast_assign(
369 __entry->dev = ac->ac_sb->s_dev; 396 __entry->dev_major = MAJOR(ac->ac_sb->s_dev);
397 __entry->dev_minor = MINOR(ac->ac_sb->s_dev);
370 __entry->ino = ac->ac_inode->i_ino; 398 __entry->ino = ac->ac_inode->i_ino;
371 __entry->pa_pstart = pa->pa_pstart; 399 __entry->pa_pstart = pa->pa_pstart;
372 __entry->pa_len = pa->pa_len; 400 __entry->pa_len = pa->pa_len;
373 __entry->pa_lstart = pa->pa_lstart; 401 __entry->pa_lstart = pa->pa_lstart;
374 ), 402 ),
375 403
376 TP_printk("dev %s ino %lu pstart %llu len %u lstart %llu", 404 TP_printk("dev %d,%d ino %lu pstart %llu len %u lstart %llu",
377 jbd2_dev_to_name(__entry->dev), (unsigned long) __entry->ino, 405 __entry->dev_major, __entry->dev_minor,
378 __entry->pa_pstart, __entry->pa_len, __entry->pa_lstart) 406 (unsigned long) __entry->ino, __entry->pa_pstart,
407 __entry->pa_len, __entry->pa_lstart)
379); 408);
380 409
381DEFINE_EVENT(ext4__mb_new_pa, ext4_mb_new_inode_pa, 410DEFINE_EVENT(ext4__mb_new_pa, ext4_mb_new_inode_pa,
@@ -403,7 +432,8 @@ TRACE_EVENT(ext4_mb_release_inode_pa,
403 TP_ARGS(sb, inode, pa, block, count), 432 TP_ARGS(sb, inode, pa, block, count),
404 433
405 TP_STRUCT__entry( 434 TP_STRUCT__entry(
406 __field( dev_t, dev ) 435 __field( int, dev_major )
436 __field( int, dev_minor )
407 __field( ino_t, ino ) 437 __field( ino_t, ino )
408 __field( __u64, block ) 438 __field( __u64, block )
409 __field( __u32, count ) 439 __field( __u32, count )
@@ -411,15 +441,16 @@ TRACE_EVENT(ext4_mb_release_inode_pa,
411 ), 441 ),
412 442
413 TP_fast_assign( 443 TP_fast_assign(
414 __entry->dev = sb->s_dev; 444 __entry->dev_major = MAJOR(sb->s_dev);
445 __entry->dev_minor = MINOR(sb->s_dev);
415 __entry->ino = inode->i_ino; 446 __entry->ino = inode->i_ino;
416 __entry->block = block; 447 __entry->block = block;
417 __entry->count = count; 448 __entry->count = count;
418 ), 449 ),
419 450
420 TP_printk("dev %s ino %lu block %llu count %u", 451 TP_printk("dev %d,%d ino %lu block %llu count %u",
421 jbd2_dev_to_name(__entry->dev), (unsigned long) __entry->ino, 452 __entry->dev_major, __entry->dev_minor,
422 __entry->block, __entry->count) 453 (unsigned long) __entry->ino, __entry->block, __entry->count)
423); 454);
424 455
425TRACE_EVENT(ext4_mb_release_group_pa, 456TRACE_EVENT(ext4_mb_release_group_pa,
@@ -429,20 +460,23 @@ TRACE_EVENT(ext4_mb_release_group_pa,
429 TP_ARGS(sb, pa), 460 TP_ARGS(sb, pa),
430 461
431 TP_STRUCT__entry( 462 TP_STRUCT__entry(
432 __field( dev_t, dev ) 463 __field( int, dev_major )
464 __field( int, dev_minor )
433 __field( __u64, pa_pstart ) 465 __field( __u64, pa_pstart )
434 __field( __u32, pa_len ) 466 __field( __u32, pa_len )
435 467
436 ), 468 ),
437 469
438 TP_fast_assign( 470 TP_fast_assign(
439 __entry->dev = sb->s_dev; 471 __entry->dev_major = MAJOR(sb->s_dev);
472 __entry->dev_minor = MINOR(sb->s_dev);
440 __entry->pa_pstart = pa->pa_pstart; 473 __entry->pa_pstart = pa->pa_pstart;
441 __entry->pa_len = pa->pa_len; 474 __entry->pa_len = pa->pa_len;
442 ), 475 ),
443 476
444 TP_printk("dev %s pstart %llu len %u", 477 TP_printk("dev %d,%d pstart %llu len %u",
445 jbd2_dev_to_name(__entry->dev), __entry->pa_pstart, __entry->pa_len) 478 __entry->dev_major, __entry->dev_minor,
479 __entry->pa_pstart, __entry->pa_len)
446); 480);
447 481
448TRACE_EVENT(ext4_discard_preallocations, 482TRACE_EVENT(ext4_discard_preallocations,
@@ -451,18 +485,21 @@ TRACE_EVENT(ext4_discard_preallocations,
451 TP_ARGS(inode), 485 TP_ARGS(inode),
452 486
453 TP_STRUCT__entry( 487 TP_STRUCT__entry(
454 __field( dev_t, dev ) 488 __field( int, dev_major )
489 __field( int, dev_minor )
455 __field( ino_t, ino ) 490 __field( ino_t, ino )
456 491
457 ), 492 ),
458 493
459 TP_fast_assign( 494 TP_fast_assign(
460 __entry->dev = inode->i_sb->s_dev; 495 __entry->dev_major = MAJOR(inode->i_sb->s_dev);
496 __entry->dev_minor = MINOR(inode->i_sb->s_dev);
461 __entry->ino = inode->i_ino; 497 __entry->ino = inode->i_ino;
462 ), 498 ),
463 499
464 TP_printk("dev %s ino %lu", 500 TP_printk("dev %d,%d ino %lu",
465 jbd2_dev_to_name(__entry->dev), (unsigned long) __entry->ino) 501 __entry->dev_major, __entry->dev_minor,
502 (unsigned long) __entry->ino)
466); 503);
467 504
468TRACE_EVENT(ext4_mb_discard_preallocations, 505TRACE_EVENT(ext4_mb_discard_preallocations,
@@ -471,18 +508,20 @@ TRACE_EVENT(ext4_mb_discard_preallocations,
471 TP_ARGS(sb, needed), 508 TP_ARGS(sb, needed),
472 509
473 TP_STRUCT__entry( 510 TP_STRUCT__entry(
474 __field( dev_t, dev ) 511 __field( int, dev_major )
512 __field( int, dev_minor )
475 __field( int, needed ) 513 __field( int, needed )
476 514
477 ), 515 ),
478 516
479 TP_fast_assign( 517 TP_fast_assign(
480 __entry->dev = sb->s_dev; 518 __entry->dev_major = MAJOR(sb->s_dev);
519 __entry->dev_minor = MINOR(sb->s_dev);
481 __entry->needed = needed; 520 __entry->needed = needed;
482 ), 521 ),
483 522
484 TP_printk("dev %s needed %d", 523 TP_printk("dev %d,%d needed %d",
485 jbd2_dev_to_name(__entry->dev), __entry->needed) 524 __entry->dev_major, __entry->dev_minor, __entry->needed)
486); 525);
487 526
488TRACE_EVENT(ext4_request_blocks, 527TRACE_EVENT(ext4_request_blocks,
@@ -491,7 +530,8 @@ TRACE_EVENT(ext4_request_blocks,
491 TP_ARGS(ar), 530 TP_ARGS(ar),
492 531
493 TP_STRUCT__entry( 532 TP_STRUCT__entry(
494 __field( dev_t, dev ) 533 __field( int, dev_major )
534 __field( int, dev_minor )
495 __field( ino_t, ino ) 535 __field( ino_t, ino )
496 __field( unsigned int, flags ) 536 __field( unsigned int, flags )
497 __field( unsigned int, len ) 537 __field( unsigned int, len )
@@ -504,7 +544,8 @@ TRACE_EVENT(ext4_request_blocks,
504 ), 544 ),
505 545
506 TP_fast_assign( 546 TP_fast_assign(
507 __entry->dev = ar->inode->i_sb->s_dev; 547 __entry->dev_major = MAJOR(ar->inode->i_sb->s_dev);
548 __entry->dev_minor = MINOR(ar->inode->i_sb->s_dev);
508 __entry->ino = ar->inode->i_ino; 549 __entry->ino = ar->inode->i_ino;
509 __entry->flags = ar->flags; 550 __entry->flags = ar->flags;
510 __entry->len = ar->len; 551 __entry->len = ar->len;
@@ -516,8 +557,9 @@ TRACE_EVENT(ext4_request_blocks,
516 __entry->pright = ar->pright; 557 __entry->pright = ar->pright;
517 ), 558 ),
518 559
519 TP_printk("dev %s ino %lu flags %u len %u lblk %llu goal %llu lleft %llu lright %llu pleft %llu pright %llu ", 560 TP_printk("dev %d,%d ino %lu flags %u len %u lblk %llu goal %llu lleft %llu lright %llu pleft %llu pright %llu ",
520 jbd2_dev_to_name(__entry->dev), (unsigned long) __entry->ino, 561 __entry->dev_major, __entry->dev_minor,
562 (unsigned long) __entry->ino,
521 __entry->flags, __entry->len, 563 __entry->flags, __entry->len,
522 (unsigned long long) __entry->logical, 564 (unsigned long long) __entry->logical,
523 (unsigned long long) __entry->goal, 565 (unsigned long long) __entry->goal,
@@ -533,7 +575,8 @@ TRACE_EVENT(ext4_allocate_blocks,
533 TP_ARGS(ar, block), 575 TP_ARGS(ar, block),
534 576
535 TP_STRUCT__entry( 577 TP_STRUCT__entry(
536 __field( dev_t, dev ) 578 __field( int, dev_major )
579 __field( int, dev_minor )
537 __field( ino_t, ino ) 580 __field( ino_t, ino )
538 __field( __u64, block ) 581 __field( __u64, block )
539 __field( unsigned int, flags ) 582 __field( unsigned int, flags )
@@ -547,7 +590,8 @@ TRACE_EVENT(ext4_allocate_blocks,
547 ), 590 ),
548 591
549 TP_fast_assign( 592 TP_fast_assign(
550 __entry->dev = ar->inode->i_sb->s_dev; 593 __entry->dev_major = MAJOR(ar->inode->i_sb->s_dev);
594 __entry->dev_minor = MINOR(ar->inode->i_sb->s_dev);
551 __entry->ino = ar->inode->i_ino; 595 __entry->ino = ar->inode->i_ino;
552 __entry->block = block; 596 __entry->block = block;
553 __entry->flags = ar->flags; 597 __entry->flags = ar->flags;
@@ -560,9 +604,10 @@ TRACE_EVENT(ext4_allocate_blocks,
560 __entry->pright = ar->pright; 604 __entry->pright = ar->pright;
561 ), 605 ),
562 606
563 TP_printk("dev %s ino %lu flags %u len %u block %llu lblk %llu goal %llu lleft %llu lright %llu pleft %llu pright %llu ", 607 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 ",
564 jbd2_dev_to_name(__entry->dev), (unsigned long) __entry->ino, 608 __entry->dev_major, __entry->dev_minor,
565 __entry->flags, __entry->len, __entry->block, 609 (unsigned long) __entry->ino, __entry->flags,
610 __entry->len, __entry->block,
566 (unsigned long long) __entry->logical, 611 (unsigned long long) __entry->logical,
567 (unsigned long long) __entry->goal, 612 (unsigned long long) __entry->goal,
568 (unsigned long long) __entry->lleft, 613 (unsigned long long) __entry->lleft,
@@ -578,7 +623,8 @@ TRACE_EVENT(ext4_free_blocks,
578 TP_ARGS(inode, block, count, flags), 623 TP_ARGS(inode, block, count, flags),
579 624
580 TP_STRUCT__entry( 625 TP_STRUCT__entry(
581 __field( dev_t, dev ) 626 __field( int, dev_major )
627 __field( int, dev_minor )
582 __field( ino_t, ino ) 628 __field( ino_t, ino )
583 __field( umode_t, mode ) 629 __field( umode_t, mode )
584 __field( __u64, block ) 630 __field( __u64, block )
@@ -587,7 +633,8 @@ TRACE_EVENT(ext4_free_blocks,
587 ), 633 ),
588 634
589 TP_fast_assign( 635 TP_fast_assign(
590 __entry->dev = inode->i_sb->s_dev; 636 __entry->dev_major = MAJOR(inode->i_sb->s_dev);
637 __entry->dev_minor = MINOR(inode->i_sb->s_dev);
591 __entry->ino = inode->i_ino; 638 __entry->ino = inode->i_ino;
592 __entry->mode = inode->i_mode; 639 __entry->mode = inode->i_mode;
593 __entry->block = block; 640 __entry->block = block;
@@ -595,8 +642,9 @@ TRACE_EVENT(ext4_free_blocks,
595 __entry->flags = flags; 642 __entry->flags = flags;
596 ), 643 ),
597 644
598 TP_printk("dev %s ino %lu mode 0%o block %llu count %lu flags %d", 645 TP_printk("dev %d,%d ino %lu mode 0%o block %llu count %lu flags %d",
599 jbd2_dev_to_name(__entry->dev), (unsigned long) __entry->ino, 646 __entry->dev_major, __entry->dev_minor,
647 (unsigned long) __entry->ino,
600 __entry->mode, __entry->block, __entry->count, 648 __entry->mode, __entry->block, __entry->count,
601 __entry->flags) 649 __entry->flags)
602); 650);
@@ -607,7 +655,8 @@ TRACE_EVENT(ext4_sync_file,
607 TP_ARGS(file, datasync), 655 TP_ARGS(file, datasync),
608 656
609 TP_STRUCT__entry( 657 TP_STRUCT__entry(
610 __field( dev_t, dev ) 658 __field( int, dev_major )
659 __field( int, dev_minor )
611 __field( ino_t, ino ) 660 __field( ino_t, ino )
612 __field( ino_t, parent ) 661 __field( ino_t, parent )
613 __field( int, datasync ) 662 __field( int, datasync )
@@ -616,14 +665,16 @@ TRACE_EVENT(ext4_sync_file,
616 TP_fast_assign( 665 TP_fast_assign(
617 struct dentry *dentry = file->f_path.dentry; 666 struct dentry *dentry = file->f_path.dentry;
618 667
619 __entry->dev = dentry->d_inode->i_sb->s_dev; 668 __entry->dev_major = MAJOR(dentry->d_inode->i_sb->s_dev);
669 __entry->dev_minor = MINOR(dentry->d_inode->i_sb->s_dev);
620 __entry->ino = dentry->d_inode->i_ino; 670 __entry->ino = dentry->d_inode->i_ino;
621 __entry->datasync = datasync; 671 __entry->datasync = datasync;
622 __entry->parent = dentry->d_parent->d_inode->i_ino; 672 __entry->parent = dentry->d_parent->d_inode->i_ino;
623 ), 673 ),
624 674
625 TP_printk("dev %s ino %ld parent %ld datasync %d ", 675 TP_printk("dev %d,%d ino %ld parent %ld datasync %d ",
626 jbd2_dev_to_name(__entry->dev), (unsigned long) __entry->ino, 676 __entry->dev_major, __entry->dev_minor,
677 (unsigned long) __entry->ino,
627 (unsigned long) __entry->parent, __entry->datasync) 678 (unsigned long) __entry->parent, __entry->datasync)
628); 679);
629 680
@@ -633,18 +684,20 @@ TRACE_EVENT(ext4_sync_fs,
633 TP_ARGS(sb, wait), 684 TP_ARGS(sb, wait),
634 685
635 TP_STRUCT__entry( 686 TP_STRUCT__entry(
636 __field( dev_t, dev ) 687 __field( int, dev_major )
688 __field( int, dev_minor )
637 __field( int, wait ) 689 __field( int, wait )
638 690
639 ), 691 ),
640 692
641 TP_fast_assign( 693 TP_fast_assign(
642 __entry->dev = sb->s_dev; 694 __entry->dev_major = MAJOR(sb->s_dev);
695 __entry->dev_minor = MINOR(sb->s_dev);
643 __entry->wait = wait; 696 __entry->wait = wait;
644 ), 697 ),
645 698
646 TP_printk("dev %s wait %d", jbd2_dev_to_name(__entry->dev), 699 TP_printk("dev %d,%d wait %d", __entry->dev_major,
647 __entry->wait) 700 __entry->dev_minor, __entry->wait)
648); 701);
649 702
650TRACE_EVENT(ext4_alloc_da_blocks, 703TRACE_EVENT(ext4_alloc_da_blocks,
@@ -653,21 +706,24 @@ TRACE_EVENT(ext4_alloc_da_blocks,
653 TP_ARGS(inode), 706 TP_ARGS(inode),
654 707
655 TP_STRUCT__entry( 708 TP_STRUCT__entry(
656 __field( dev_t, dev ) 709 __field( int, dev_major )
710 __field( int, dev_minor )
657 __field( ino_t, ino ) 711 __field( ino_t, ino )
658 __field( unsigned int, data_blocks ) 712 __field( unsigned int, data_blocks )
659 __field( unsigned int, meta_blocks ) 713 __field( unsigned int, meta_blocks )
660 ), 714 ),
661 715
662 TP_fast_assign( 716 TP_fast_assign(
663 __entry->dev = inode->i_sb->s_dev; 717 __entry->dev_major = MAJOR(inode->i_sb->s_dev);
718 __entry->dev_minor = MINOR(inode->i_sb->s_dev);
664 __entry->ino = inode->i_ino; 719 __entry->ino = inode->i_ino;
665 __entry->data_blocks = EXT4_I(inode)->i_reserved_data_blocks; 720 __entry->data_blocks = EXT4_I(inode)->i_reserved_data_blocks;
666 __entry->meta_blocks = EXT4_I(inode)->i_reserved_meta_blocks; 721 __entry->meta_blocks = EXT4_I(inode)->i_reserved_meta_blocks;
667 ), 722 ),
668 723
669 TP_printk("dev %s ino %lu data_blocks %u meta_blocks %u", 724 TP_printk("dev %d,%d ino %lu data_blocks %u meta_blocks %u",
670 jbd2_dev_to_name(__entry->dev), (unsigned long) __entry->ino, 725 __entry->dev_major, __entry->dev_minor,
726 (unsigned long) __entry->ino,
671 __entry->data_blocks, __entry->meta_blocks) 727 __entry->data_blocks, __entry->meta_blocks)
672); 728);
673 729
@@ -677,7 +733,8 @@ TRACE_EVENT(ext4_mballoc_alloc,
677 TP_ARGS(ac), 733 TP_ARGS(ac),
678 734
679 TP_STRUCT__entry( 735 TP_STRUCT__entry(
680 __field( dev_t, dev ) 736 __field( int, dev_major )
737 __field( int, dev_minor )
681 __field( ino_t, ino ) 738 __field( ino_t, ino )
682 __field( __u16, found ) 739 __field( __u16, found )
683 __field( __u16, groups ) 740 __field( __u16, groups )
@@ -700,7 +757,8 @@ TRACE_EVENT(ext4_mballoc_alloc,
700 ), 757 ),
701 758
702 TP_fast_assign( 759 TP_fast_assign(
703 __entry->dev = ac->ac_inode->i_sb->s_dev; 760 __entry->dev_major = MAJOR(ac->ac_inode->i_sb->s_dev);
761 __entry->dev_minor = MINOR(ac->ac_inode->i_sb->s_dev);
704 __entry->ino = ac->ac_inode->i_ino; 762 __entry->ino = ac->ac_inode->i_ino;
705 __entry->found = ac->ac_found; 763 __entry->found = ac->ac_found;
706 __entry->flags = ac->ac_flags; 764 __entry->flags = ac->ac_flags;
@@ -722,10 +780,11 @@ TRACE_EVENT(ext4_mballoc_alloc,
722 __entry->result_len = ac->ac_f_ex.fe_len; 780 __entry->result_len = ac->ac_f_ex.fe_len;
723 ), 781 ),
724 782
725 TP_printk("dev %s inode %lu orig %u/%d/%u@%u goal %u/%d/%u@%u " 783 TP_printk("dev %d,%d inode %lu orig %u/%d/%u@%u goal %u/%d/%u@%u "
726 "result %u/%d/%u@%u blks %u grps %u cr %u flags 0x%04x " 784 "result %u/%d/%u@%u blks %u grps %u cr %u flags 0x%04x "
727 "tail %u broken %u", 785 "tail %u broken %u",
728 jbd2_dev_to_name(__entry->dev), (unsigned long) __entry->ino, 786 __entry->dev_major, __entry->dev_minor,
787 (unsigned long) __entry->ino,
729 __entry->orig_group, __entry->orig_start, 788 __entry->orig_group, __entry->orig_start,
730 __entry->orig_len, __entry->orig_logical, 789 __entry->orig_len, __entry->orig_logical,
731 __entry->goal_group, __entry->goal_start, 790 __entry->goal_group, __entry->goal_start,
@@ -743,7 +802,8 @@ TRACE_EVENT(ext4_mballoc_prealloc,
743 TP_ARGS(ac), 802 TP_ARGS(ac),
744 803
745 TP_STRUCT__entry( 804 TP_STRUCT__entry(
746 __field( dev_t, dev ) 805 __field( int, dev_major )
806 __field( int, dev_minor )
747 __field( ino_t, ino ) 807 __field( ino_t, ino )
748 __field( __u32, orig_logical ) 808 __field( __u32, orig_logical )
749 __field( int, orig_start ) 809 __field( int, orig_start )
@@ -756,7 +816,8 @@ TRACE_EVENT(ext4_mballoc_prealloc,
756 ), 816 ),
757 817
758 TP_fast_assign( 818 TP_fast_assign(
759 __entry->dev = ac->ac_inode->i_sb->s_dev; 819 __entry->dev_major = MAJOR(ac->ac_inode->i_sb->s_dev);
820 __entry->dev_minor = MINOR(ac->ac_inode->i_sb->s_dev);
760 __entry->ino = ac->ac_inode->i_ino; 821 __entry->ino = ac->ac_inode->i_ino;
761 __entry->orig_logical = ac->ac_o_ex.fe_logical; 822 __entry->orig_logical = ac->ac_o_ex.fe_logical;
762 __entry->orig_start = ac->ac_o_ex.fe_start; 823 __entry->orig_start = ac->ac_o_ex.fe_start;
@@ -768,8 +829,9 @@ TRACE_EVENT(ext4_mballoc_prealloc,
768 __entry->result_len = ac->ac_b_ex.fe_len; 829 __entry->result_len = ac->ac_b_ex.fe_len;
769 ), 830 ),
770 831
771 TP_printk("dev %s inode %lu orig %u/%d/%u@%u result %u/%d/%u@%u", 832 TP_printk("dev %d,%d inode %lu orig %u/%d/%u@%u result %u/%d/%u@%u",
772 jbd2_dev_to_name(__entry->dev), (unsigned long) __entry->ino, 833 __entry->dev_major, __entry->dev_minor,
834 (unsigned long) __entry->ino,
773 __entry->orig_group, __entry->orig_start, 835 __entry->orig_group, __entry->orig_start,
774 __entry->orig_len, __entry->orig_logical, 836 __entry->orig_len, __entry->orig_logical,
775 __entry->result_group, __entry->result_start, 837 __entry->result_group, __entry->result_start,
@@ -786,7 +848,8 @@ DECLARE_EVENT_CLASS(ext4__mballoc,
786 TP_ARGS(sb, inode, group, start, len), 848 TP_ARGS(sb, inode, group, start, len),
787 849
788 TP_STRUCT__entry( 850 TP_STRUCT__entry(
789 __field( dev_t, dev ) 851 __field( int, dev_major )
852 __field( int, dev_minor )
790 __field( ino_t, ino ) 853 __field( ino_t, ino )
791 __field( int, result_start ) 854 __field( int, result_start )
792 __field( __u32, result_group ) 855 __field( __u32, result_group )
@@ -794,15 +857,17 @@ DECLARE_EVENT_CLASS(ext4__mballoc,
794 ), 857 ),
795 858
796 TP_fast_assign( 859 TP_fast_assign(
797 __entry->dev = sb->s_dev; 860 __entry->dev_major = MAJOR(sb->s_dev);
861 __entry->dev_minor = MINOR(sb->s_dev);
798 __entry->ino = inode ? inode->i_ino : 0; 862 __entry->ino = inode ? inode->i_ino : 0;
799 __entry->result_start = start; 863 __entry->result_start = start;
800 __entry->result_group = group; 864 __entry->result_group = group;
801 __entry->result_len = len; 865 __entry->result_len = len;
802 ), 866 ),
803 867
804 TP_printk("dev %s inode %lu extent %u/%d/%u ", 868 TP_printk("dev %d,%d inode %lu extent %u/%d/%u ",
805 jbd2_dev_to_name(__entry->dev), (unsigned long) __entry->ino, 869 __entry->dev_major, __entry->dev_minor,
870 (unsigned long) __entry->ino,
806 __entry->result_group, __entry->result_start, 871 __entry->result_group, __entry->result_start,
807 __entry->result_len) 872 __entry->result_len)
808); 873);
@@ -835,7 +900,8 @@ TRACE_EVENT(ext4_forget,
835 TP_ARGS(inode, is_metadata, block), 900 TP_ARGS(inode, is_metadata, block),
836 901
837 TP_STRUCT__entry( 902 TP_STRUCT__entry(
838 __field( dev_t, dev ) 903 __field( int, dev_major )
904 __field( int, dev_minor )
839 __field( ino_t, ino ) 905 __field( ino_t, ino )
840 __field( umode_t, mode ) 906 __field( umode_t, mode )
841 __field( int, is_metadata ) 907 __field( int, is_metadata )
@@ -843,16 +909,18 @@ TRACE_EVENT(ext4_forget,
843 ), 909 ),
844 910
845 TP_fast_assign( 911 TP_fast_assign(
846 __entry->dev = inode->i_sb->s_dev; 912 __entry->dev_major = MAJOR(inode->i_sb->s_dev);
913 __entry->dev_minor = MINOR(inode->i_sb->s_dev);
847 __entry->ino = inode->i_ino; 914 __entry->ino = inode->i_ino;
848 __entry->mode = inode->i_mode; 915 __entry->mode = inode->i_mode;
849 __entry->is_metadata = is_metadata; 916 __entry->is_metadata = is_metadata;
850 __entry->block = block; 917 __entry->block = block;
851 ), 918 ),
852 919
853 TP_printk("dev %s ino %lu mode 0%o is_metadata %d block %llu", 920 TP_printk("dev %d,%d ino %lu mode 0%o is_metadata %d block %llu",
854 jbd2_dev_to_name(__entry->dev), (unsigned long) __entry->ino, 921 __entry->dev_major, __entry->dev_minor,
855 __entry->mode, __entry->is_metadata, __entry->block) 922 (unsigned long) __entry->ino, __entry->mode,
923 __entry->is_metadata, __entry->block)
856); 924);
857 925
858TRACE_EVENT(ext4_da_update_reserve_space, 926TRACE_EVENT(ext4_da_update_reserve_space,
@@ -861,7 +929,8 @@ TRACE_EVENT(ext4_da_update_reserve_space,
861 TP_ARGS(inode, used_blocks), 929 TP_ARGS(inode, used_blocks),
862 930
863 TP_STRUCT__entry( 931 TP_STRUCT__entry(
864 __field( dev_t, dev ) 932 __field( int, dev_major )
933 __field( int, dev_minor )
865 __field( ino_t, ino ) 934 __field( ino_t, ino )
866 __field( umode_t, mode ) 935 __field( umode_t, mode )
867 __field( __u64, i_blocks ) 936 __field( __u64, i_blocks )
@@ -872,7 +941,8 @@ TRACE_EVENT(ext4_da_update_reserve_space,
872 ), 941 ),
873 942
874 TP_fast_assign( 943 TP_fast_assign(
875 __entry->dev = inode->i_sb->s_dev; 944 __entry->dev_major = MAJOR(inode->i_sb->s_dev);
945 __entry->dev_minor = MINOR(inode->i_sb->s_dev);
876 __entry->ino = inode->i_ino; 946 __entry->ino = inode->i_ino;
877 __entry->mode = inode->i_mode; 947 __entry->mode = inode->i_mode;
878 __entry->i_blocks = inode->i_blocks; 948 __entry->i_blocks = inode->i_blocks;
@@ -882,9 +952,10 @@ TRACE_EVENT(ext4_da_update_reserve_space,
882 __entry->allocated_meta_blocks = EXT4_I(inode)->i_allocated_meta_blocks; 952 __entry->allocated_meta_blocks = EXT4_I(inode)->i_allocated_meta_blocks;
883 ), 953 ),
884 954
885 TP_printk("dev %s ino %lu mode 0%o i_blocks %llu used_blocks %d reserved_data_blocks %d reserved_meta_blocks %d allocated_meta_blocks %d", 955 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",
886 jbd2_dev_to_name(__entry->dev), (unsigned long) __entry->ino, 956 __entry->dev_major, __entry->dev_minor,
887 __entry->mode, (unsigned long long) __entry->i_blocks, 957 (unsigned long) __entry->ino, __entry->mode,
958 (unsigned long long) __entry->i_blocks,
888 __entry->used_blocks, __entry->reserved_data_blocks, 959 __entry->used_blocks, __entry->reserved_data_blocks,
889 __entry->reserved_meta_blocks, __entry->allocated_meta_blocks) 960 __entry->reserved_meta_blocks, __entry->allocated_meta_blocks)
890); 961);
@@ -895,7 +966,8 @@ TRACE_EVENT(ext4_da_reserve_space,
895 TP_ARGS(inode, md_needed), 966 TP_ARGS(inode, md_needed),
896 967
897 TP_STRUCT__entry( 968 TP_STRUCT__entry(
898 __field( dev_t, dev ) 969 __field( int, dev_major )
970 __field( int, dev_minor )
899 __field( ino_t, ino ) 971 __field( ino_t, ino )
900 __field( umode_t, mode ) 972 __field( umode_t, mode )
901 __field( __u64, i_blocks ) 973 __field( __u64, i_blocks )
@@ -905,7 +977,8 @@ TRACE_EVENT(ext4_da_reserve_space,
905 ), 977 ),
906 978
907 TP_fast_assign( 979 TP_fast_assign(
908 __entry->dev = inode->i_sb->s_dev; 980 __entry->dev_major = MAJOR(inode->i_sb->s_dev);
981 __entry->dev_minor = MINOR(inode->i_sb->s_dev);
909 __entry->ino = inode->i_ino; 982 __entry->ino = inode->i_ino;
910 __entry->mode = inode->i_mode; 983 __entry->mode = inode->i_mode;
911 __entry->i_blocks = inode->i_blocks; 984 __entry->i_blocks = inode->i_blocks;
@@ -914,8 +987,9 @@ TRACE_EVENT(ext4_da_reserve_space,
914 __entry->reserved_meta_blocks = EXT4_I(inode)->i_reserved_meta_blocks; 987 __entry->reserved_meta_blocks = EXT4_I(inode)->i_reserved_meta_blocks;
915 ), 988 ),
916 989
917 TP_printk("dev %s ino %lu mode 0%o i_blocks %llu md_needed %d reserved_data_blocks %d reserved_meta_blocks %d", 990 TP_printk("dev %d,%d ino %lu mode 0%o i_blocks %llu md_needed %d reserved_data_blocks %d reserved_meta_blocks %d",
918 jbd2_dev_to_name(__entry->dev), (unsigned long) __entry->ino, 991 __entry->dev_major, __entry->dev_minor,
992 (unsigned long) __entry->ino,
919 __entry->mode, (unsigned long long) __entry->i_blocks, 993 __entry->mode, (unsigned long long) __entry->i_blocks,
920 __entry->md_needed, __entry->reserved_data_blocks, 994 __entry->md_needed, __entry->reserved_data_blocks,
921 __entry->reserved_meta_blocks) 995 __entry->reserved_meta_blocks)
@@ -927,7 +1001,8 @@ TRACE_EVENT(ext4_da_release_space,
927 TP_ARGS(inode, freed_blocks), 1001 TP_ARGS(inode, freed_blocks),
928 1002
929 TP_STRUCT__entry( 1003 TP_STRUCT__entry(
930 __field( dev_t, dev ) 1004 __field( int, dev_major )
1005 __field( int, dev_minor )
931 __field( ino_t, ino ) 1006 __field( ino_t, ino )
932 __field( umode_t, mode ) 1007 __field( umode_t, mode )
933 __field( __u64, i_blocks ) 1008 __field( __u64, i_blocks )
@@ -938,7 +1013,8 @@ TRACE_EVENT(ext4_da_release_space,
938 ), 1013 ),
939 1014
940 TP_fast_assign( 1015 TP_fast_assign(
941 __entry->dev = inode->i_sb->s_dev; 1016 __entry->dev_major = MAJOR(inode->i_sb->s_dev);
1017 __entry->dev_minor = MINOR(inode->i_sb->s_dev);
942 __entry->ino = inode->i_ino; 1018 __entry->ino = inode->i_ino;
943 __entry->mode = inode->i_mode; 1019 __entry->mode = inode->i_mode;
944 __entry->i_blocks = inode->i_blocks; 1020 __entry->i_blocks = inode->i_blocks;
@@ -948,8 +1024,9 @@ TRACE_EVENT(ext4_da_release_space,
948 __entry->allocated_meta_blocks = EXT4_I(inode)->i_allocated_meta_blocks; 1024 __entry->allocated_meta_blocks = EXT4_I(inode)->i_allocated_meta_blocks;
949 ), 1025 ),
950 1026
951 TP_printk("dev %s ino %lu mode 0%o i_blocks %llu freed_blocks %d reserved_data_blocks %d reserved_meta_blocks %d allocated_meta_blocks %d", 1027 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",
952 jbd2_dev_to_name(__entry->dev), (unsigned long) __entry->ino, 1028 __entry->dev_major, __entry->dev_minor,
1029 (unsigned long) __entry->ino,
953 __entry->mode, (unsigned long long) __entry->i_blocks, 1030 __entry->mode, (unsigned long long) __entry->i_blocks,
954 __entry->freed_blocks, __entry->reserved_data_blocks, 1031 __entry->freed_blocks, __entry->reserved_data_blocks,
955 __entry->reserved_meta_blocks, __entry->allocated_meta_blocks) 1032 __entry->reserved_meta_blocks, __entry->allocated_meta_blocks)
@@ -961,18 +1038,20 @@ DECLARE_EVENT_CLASS(ext4__bitmap_load,
961 TP_ARGS(sb, group), 1038 TP_ARGS(sb, group),
962 1039
963 TP_STRUCT__entry( 1040 TP_STRUCT__entry(
964 __field( dev_t, dev ) 1041 __field( int, dev_major )
1042 __field( int, dev_minor )
965 __field( __u32, group ) 1043 __field( __u32, group )
966 1044
967 ), 1045 ),
968 1046
969 TP_fast_assign( 1047 TP_fast_assign(
970 __entry->dev = sb->s_dev; 1048 __entry->dev_major = MAJOR(sb->s_dev);
1049 __entry->dev_minor = MINOR(sb->s_dev);
971 __entry->group = group; 1050 __entry->group = group;
972 ), 1051 ),
973 1052
974 TP_printk("dev %s group %u", 1053 TP_printk("dev %d,%d group %u",
975 jbd2_dev_to_name(__entry->dev), __entry->group) 1054 __entry->dev_major, __entry->dev_minor, __entry->group)
976); 1055);
977 1056
978DEFINE_EVENT(ext4__bitmap_load, ext4_mb_bitmap_load, 1057DEFINE_EVENT(ext4__bitmap_load, ext4_mb_bitmap_load,
diff --git a/include/trace/events/jbd2.h b/include/trace/events/jbd2.h
index bf16545cc977..7447ea9305b5 100644
--- a/include/trace/events/jbd2.h
+++ b/include/trace/events/jbd2.h
@@ -17,17 +17,19 @@ 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( dev_t, dev ) 20 __field( int, dev_major )
21 __field( int, dev_minor )
21 __field( int, result ) 22 __field( int, result )
22 ), 23 ),
23 24
24 TP_fast_assign( 25 TP_fast_assign(
25 __entry->dev = journal->j_fs_dev->bd_dev; 26 __entry->dev_major = MAJOR(journal->j_fs_dev->bd_dev);
27 __entry->dev_minor = MINOR(journal->j_fs_dev->bd_dev);
26 __entry->result = result; 28 __entry->result = result;
27 ), 29 ),
28 30
29 TP_printk("dev %s result %d", 31 TP_printk("dev %d,%d result %d",
30 jbd2_dev_to_name(__entry->dev), __entry->result) 32 __entry->dev_major, __entry->dev_minor, __entry->result)
31); 33);
32 34
33DECLARE_EVENT_CLASS(jbd2_commit, 35DECLARE_EVENT_CLASS(jbd2_commit,
@@ -37,20 +39,22 @@ DECLARE_EVENT_CLASS(jbd2_commit,
37 TP_ARGS(journal, commit_transaction), 39 TP_ARGS(journal, commit_transaction),
38 40
39 TP_STRUCT__entry( 41 TP_STRUCT__entry(
40 __field( dev_t, dev ) 42 __field( int, dev_major )
43 __field( int, dev_minor )
41 __field( char, sync_commit ) 44 __field( char, sync_commit )
42 __field( int, transaction ) 45 __field( int, transaction )
43 ), 46 ),
44 47
45 TP_fast_assign( 48 TP_fast_assign(
46 __entry->dev = journal->j_fs_dev->bd_dev; 49 __entry->dev_major = MAJOR(journal->j_fs_dev->bd_dev);
50 __entry->dev_minor = MINOR(journal->j_fs_dev->bd_dev);
47 __entry->sync_commit = commit_transaction->t_synchronous_commit; 51 __entry->sync_commit = commit_transaction->t_synchronous_commit;
48 __entry->transaction = commit_transaction->t_tid; 52 __entry->transaction = commit_transaction->t_tid;
49 ), 53 ),
50 54
51 TP_printk("dev %s transaction %d sync %d", 55 TP_printk("dev %d,%d transaction %d sync %d",
52 jbd2_dev_to_name(__entry->dev), __entry->transaction, 56 __entry->dev_major, __entry->dev_minor,
53 __entry->sync_commit) 57 __entry->transaction, __entry->sync_commit)
54); 58);
55 59
56DEFINE_EVENT(jbd2_commit, jbd2_start_commit, 60DEFINE_EVENT(jbd2_commit, jbd2_start_commit,
@@ -87,22 +91,24 @@ TRACE_EVENT(jbd2_end_commit,
87 TP_ARGS(journal, commit_transaction), 91 TP_ARGS(journal, commit_transaction),
88 92
89 TP_STRUCT__entry( 93 TP_STRUCT__entry(
90 __field( dev_t, dev ) 94 __field( int, dev_major )
95 __field( int, dev_minor )
91 __field( char, sync_commit ) 96 __field( char, sync_commit )
92 __field( int, transaction ) 97 __field( int, transaction )
93 __field( int, head ) 98 __field( int, head )
94 ), 99 ),
95 100
96 TP_fast_assign( 101 TP_fast_assign(
97 __entry->dev = journal->j_fs_dev->bd_dev; 102 __entry->dev_major = MAJOR(journal->j_fs_dev->bd_dev);
103 __entry->dev_minor = MINOR(journal->j_fs_dev->bd_dev);
98 __entry->sync_commit = commit_transaction->t_synchronous_commit; 104 __entry->sync_commit = commit_transaction->t_synchronous_commit;
99 __entry->transaction = commit_transaction->t_tid; 105 __entry->transaction = commit_transaction->t_tid;
100 __entry->head = journal->j_tail_sequence; 106 __entry->head = journal->j_tail_sequence;
101 ), 107 ),
102 108
103 TP_printk("dev %s transaction %d sync %d head %d", 109 TP_printk("dev %d,%d transaction %d sync %d head %d",
104 jbd2_dev_to_name(__entry->dev), __entry->transaction, 110 __entry->dev_major, __entry->dev_minor,
105 __entry->sync_commit, __entry->head) 111 __entry->transaction, __entry->sync_commit, __entry->head)
106); 112);
107 113
108TRACE_EVENT(jbd2_submit_inode_data, 114TRACE_EVENT(jbd2_submit_inode_data,
@@ -111,17 +117,20 @@ TRACE_EVENT(jbd2_submit_inode_data,
111 TP_ARGS(inode), 117 TP_ARGS(inode),
112 118
113 TP_STRUCT__entry( 119 TP_STRUCT__entry(
114 __field( dev_t, dev ) 120 __field( int, dev_major )
121 __field( int, dev_minor )
115 __field( ino_t, ino ) 122 __field( ino_t, ino )
116 ), 123 ),
117 124
118 TP_fast_assign( 125 TP_fast_assign(
119 __entry->dev = inode->i_sb->s_dev; 126 __entry->dev_major = MAJOR(inode->i_sb->s_dev);
127 __entry->dev_minor = MINOR(inode->i_sb->s_dev);
120 __entry->ino = inode->i_ino; 128 __entry->ino = inode->i_ino;
121 ), 129 ),
122 130
123 TP_printk("dev %s ino %lu", 131 TP_printk("dev %d,%d ino %lu",
124 jbd2_dev_to_name(__entry->dev), (unsigned long) __entry->ino) 132 __entry->dev_major, __entry->dev_minor,
133 (unsigned long) __entry->ino)
125); 134);
126 135
127TRACE_EVENT(jbd2_run_stats, 136TRACE_EVENT(jbd2_run_stats,
@@ -131,7 +140,8 @@ TRACE_EVENT(jbd2_run_stats,
131 TP_ARGS(dev, tid, stats), 140 TP_ARGS(dev, tid, stats),
132 141
133 TP_STRUCT__entry( 142 TP_STRUCT__entry(
134 __field( dev_t, dev ) 143 __field( int, dev_major )
144 __field( int, dev_minor )
135 __field( unsigned long, tid ) 145 __field( unsigned long, tid )
136 __field( unsigned long, wait ) 146 __field( unsigned long, wait )
137 __field( unsigned long, running ) 147 __field( unsigned long, running )
@@ -144,7 +154,8 @@ TRACE_EVENT(jbd2_run_stats,
144 ), 154 ),
145 155
146 TP_fast_assign( 156 TP_fast_assign(
147 __entry->dev = dev; 157 __entry->dev_major = MAJOR(dev);
158 __entry->dev_minor = MINOR(dev);
148 __entry->tid = tid; 159 __entry->tid = tid;
149 __entry->wait = stats->rs_wait; 160 __entry->wait = stats->rs_wait;
150 __entry->running = stats->rs_running; 161 __entry->running = stats->rs_running;
@@ -156,9 +167,9 @@ TRACE_EVENT(jbd2_run_stats,
156 __entry->blocks_logged = stats->rs_blocks_logged; 167 __entry->blocks_logged = stats->rs_blocks_logged;
157 ), 168 ),
158 169
159 TP_printk("dev %s tid %lu wait %u running %u locked %u flushing %u " 170 TP_printk("dev %d,%d tid %lu wait %u running %u locked %u flushing %u "
160 "logging %u handle_count %u blocks %u blocks_logged %u", 171 "logging %u handle_count %u blocks %u blocks_logged %u",
161 jbd2_dev_to_name(__entry->dev), __entry->tid, 172 __entry->dev_major, __entry->dev_minor, __entry->tid,
162 jiffies_to_msecs(__entry->wait), 173 jiffies_to_msecs(__entry->wait),
163 jiffies_to_msecs(__entry->running), 174 jiffies_to_msecs(__entry->running),
164 jiffies_to_msecs(__entry->locked), 175 jiffies_to_msecs(__entry->locked),
@@ -175,7 +186,8 @@ TRACE_EVENT(jbd2_checkpoint_stats,
175 TP_ARGS(dev, tid, stats), 186 TP_ARGS(dev, tid, stats),
176 187
177 TP_STRUCT__entry( 188 TP_STRUCT__entry(
178 __field( dev_t, dev ) 189 __field( int, dev_major )
190 __field( int, dev_minor )
179 __field( unsigned long, tid ) 191 __field( unsigned long, tid )
180 __field( unsigned long, chp_time ) 192 __field( unsigned long, chp_time )
181 __field( __u32, forced_to_close ) 193 __field( __u32, forced_to_close )
@@ -184,7 +196,8 @@ TRACE_EVENT(jbd2_checkpoint_stats,
184 ), 196 ),
185 197
186 TP_fast_assign( 198 TP_fast_assign(
187 __entry->dev = dev; 199 __entry->dev_major = MAJOR(dev);
200 __entry->dev_minor = MINOR(dev);
188 __entry->tid = tid; 201 __entry->tid = tid;
189 __entry->chp_time = stats->cs_chp_time; 202 __entry->chp_time = stats->cs_chp_time;
190 __entry->forced_to_close= stats->cs_forced_to_close; 203 __entry->forced_to_close= stats->cs_forced_to_close;
@@ -192,9 +205,9 @@ TRACE_EVENT(jbd2_checkpoint_stats,
192 __entry->dropped = stats->cs_dropped; 205 __entry->dropped = stats->cs_dropped;
193 ), 206 ),
194 207
195 TP_printk("dev %s tid %lu chp_time %u forced_to_close %u " 208 TP_printk("dev %d,%d tid %lu chp_time %u forced_to_close %u "
196 "written %u dropped %u", 209 "written %u dropped %u",
197 jbd2_dev_to_name(__entry->dev), __entry->tid, 210 __entry->dev_major, __entry->dev_minor, __entry->tid,
198 jiffies_to_msecs(__entry->chp_time), 211 jiffies_to_msecs(__entry->chp_time),
199 __entry->forced_to_close, __entry->written, __entry->dropped) 212 __entry->forced_to_close, __entry->written, __entry->dropped)
200); 213);
@@ -207,7 +220,8 @@ TRACE_EVENT(jbd2_cleanup_journal_tail,
207 TP_ARGS(journal, first_tid, block_nr, freed), 220 TP_ARGS(journal, first_tid, block_nr, freed),
208 221
209 TP_STRUCT__entry( 222 TP_STRUCT__entry(
210 __field( dev_t, dev ) 223 __field( int, dev_major )
224 __field( int, dev_minor )
211 __field( tid_t, tail_sequence ) 225 __field( tid_t, tail_sequence )
212 __field( tid_t, first_tid ) 226 __field( tid_t, first_tid )
213 __field(unsigned long, block_nr ) 227 __field(unsigned long, block_nr )
@@ -215,16 +229,18 @@ TRACE_EVENT(jbd2_cleanup_journal_tail,
215 ), 229 ),
216 230
217 TP_fast_assign( 231 TP_fast_assign(
218 __entry->dev = journal->j_fs_dev->bd_dev; 232 __entry->dev_major = MAJOR(journal->j_fs_dev->bd_dev);
233 __entry->dev_minor = MINOR(journal->j_fs_dev->bd_dev);
219 __entry->tail_sequence = journal->j_tail_sequence; 234 __entry->tail_sequence = journal->j_tail_sequence;
220 __entry->first_tid = first_tid; 235 __entry->first_tid = first_tid;
221 __entry->block_nr = block_nr; 236 __entry->block_nr = block_nr;
222 __entry->freed = freed; 237 __entry->freed = freed;
223 ), 238 ),
224 239
225 TP_printk("dev %s from %u to %u offset %lu freed %lu", 240 TP_printk("dev %d,%d from %u to %u offset %lu freed %lu",
226 jbd2_dev_to_name(__entry->dev), __entry->tail_sequence, 241 __entry->dev_major, __entry->dev_minor,
227 __entry->first_tid, __entry->block_nr, __entry->freed) 242 __entry->tail_sequence, __entry->first_tid,
243 __entry->block_nr, __entry->freed)
228); 244);
229 245
230#endif /* _TRACE_JBD2_H */ 246#endif /* _TRACE_JBD2_H */