From: Mathieu Desnoyers Date: Thu, 16 Jul 2015 17:02:23 +0000 (-0400) Subject: Fix: ext4 instrumentation for 4.2 kernels X-Git-Tag: v2.6.3~8 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=e540f3e3e9bfef73e6cecb4b378efab23c6666d6;p=lttng-modules.git Fix: ext4 instrumentation for 4.2 kernels Signed-off-by: Mathieu Desnoyers --- diff --git a/instrumentation/events/lttng-module/ext4.h b/instrumentation/events/lttng-module/ext4.h index 6169fefc..1c2865ff 100644 --- a/instrumentation/events/lttng-module/ext4.h +++ b/instrumentation/events/lttng-module/ext4.h @@ -1511,6 +1511,35 @@ LTTNG_TRACEPOINT_EVENT(ext4_da_update_reserve_space, #endif ) +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,2,0)) +LTTNG_TRACEPOINT_EVENT(ext4_da_reserve_space, + TP_PROTO(struct inode *inode), + + TP_ARGS(inode), + + TP_STRUCT__entry( + __field( dev_t, dev ) + __field( ino_t, ino ) + __field( __u64, i_blocks ) + __field( int, reserved_data_blocks ) + __field( int, reserved_meta_blocks ) + __field( TP_MODE_T, mode ) + ), + + TP_fast_assign( + tp_assign(dev, inode->i_sb->s_dev) + tp_assign(ino, inode->i_ino) + tp_assign(i_blocks, inode->i_blocks) + tp_assign(reserved_data_blocks, + EXT4_I(inode)->i_reserved_data_blocks) + tp_assign(reserved_meta_blocks, + EXT4_I(inode)->i_reserved_meta_blocks) + tp_assign(mode, inode->i_mode) + ), + + TP_printk() +) +#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,2,0)) */ LTTNG_TRACEPOINT_EVENT(ext4_da_reserve_space, TP_PROTO(struct inode *inode, int md_needed), @@ -1546,6 +1575,7 @@ LTTNG_TRACEPOINT_EVENT(ext4_da_reserve_space, __entry->md_needed, __entry->reserved_data_blocks, __entry->reserved_meta_blocks) ) +#endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,2,0)) */ LTTNG_TRACEPOINT_EVENT(ext4_da_release_space, TP_PROTO(struct inode *inode, int freed_blocks),