Fix: 4.10 btrfs instrumentation update backward compat
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mon, 23 Jan 2017 17:32:17 +0000 (12:32 -0500)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mon, 23 Jan 2017 18:04:54 +0000 (13:04 -0500)
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
instrumentation/events/lttng-module/btrfs.h

index e2c68866645d3b33bea47dd5795cb1a6aebd9f75..cc7ba507d2ee67cd9141db361123917e0f08d90c 100644 (file)
@@ -83,6 +83,8 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__inode, btrfs_inode_evict,
        TP_ARGS(inode)
 )
 
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0))
+
 LTTNG_TRACEPOINT_EVENT(btrfs_get_extent,
 
        TP_PROTO(struct btrfs_root *root, struct inode *inode,
@@ -104,6 +106,29 @@ LTTNG_TRACEPOINT_EVENT(btrfs_get_extent,
        )
 )
 
+#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)) */
+
+LTTNG_TRACEPOINT_EVENT(btrfs_get_extent,
+
+       TP_PROTO(struct btrfs_root *root, struct extent_map *map),
+
+       TP_ARGS(root, map),
+
+       TP_FIELDS(
+               ctf_integer(u64, root_objectid, root->root_key.objectid)
+               ctf_integer(u64, start, map->start)
+               ctf_integer(u64, len, map->len)
+               ctf_integer(u64, orig_start, map->orig_start)
+               ctf_integer(u64, block_start, map->block_start)
+               ctf_integer(u64, block_len, map->block_len)
+               ctf_integer(unsigned long, flags, map->flags)
+               ctf_integer(int, refs, atomic_read(&map->refs))
+               ctf_integer(unsigned int, compress_type, map->compress_type)
+       )
+)
+
+#endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)) */
+
 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__ordered_extent,
 
        TP_PROTO(struct inode *inode, struct btrfs_ordered_extent *ordered),
This page took 0.026704 seconds and 4 git commands to generate.