From: Tony Jones <tonyj@suse.de>
Subject:  btrfs: constify tracepoint arguments
References: bsc#1044912 
Patch-mainline: not yet, kernel patch not yet upstream

Update lttng tp to reflect patches.suse/btrfs-constify-tracepoint-arguments

---
 instrumentation/events/lttng-module/btrfs.h |  104 ++++++++++++++--------------
 1 file changed, 52 insertions(+), 52 deletions(-)

--- a/instrumentation/events/lttng-module/btrfs.h
+++ b/instrumentation/events/lttng-module/btrfs.h
@@ -35,7 +35,7 @@ struct extent_state;
 
 LTTNG_TRACEPOINT_EVENT(btrfs_transaction_commit,
 
-	TP_PROTO(struct btrfs_root *root),
+	TP_PROTO(const struct btrfs_root *root),
 
 	TP_ARGS(root),
 
@@ -47,7 +47,7 @@ LTTNG_TRACEPOINT_EVENT(btrfs_transaction
 
 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__inode,
 
-	TP_PROTO(struct inode *inode),
+	TP_PROTO(const struct inode *inode),
 
 	TP_ARGS(inode),
 
@@ -65,28 +65,28 @@ LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__inod
 
 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__inode, btrfs_inode_new,
 
-	TP_PROTO(struct inode *inode),
+	TP_PROTO(const struct inode *inode),
 
 	TP_ARGS(inode)
 )
 
 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__inode, btrfs_inode_request,
 
-	TP_PROTO(struct inode *inode),
+	TP_PROTO(const struct inode *inode),
 
 	TP_ARGS(inode)
 )
 
 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__inode, btrfs_inode_evict,
 
-	TP_PROTO(struct inode *inode),
+	TP_PROTO(const struct inode *inode),
 
 	TP_ARGS(inode)
 )
 
 LTTNG_TRACEPOINT_EVENT(btrfs_get_extent,
 
-	TP_PROTO(struct btrfs_root *root, struct extent_map *map),
+	TP_PROTO(const struct btrfs_root *root, const struct extent_map *map),
 
 	TP_ARGS(root, map),
 
@@ -105,7 +105,7 @@ LTTNG_TRACEPOINT_EVENT(btrfs_get_extent,
 
 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__ordered_extent,
 
-	TP_PROTO(struct inode *inode, struct btrfs_ordered_extent *ordered),
+	TP_PROTO(const struct inode *inode, const struct btrfs_ordered_extent *ordered),
 
 	TP_ARGS(inode, ordered),
 
@@ -126,36 +126,36 @@ LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__orde
 
 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent, btrfs_ordered_extent_add,
 
-	TP_PROTO(struct inode *inode, struct btrfs_ordered_extent *ordered),
+	TP_PROTO(const struct inode *inode, const struct btrfs_ordered_extent *ordered),
 
 	TP_ARGS(inode, ordered)
 )
 
 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent, btrfs_ordered_extent_remove,
 
-	TP_PROTO(struct inode *inode, struct btrfs_ordered_extent *ordered),
+	TP_PROTO(const struct inode *inode, const struct btrfs_ordered_extent *ordered),
 
 	TP_ARGS(inode, ordered)
 )
 
 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent, btrfs_ordered_extent_start,
 
-	TP_PROTO(struct inode *inode, struct btrfs_ordered_extent *ordered),
+	TP_PROTO(const struct inode *inode, const struct btrfs_ordered_extent *ordered),
 
 	TP_ARGS(inode, ordered)
 )
 
 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent, btrfs_ordered_extent_put,
 
-	TP_PROTO(struct inode *inode, struct btrfs_ordered_extent *ordered),
+	TP_PROTO(const struct inode *inode, const struct btrfs_ordered_extent *ordered),
 
 	TP_ARGS(inode, ordered)
 )
 
 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__writepage,
 
-	TP_PROTO(struct page *page, struct inode *inode,
-		 struct writeback_control *wbc),
+	TP_PROTO(const struct page *page, const struct inode *inode,
+		 const struct writeback_control *wbc),
 
 	TP_ARGS(page, inode, wbc),
 
@@ -185,15 +185,15 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrf
 
 	btrfs__extent_writepage,
 
-	TP_PROTO(struct page *page, struct inode *inode,
-		 struct writeback_control *wbc),
+	TP_PROTO(const struct page *page, const struct inode *inode,
+		 const struct writeback_control *wbc),
 
 	TP_ARGS(page, inode, wbc)
 )
 
 LTTNG_TRACEPOINT_EVENT(btrfs_writepage_end_io_hook,
 
-	TP_PROTO(struct page *page, u64 start, u64 end, int uptodate),
+	TP_PROTO(const struct page *page, u64 start, u64 end, int uptodate),
 
 	TP_ARGS(page, start, end, uptodate),
 
@@ -210,7 +210,7 @@ LTTNG_TRACEPOINT_EVENT(btrfs_writepage_e
 
 LTTNG_TRACEPOINT_EVENT(btrfs_sync_file,
 
-	TP_PROTO(struct file *file, int datasync),
+	TP_PROTO(const struct file *file, int datasync),
 
 	TP_ARGS(file, datasync),
 
@@ -226,7 +226,7 @@ LTTNG_TRACEPOINT_EVENT(btrfs_sync_file,
 #if (defined(CONFIG_SUSE_KERNEL) || LINUX_VERSION_CODE >= KERNEL_VERSION(4,8,0))
 LTTNG_TRACEPOINT_EVENT(btrfs_sync_fs,
 
-	TP_PROTO(struct btrfs_fs_info *fs_info, int wait),
+	TP_PROTO(const struct btrfs_fs_info *fs_info, int wait),
 
 	TP_ARGS(fs_info, wait),
 
@@ -249,8 +249,8 @@ LTTNG_TRACEPOINT_EVENT(btrfs_sync_fs,
 
 LTTNG_TRACEPOINT_EVENT(btrfs_add_block_group,
 
-	TP_PROTO(struct btrfs_fs_info *fs_info,
-		struct btrfs_block_group_cache *block_group, int create),
+	TP_PROTO(const struct btrfs_fs_info *fs_info,
+		const struct btrfs_block_group_cache *block_group, int create),
 
 	TP_ARGS(fs_info, block_group, create),
 
@@ -268,9 +268,9 @@ LTTNG_TRACEPOINT_EVENT(btrfs_add_block_g
 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,8,0))
 LTTNG_TRACEPOINT_EVENT(btrfs_delayed_tree_ref,
 
-	TP_PROTO(struct btrfs_fs_info *fs_info,
-		 struct btrfs_delayed_ref_node *ref,
-		 struct btrfs_delayed_tree_ref *full_ref,
+	TP_PROTO(const struct btrfs_fs_info *fs_info,
+		 const struct btrfs_delayed_ref_node *ref,
+		 const struct btrfs_delayed_tree_ref *full_ref,
 		 int action),
 
 	TP_ARGS(fs_info, ref, full_ref, action),
@@ -312,8 +312,8 @@ LTTNG_TRACEPOINT_EVENT(btrfs_delayed_tre
 
 LTTNG_TRACEPOINT_EVENT(btrfs_delayed_data_ref,
 
-	TP_PROTO(struct btrfs_delayed_ref_node *ref,
-		 struct btrfs_delayed_data_ref *full_ref,
+	TP_PROTO(const struct btrfs_delayed_ref_node *ref,
+		 const struct btrfs_delayed_data_ref *full_ref,
 		 int action),
 
 	TP_ARGS(ref, full_ref, action),
@@ -336,9 +336,9 @@ LTTNG_TRACEPOINT_EVENT(btrfs_delayed_dat
 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,8,0))
 LTTNG_TRACEPOINT_EVENT(btrfs_delayed_ref_head,
 
-	TP_PROTO(struct btrfs_fs_info *fs_info,
-		 struct btrfs_delayed_ref_node *ref,
-		 struct btrfs_delayed_ref_head *head_ref,
+	TP_PROTO(const struct btrfs_fs_info *fs_info,
+		 const struct btrfs_delayed_ref_node *ref,
+		 const struct btrfs_delayed_ref_head *head_ref,
 		 int action),
 
 	TP_ARGS(fs_info, ref, head_ref, action),
@@ -371,7 +371,7 @@ LTTNG_TRACEPOINT_EVENT(btrfs_delayed_ref
 
 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__chunk,
 
-	TP_PROTO(struct btrfs_root *root, struct map_lookup *map,
+	TP_PROTO(const struct btrfs_root *root, const struct map_lookup *map,
 		 u64 offset, u64 size),
 
 	TP_ARGS(root, map, offset, size),
@@ -388,7 +388,7 @@ LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__chun
 
 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__chunk,  btrfs_chunk_alloc,
 
-	TP_PROTO(struct btrfs_root *root, struct map_lookup *map,
+	TP_PROTO(const struct btrfs_root *root, const struct map_lookup *map,
 		 u64 offset, u64 size),
 
 	TP_ARGS(root, map, offset, size)
@@ -396,7 +396,7 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__c
 
 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__chunk,  btrfs_chunk_free,
 
-	TP_PROTO(struct btrfs_root *root, struct map_lookup *map,
+	TP_PROTO(const struct btrfs_root *root, const struct map_lookup *map,
 		 u64 offset, u64 size),
 
 	TP_ARGS(root, map, offset, size)
@@ -404,8 +404,8 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__c
 
 LTTNG_TRACEPOINT_EVENT(btrfs_cow_block,
 
-	TP_PROTO(struct btrfs_root *root, struct extent_buffer *buf,
-		 struct extent_buffer *cow),
+	TP_PROTO(const struct btrfs_root *root, const struct extent_buffer *buf,
+		 const struct extent_buffer *cow),
 
 	TP_ARGS(root, buf, cow),
 
@@ -422,7 +422,7 @@ LTTNG_TRACEPOINT_EVENT(btrfs_cow_block,
 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0))
 LTTNG_TRACEPOINT_EVENT(btrfs_space_reservation,
 
-	TP_PROTO(struct btrfs_fs_info *fs_info, char *type, u64 val,
+	TP_PROTO(const struct btrfs_fs_info *fs_info, char *type, u64 val,
 		 u64 bytes, int reserve),
 
 	TP_ARGS(fs_info, type, val, bytes, reserve),
@@ -439,7 +439,7 @@ LTTNG_TRACEPOINT_EVENT(btrfs_space_reser
 
 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserved_extent,
 
-	TP_PROTO(struct btrfs_root *root, u64 start, u64 len),
+	TP_PROTO(const struct btrfs_root *root, u64 start, u64 len),
 
 	TP_ARGS(root, start, len),
 
@@ -452,14 +452,14 @@ LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__rese
 
 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserved_extent,  btrfs_reserved_extent_alloc,
 
-	TP_PROTO(struct btrfs_root *root, u64 start, u64 len),
+	TP_PROTO(const struct btrfs_root *root, u64 start, u64 len),
 
 	TP_ARGS(root, start, len)
 )
 
 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserved_extent,  btrfs_reserved_extent_free,
 
-	TP_PROTO(struct btrfs_root *root, u64 start, u64 len),
+	TP_PROTO(const struct btrfs_root *root, u64 start, u64 len),
 
 	TP_ARGS(root, start, len)
 )
@@ -469,7 +469,7 @@ LTTNG_TRACEPOINT_EVENT_MAP(find_free_ext
 
 	btrfs_find_free_extent,
 
-	TP_PROTO(struct btrfs_root *root, u64 num_bytes, u64 empty_size,
+	TP_PROTO(const struct btrfs_root *root, u64 num_bytes, u64 empty_size,
 		 u64 data),
 
 	TP_ARGS(root, num_bytes, empty_size, data),
@@ -484,8 +484,8 @@ LTTNG_TRACEPOINT_EVENT_MAP(find_free_ext
 
 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserve_extent,
 
-	TP_PROTO(struct btrfs_root *root,
-		 struct btrfs_block_group_cache *block_group, u64 start,
+	TP_PROTO(const struct btrfs_root *root,
+		 const struct btrfs_block_group_cache *block_group, u64 start,
 		 u64 len),
 
 	TP_ARGS(root, block_group, start, len),
@@ -501,8 +501,8 @@ LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__rese
 
 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent, btrfs_reserve_extent,
 
-	TP_PROTO(struct btrfs_root *root,
-		 struct btrfs_block_group_cache *block_group, u64 start,
+	TP_PROTO(const struct btrfs_root *root,
+		 const struct btrfs_block_group_cache *block_group, u64 start,
 		 u64 len),
 
 	TP_ARGS(root, block_group, start, len)
@@ -510,8 +510,8 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__r
 
 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent, btrfs_reserve_extent_cluster,
 
-	TP_PROTO(struct btrfs_root *root,
-		 struct btrfs_block_group_cache *block_group, u64 start,
+	TP_PROTO(const struct btrfs_root *root,
+		 const struct btrfs_block_group_cache *block_group, u64 start,
 		 u64 len),
 
 	TP_ARGS(root, block_group, start, len)
@@ -519,7 +519,7 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__r
 
 LTTNG_TRACEPOINT_EVENT(btrfs_find_cluster,
 
-	TP_PROTO(struct btrfs_block_group_cache *block_group, u64 start,
+	TP_PROTO(const struct btrfs_block_group_cache *block_group, u64 start,
 		 u64 bytes, u64 empty_size, u64 min_bytes),
 
 	TP_ARGS(block_group, start, bytes, empty_size, min_bytes),
@@ -536,7 +536,7 @@ LTTNG_TRACEPOINT_EVENT(btrfs_find_cluste
 
 LTTNG_TRACEPOINT_EVENT(btrfs_failed_cluster_setup,
 
-	TP_PROTO(struct btrfs_block_group_cache *block_group),
+	TP_PROTO(const struct btrfs_block_group_cache *block_group),
 
 	TP_ARGS(block_group),
 
@@ -547,8 +547,8 @@ LTTNG_TRACEPOINT_EVENT(btrfs_failed_clus
 
 LTTNG_TRACEPOINT_EVENT(btrfs_setup_cluster,
 
-	TP_PROTO(struct btrfs_block_group_cache *block_group,
-		 struct btrfs_free_cluster *cluster, u64 size, int bitmap),
+	TP_PROTO(const struct btrfs_block_group_cache *block_group,
+		 const struct btrfs_free_cluster *cluster, u64 size, int bitmap),
 
 	TP_ARGS(block_group, cluster, size, bitmap),
 
@@ -568,12 +568,12 @@ LTTNG_TRACEPOINT_EVENT_MAP(alloc_extent_
 
 	btrfs_alloc_extent_state,
 
-	TP_PROTO(struct extent_state *state, gfp_t mask, unsigned long IP),
+	TP_PROTO(const struct extent_state *state, gfp_t mask, unsigned long IP),
 
 	TP_ARGS(state, mask, IP),
 
 	TP_FIELDS(
-		ctf_integer(struct extent_state *, state, state)
+		ctf_integer(const struct extent_state *, state, state)
 		ctf_integer(gfp_t, mask, mask)
 		ctf_integer(unsigned long, ip, IP)
 	)
@@ -583,12 +583,12 @@ LTTNG_TRACEPOINT_EVENT_MAP(free_extent_s
 
 	btrfs_free_extent_state,
 
-	TP_PROTO(struct extent_state *state, unsigned long IP),
+	TP_PROTO(const struct extent_state *state, unsigned long IP),
 
 	TP_ARGS(state, IP),
 
 	TP_FIELDS(
-		ctf_integer(struct extent_state *, state, state)
+		ctf_integer(const struct extent_state *, state, state)
 		ctf_integer(unsigned long, ip, IP)
 	)
 )
