diff options
author | Theodore Ts'o <tytso@mit.edu> | 2009-11-23 07:25:08 -0500 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2009-11-23 07:25:08 -0500 |
commit | beac2da7565e42be59963824899825d0cc624295 (patch) | |
tree | 22b38198349bd000cd146243271f604708fbc3fb | |
parent | cf40db137cc2b2a1b3f6850247ac2b181d9d3847 (diff) | |
download | blackbird-op-linux-beac2da7565e42be59963824899825d0cc624295.tar.gz blackbird-op-linux-beac2da7565e42be59963824899825d0cc624295.zip |
ext4: add tracepoint for ext4_forget()
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
-rw-r--r-- | fs/ext4/inode.c | 1 | ||||
-rw-r--r-- | include/trace/events/ext4.h | 26 |
2 files changed, 27 insertions, 0 deletions
diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c index 554c6798597c..13de1dd751f5 100644 --- a/fs/ext4/inode.c +++ b/fs/ext4/inode.c @@ -89,6 +89,7 @@ int ext4_forget(handle_t *handle, int is_metadata, struct inode *inode, might_sleep(); + trace_ext4_forget(inode, is_metadata, blocknr); BUFFER_TRACE(bh, "enter"); jbd_debug(4, "forgetting bh %p: is_metadata = %d, mode %o, " diff --git a/include/trace/events/ext4.h b/include/trace/events/ext4.h index d09550bf3f95..b390e1fc4a7b 100644 --- a/include/trace/events/ext4.h +++ b/include/trace/events/ext4.h @@ -907,6 +907,32 @@ TRACE_EVENT(ext4_mballoc_free, __entry->result_len, __entry->result_logical) ); +TRACE_EVENT(ext4_forget, + TP_PROTO(struct inode *inode, int is_metadata, __u64 block), + + TP_ARGS(inode, is_metadata, block), + + TP_STRUCT__entry( + __field( dev_t, dev ) + __field( ino_t, ino ) + __field( umode_t, mode ) + __field( int, is_metadata ) + __field( __u64, block ) + ), + + TP_fast_assign( + __entry->dev = inode->i_sb->s_dev; + __entry->ino = inode->i_ino; + __entry->mode = inode->i_mode; + __entry->is_metadata = is_metadata; + __entry->block = block; + ), + + TP_printk("dev %s ino %lu mode %d is_metadata %d block %llu", + jbd2_dev_to_name(__entry->dev), (unsigned long) __entry->ino, + __entry->mode, __entry->is_metadata, __entry->block) +); + #endif /* _TRACE_EXT4_H */ /* This part must be outside protection */ |