aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTheodore Ts'o <tytso@mit.edu>2011-07-10 22:37:50 -0400
committerTheodore Ts'o <tytso@mit.edu>2011-07-10 22:37:50 -0400
commit12706394bcaa48e3d5e19c97d7b4e5683ebb12fb (patch)
treed2a9effccf0162de6b783cf40fadd0f27c1bd22e
parent4862fd6047ed02e2726667c54d35f538eecc56aa (diff)
ext4: add tracepoint for ext4_journal_start
This will help debug who is responsible for starting a jbd2 transaction. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
-rw-r--r--fs/ext4/super.c1
-rw-r--r--include/trace/events/ext4.h22
2 files changed, 23 insertions, 0 deletions
diff --git a/fs/ext4/super.c b/fs/ext4/super.c
index 9ea71aa864b3..7910e61809e7 100644
--- a/fs/ext4/super.c
+++ b/fs/ext4/super.c
@@ -269,6 +269,7 @@ handle_t *ext4_journal_start_sb(struct super_block *sb, int nblocks)
269 journal_t *journal; 269 journal_t *journal;
270 handle_t *handle; 270 handle_t *handle;
271 271
272 trace_ext4_journal_start(sb, nblocks, _RET_IP_);
272 if (sb->s_flags & MS_RDONLY) 273 if (sb->s_flags & MS_RDONLY)
273 return ERR_PTR(-EROFS); 274 return ERR_PTR(-EROFS);
274 275
diff --git a/include/trace/events/ext4.h b/include/trace/events/ext4.h
index 5ce2b2f5f524..6f27a59fc90d 100644
--- a/include/trace/events/ext4.h
+++ b/include/trace/events/ext4.h
@@ -1520,6 +1520,28 @@ TRACE_EVENT(ext4_load_inode,
1520 (unsigned long) __entry->ino) 1520 (unsigned long) __entry->ino)
1521); 1521);
1522 1522
1523TRACE_EVENT(ext4_journal_start,
1524 TP_PROTO(struct super_block *sb, int nblocks, unsigned long IP),
1525
1526 TP_ARGS(sb, nblocks, IP),
1527
1528 TP_STRUCT__entry(
1529 __field( dev_t, dev )
1530 __field( int, nblocks )
1531 __field(unsigned long, ip )
1532 ),
1533
1534 TP_fast_assign(
1535 __entry->dev = sb->s_dev;
1536 __entry->nblocks = nblocks;
1537 __entry->ip = IP;
1538 ),
1539
1540 TP_printk("dev %d,%d nblocks %d caller %pF",
1541 MAJOR(__entry->dev), MINOR(__entry->dev),
1542 __entry->nblocks, (void *)__entry->ip)
1543);
1544
1523#endif /* _TRACE_EXT4_H */ 1545#endif /* _TRACE_EXT4_H */
1524 1546
1525/* This part must be outside protection */ 1547/* This part must be outside protection */