Fix: ext4 instrumentation for 4.2 kernels
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Thu, 16 Jul 2015 17:02:23 +0000 (13:02 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Thu, 16 Jul 2015 17:07:31 +0000 (13:07 -0400)
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
instrumentation/events/lttng-module/ext4.h

index 6169fefcea1d5f104dbc69f7c7cfb05dc126cbe7..1c2865ffcacea118b0b5da89bf66bc62f16134ef 100644 (file)
@@ -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),
This page took 0.035412 seconds and 4 git commands to generate.