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 |  106 ++++++++++++++--------------
 1 file changed, 53 insertions(+), 53 deletions(-)

--- a/instrumentation/events/lttng-module/btrfs.h
+++ b/instrumentation/events/lttng-module/btrfs.h
@@ -34,7 +34,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),
 
@@ -46,7 +46,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),
 
@@ -64,21 +64,21 @@ 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)
 )
@@ -87,8 +87,8 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__i
 
 LTTNG_TRACEPOINT_EVENT(btrfs_get_extent,
 
-	TP_PROTO(struct btrfs_root *root, struct btrfs_inode *inode,
-		struct extent_map *map),
+	TP_PROTO(const struct btrfs_root *root, const struct btrfs_inode *inode,
+		const struct extent_map *map),
 
 	TP_ARGS(root, inode, map),
 
@@ -178,7 +178,7 @@ LTTNG_TRACEPOINT_EVENT(btrfs_get_extent,
 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,12,0))
 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),
 
@@ -221,36 +221,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),
 
@@ -280,15 +280,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),
 
@@ -305,7 +305,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),
 
@@ -321,7 +321,7 @@ LTTNG_TRACEPOINT_EVENT(btrfs_sync_file,
 #if (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),
 
@@ -344,8 +344,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),
 
@@ -363,9 +363,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),
@@ -407,8 +407,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),
@@ -431,9 +431,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),
@@ -468,7 +468,7 @@ LTTNG_TRACEPOINT_EVENT(btrfs_delayed_ref
 
 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__chunk,
 
-	TP_PROTO(struct btrfs_fs_info *fs_info, struct map_lookup *map,
+	TP_PROTO(const struct btrfs_fs_info *fs_info, const struct map_lookup *map,
 		 u64 offset, u64 size),
 
 	TP_ARGS(fs_info, map, offset, size),
@@ -485,7 +485,7 @@ LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__chun
 
 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__chunk,  btrfs_chunk_alloc,
 
-	TP_PROTO(struct btrfs_fs_info *info, struct map_lookup *map,
+	TP_PROTO(const struct btrfs_fs_info *info, const struct map_lookup *map,
 		 u64 offset, u64 size),
 
 	TP_ARGS(info, map, offset, size)
@@ -493,7 +493,7 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__c
 
 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__chunk,  btrfs_chunk_free,
 
-	TP_PROTO(struct btrfs_fs_info *info, struct map_lookup *map,
+	TP_PROTO(const struct btrfs_fs_info *info, const struct map_lookup *map,
 		 u64 offset, u64 size),
 
 	TP_ARGS(info, map, offset, size)
@@ -538,8 +538,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),
 
@@ -556,7 +556,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),
@@ -575,7 +575,7 @@ LTTNG_TRACEPOINT_EVENT(btrfs_space_reser
 
 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserved_extent,
 
-	TP_PROTO(struct btrfs_fs_info *info, u64 start, u64 len),
+	TP_PROTO(const struct btrfs_fs_info *info, u64 start, u64 len),
 
 	TP_ARGS(info, start, len),
 
@@ -587,14 +587,14 @@ LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__rese
 
 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserved_extent,  btrfs_reserved_extent_alloc,
 
-	TP_PROTO(struct btrfs_fs_info *info, u64 start, u64 len),
+	TP_PROTO(const struct btrfs_fs_info *info, u64 start, u64 len),
 
 	TP_ARGS(info, start, len)
 )
 
 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserved_extent,  btrfs_reserved_extent_free,
 
-	TP_PROTO(struct btrfs_fs_info *info, u64 start, u64 len),
+	TP_PROTO(const struct btrfs_fs_info *info, u64 start, u64 len),
 
 	TP_ARGS(info, start, len)
 )
@@ -638,7 +638,7 @@ LTTNG_TRACEPOINT_EVENT_MAP(find_free_ext
 
 	btrfs_find_free_extent,
 
-	TP_PROTO(struct btrfs_fs_info *info, u64 num_bytes, u64 empty_size,
+	TP_PROTO(const struct btrfs_fs_info *info, u64 num_bytes, u64 empty_size,
 		 u64 data),
 
 	TP_ARGS(info, num_bytes, empty_size, data),
@@ -652,8 +652,8 @@ LTTNG_TRACEPOINT_EVENT_MAP(find_free_ext
 
 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserve_extent,
 
-	TP_PROTO(struct btrfs_fs_info *info,
-		 struct btrfs_block_group_cache *block_group, u64 start,
+	TP_PROTO(const struct btrfs_fs_info *info,
+		 const struct btrfs_block_group_cache *block_group, u64 start,
 		 u64 len),
 
 	TP_ARGS(info, block_group, start, len),
@@ -668,8 +668,8 @@ LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__rese
 
 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent, btrfs_reserve_extent,
 
-	TP_PROTO(struct btrfs_fs_info *info,
-		 struct btrfs_block_group_cache *block_group, u64 start,
+	TP_PROTO(const struct btrfs_fs_info *info,
+		 const struct btrfs_block_group_cache *block_group, u64 start,
 		 u64 len),
 
 	TP_ARGS(info, block_group, start, len)
@@ -677,8 +677,8 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__r
 
 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent, btrfs_reserve_extent_cluster,
 
-	TP_PROTO(struct btrfs_fs_info *info,
-		 struct btrfs_block_group_cache *block_group, u64 start,
+	TP_PROTO(const struct btrfs_fs_info *info,
+		 const struct btrfs_block_group_cache *block_group, u64 start,
 		 u64 len),
 
 	TP_ARGS(info, block_group, start, len)
@@ -742,7 +742,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),
@@ -759,7 +759,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),
 
@@ -770,8 +770,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),
 
@@ -791,12 +791,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_hex(struct extent_state *, state, state)
+		ctf_integer_hex(const struct extent_state *, state, state)
 		ctf_integer(gfp_t, mask, mask)
 		ctf_integer(unsigned long, ip, IP)
 	)
@@ -806,12 +806,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_hex(struct extent_state *, state, state)
+		ctf_integer_hex(const struct extent_state *, state, state)
 		ctf_integer(unsigned long, ip, IP)
 	)
 )
