Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0bf70aeb authored by Chris Mason's avatar Chris Mason
Browse files

Merge branch 'tracepoint-updates-4.10' of...

Merge branch 'tracepoint-updates-4.10' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux into for-linus-4.10
parents 3dda13a8 562a7a07
Loading
Loading
Loading
Loading
+11 −4
Original line number Original line Diff line number Diff line
@@ -273,6 +273,8 @@ static void run_ordered_work(struct __btrfs_workqueue *wq)
	unsigned long flags;
	unsigned long flags;


	while (1) {
	while (1) {
		void *wtag;

		spin_lock_irqsave(lock, flags);
		spin_lock_irqsave(lock, flags);
		if (list_empty(list))
		if (list_empty(list))
			break;
			break;
@@ -299,11 +301,13 @@ static void run_ordered_work(struct __btrfs_workqueue *wq)
		spin_unlock_irqrestore(lock, flags);
		spin_unlock_irqrestore(lock, flags);


		/*
		/*
		 * we don't want to call the ordered free functions
		 * We don't want to call the ordered free functions with the
		 * with the lock held though
		 * lock held though. Save the work as tag for the trace event,
		 * because the callback could free the structure.
		 */
		 */
		wtag = work;
		work->ordered_free(work);
		work->ordered_free(work);
		trace_btrfs_all_work_done(work);
		trace_btrfs_all_work_done(wq->fs_info, wtag);
	}
	}
	spin_unlock_irqrestore(lock, flags);
	spin_unlock_irqrestore(lock, flags);
}
}
@@ -311,6 +315,7 @@ static void run_ordered_work(struct __btrfs_workqueue *wq)
static void normal_work_helper(struct btrfs_work *work)
static void normal_work_helper(struct btrfs_work *work)
{
{
	struct __btrfs_workqueue *wq;
	struct __btrfs_workqueue *wq;
	void *wtag;
	int need_order = 0;
	int need_order = 0;


	/*
	/*
@@ -324,6 +329,8 @@ static void normal_work_helper(struct btrfs_work *work)
	if (work->ordered_func)
	if (work->ordered_func)
		need_order = 1;
		need_order = 1;
	wq = work->wq;
	wq = work->wq;
	/* Safe for tracepoints in case work gets freed by the callback */
	wtag = work;


	trace_btrfs_work_sched(work);
	trace_btrfs_work_sched(work);
	thresh_exec_hook(wq);
	thresh_exec_hook(wq);
@@ -333,7 +340,7 @@ static void normal_work_helper(struct btrfs_work *work)
		run_ordered_work(wq);
		run_ordered_work(wq);
	}
	}
	if (!need_order)
	if (!need_order)
		trace_btrfs_all_work_done(work);
		trace_btrfs_all_work_done(wq->fs_info, wtag);
}
}


void btrfs_init_work(struct btrfs_work *work, btrfs_work_func_t uniq_func,
void btrfs_init_work(struct btrfs_work *work, btrfs_work_func_t uniq_func,
+1 −1
Original line number Original line Diff line number Diff line
@@ -7059,7 +7059,7 @@ struct extent_map *btrfs_get_extent(struct inode *inode, struct page *page,
	write_unlock(&em_tree->lock);
	write_unlock(&em_tree->lock);
out:
out:


	trace_btrfs_get_extent(root, em);
	trace_btrfs_get_extent(root, inode, em);


	btrfs_free_path(path);
	btrfs_free_path(path);
	if (trans) {
	if (trans) {
+79 −67
Original line number Original line Diff line number Diff line
@@ -130,8 +130,8 @@ DECLARE_EVENT_CLASS(btrfs__inode,
				BTRFS_I(inode)->root->root_key.objectid;
				BTRFS_I(inode)->root->root_key.objectid;
	),
	),


	TP_printk_btrfs("root = %llu(%s), gen = %llu, ino = %lu, blocks = %llu, "
	TP_printk_btrfs("root=%llu(%s) gen=%llu ino=%lu blocks=%llu "
		  "disk_i_size = %llu, last_trans = %llu, logged_trans = %llu",
		  "disk_i_size=%llu last_trans=%llu logged_trans=%llu",
		  show_root_type(__entry->root_objectid),
		  show_root_type(__entry->root_objectid),
		  (unsigned long long)__entry->generation,
		  (unsigned long long)__entry->generation,
		  (unsigned long)__entry->ino,
		  (unsigned long)__entry->ino,
@@ -184,14 +184,16 @@ DEFINE_EVENT(btrfs__inode, btrfs_inode_evict,


TRACE_EVENT_CONDITION(btrfs_get_extent,
TRACE_EVENT_CONDITION(btrfs_get_extent,


	TP_PROTO(struct btrfs_root *root, struct extent_map *map),
	TP_PROTO(struct btrfs_root *root, struct inode *inode,
		 struct extent_map *map),


	TP_ARGS(root, map),
	TP_ARGS(root, inode, map),


	TP_CONDITION(map),
	TP_CONDITION(map),


	TP_STRUCT__entry_btrfs(
	TP_STRUCT__entry_btrfs(
		__field(	u64,  root_objectid	)
		__field(	u64,  root_objectid	)
		__field(	u64,  ino		)
		__field(	u64,  start		)
		__field(	u64,  start		)
		__field(	u64,  len		)
		__field(	u64,  len		)
		__field(	u64,  orig_start	)
		__field(	u64,  orig_start	)
@@ -204,6 +206,7 @@ TRACE_EVENT_CONDITION(btrfs_get_extent,


	TP_fast_assign_btrfs(root->fs_info,
	TP_fast_assign_btrfs(root->fs_info,
		__entry->root_objectid	= root->root_key.objectid;
		__entry->root_objectid	= root->root_key.objectid;
		__entry->ino		= btrfs_ino(inode);
		__entry->start		= map->start;
		__entry->start		= map->start;
		__entry->len		= map->len;
		__entry->len		= map->len;
		__entry->orig_start	= map->orig_start;
		__entry->orig_start	= map->orig_start;
@@ -214,11 +217,12 @@ TRACE_EVENT_CONDITION(btrfs_get_extent,
		__entry->compress_type	= map->compress_type;
		__entry->compress_type	= map->compress_type;
	),
	),


	TP_printk_btrfs("root = %llu(%s), start = %llu, len = %llu, "
	TP_printk_btrfs("root=%llu(%s) ino=%llu start=%llu len=%llu "
		  "orig_start = %llu, block_start = %llu(%s), "
		  "orig_start=%llu block_start=%llu(%s) "
		  "block_len = %llu, flags = %s, refs = %u, "
		  "block_len=%llu flags=%s refs=%u "
		  "compress_type=%u",
		  "compress_type=%u",
		  show_root_type(__entry->root_objectid),
		  show_root_type(__entry->root_objectid),
		  (unsigned long long)__entry->ino,
		  (unsigned long long)__entry->start,
		  (unsigned long long)__entry->start,
		  (unsigned long long)__entry->len,
		  (unsigned long long)__entry->len,
		  (unsigned long long)__entry->orig_start,
		  (unsigned long long)__entry->orig_start,
@@ -259,6 +263,7 @@ DECLARE_EVENT_CLASS(btrfs__ordered_extent,
		__field(	int,  compress_type	)
		__field(	int,  compress_type	)
		__field(	int,  refs		)
		__field(	int,  refs		)
		__field(	u64,  root_objectid	)
		__field(	u64,  root_objectid	)
		__field(	u64,  truncated_len	)
	),
	),


	TP_fast_assign_btrfs(btrfs_sb(inode->i_sb),
	TP_fast_assign_btrfs(btrfs_sb(inode->i_sb),
@@ -273,11 +278,13 @@ DECLARE_EVENT_CLASS(btrfs__ordered_extent,
		__entry->refs		= atomic_read(&ordered->refs);
		__entry->refs		= atomic_read(&ordered->refs);
		__entry->root_objectid	=
		__entry->root_objectid	=
				BTRFS_I(inode)->root->root_key.objectid;
				BTRFS_I(inode)->root->root_key.objectid;
		__entry->truncated_len	= ordered->truncated_len;
	),
	),


	TP_printk_btrfs("root = %llu(%s), ino = %llu, file_offset = %llu, "
	TP_printk_btrfs("root=%llu(%s) ino=%llu file_offset=%llu "
		  "start = %llu, len = %llu, disk_len = %llu, "
		  "start=%llu len=%llu disk_len=%llu "
		  "bytes_left = %llu, flags = %s, compress_type = %d, "
		  "truncated_len=%llu "
		  "bytes_left=%llu flags=%s compress_type=%d "
		  "refs=%d",
		  "refs=%d",
		  show_root_type(__entry->root_objectid),
		  show_root_type(__entry->root_objectid),
		  (unsigned long long)__entry->ino,
		  (unsigned long long)__entry->ino,
@@ -285,6 +292,7 @@ DECLARE_EVENT_CLASS(btrfs__ordered_extent,
		  (unsigned long long)__entry->start,
		  (unsigned long long)__entry->start,
		  (unsigned long long)__entry->len,
		  (unsigned long long)__entry->len,
		  (unsigned long long)__entry->disk_len,
		  (unsigned long long)__entry->disk_len,
		  (unsigned long long)__entry->truncated_len,
		  (unsigned long long)__entry->bytes_left,
		  (unsigned long long)__entry->bytes_left,
		  show_ordered_flags(__entry->flags),
		  show_ordered_flags(__entry->flags),
		  __entry->compress_type, __entry->refs)
		  __entry->compress_type, __entry->refs)
@@ -354,10 +362,10 @@ DECLARE_EVENT_CLASS(btrfs__writepage,
				 BTRFS_I(inode)->root->root_key.objectid;
				 BTRFS_I(inode)->root->root_key.objectid;
	),
	),


	TP_printk_btrfs("root = %llu(%s), ino = %lu, page_index = %lu, "
	TP_printk_btrfs("root=%llu(%s) ino=%lu page_index=%lu "
		  "nr_to_write = %ld, pages_skipped = %ld, range_start = %llu, "
		  "nr_to_write=%ld pages_skipped=%ld range_start=%llu "
		  "range_end = %llu, for_kupdate = %d, "
		  "range_end=%llu for_kupdate=%d "
		  "for_reclaim = %d, range_cyclic = %d, writeback_index = %lu",
		  "for_reclaim=%d range_cyclic=%d writeback_index=%lu",
		  show_root_type(__entry->root_objectid),
		  show_root_type(__entry->root_objectid),
		  (unsigned long)__entry->ino, __entry->index,
		  (unsigned long)__entry->ino, __entry->index,
		  __entry->nr_to_write, __entry->pages_skipped,
		  __entry->nr_to_write, __entry->pages_skipped,
@@ -400,8 +408,8 @@ TRACE_EVENT(btrfs_writepage_end_io_hook,
			 BTRFS_I(page->mapping->host)->root->root_key.objectid;
			 BTRFS_I(page->mapping->host)->root->root_key.objectid;
	),
	),


	TP_printk_btrfs("root = %llu(%s), ino = %lu, page_index = %lu, start = %llu, "
	TP_printk_btrfs("root=%llu(%s) ino=%lu page_index=%lu start=%llu "
		  "end = %llu, uptodate = %d",
		  "end=%llu uptodate=%d",
		  show_root_type(__entry->root_objectid),
		  show_root_type(__entry->root_objectid),
		  (unsigned long)__entry->ino, (unsigned long)__entry->index,
		  (unsigned long)__entry->ino, (unsigned long)__entry->index,
		  (unsigned long long)__entry->start,
		  (unsigned long long)__entry->start,
@@ -433,7 +441,7 @@ TRACE_EVENT(btrfs_sync_file,
				 BTRFS_I(inode)->root->root_key.objectid;
				 BTRFS_I(inode)->root->root_key.objectid;
	),
	),


	TP_printk_btrfs("root = %llu(%s), ino = %ld, parent = %ld, datasync = %d",
	TP_printk_btrfs("root=%llu(%s) ino=%ld parent=%ld datasync=%d",
		  show_root_type(__entry->root_objectid),
		  show_root_type(__entry->root_objectid),
		  (unsigned long)__entry->ino, (unsigned long)__entry->parent,
		  (unsigned long)__entry->ino, (unsigned long)__entry->parent,
		  __entry->datasync)
		  __entry->datasync)
@@ -484,8 +492,8 @@ TRACE_EVENT(btrfs_add_block_group,
		__entry->create		= create;
		__entry->create		= create;
	),
	),


	TP_printk("%pU: block_group offset = %llu, size = %llu, "
	TP_printk("%pU: block_group offset=%llu size=%llu "
		  "flags = %llu(%s), bytes_used = %llu, bytes_super = %llu, "
		  "flags=%llu(%s) bytes_used=%llu bytes_super=%llu "
		  "create=%d", __entry->fsid,
		  "create=%d", __entry->fsid,
		  (unsigned long long)__entry->offset,
		  (unsigned long long)__entry->offset,
		  (unsigned long long)__entry->size,
		  (unsigned long long)__entry->size,
@@ -535,9 +543,9 @@ DECLARE_EVENT_CLASS(btrfs_delayed_tree_ref,
		__entry->seq		= ref->seq;
		__entry->seq		= ref->seq;
	),
	),


	TP_printk_btrfs("bytenr = %llu, num_bytes = %llu, action = %s, "
	TP_printk_btrfs("bytenr=%llu num_bytes=%llu action=%s "
		  "parent = %llu(%s), ref_root = %llu(%s), level = %d, "
		  "parent=%llu(%s) ref_root=%llu(%s) level=%d "
		  "type = %s, seq = %llu",
		  "type=%s seq=%llu",
		  (unsigned long long)__entry->bytenr,
		  (unsigned long long)__entry->bytenr,
		  (unsigned long long)__entry->num_bytes,
		  (unsigned long long)__entry->num_bytes,
		  show_ref_action(__entry->action),
		  show_ref_action(__entry->action),
@@ -600,9 +608,9 @@ DECLARE_EVENT_CLASS(btrfs_delayed_data_ref,
		__entry->seq		= ref->seq;
		__entry->seq		= ref->seq;
	),
	),


	TP_printk_btrfs("bytenr = %llu, num_bytes = %llu, action = %s, "
	TP_printk_btrfs("bytenr=%llu num_bytes=%llu action=%s "
		  "parent = %llu(%s), ref_root = %llu(%s), owner = %llu, "
		  "parent=%llu(%s) ref_root=%llu(%s) owner=%llu "
		  "offset = %llu, type = %s, seq = %llu",
		  "offset=%llu type=%s seq=%llu",
		  (unsigned long long)__entry->bytenr,
		  (unsigned long long)__entry->bytenr,
		  (unsigned long long)__entry->num_bytes,
		  (unsigned long long)__entry->num_bytes,
		  show_ref_action(__entry->action),
		  show_ref_action(__entry->action),
@@ -657,7 +665,7 @@ DECLARE_EVENT_CLASS(btrfs_delayed_ref_head,
		__entry->is_data	= head_ref->is_data;
		__entry->is_data	= head_ref->is_data;
	),
	),


	TP_printk_btrfs("bytenr = %llu, num_bytes = %llu, action = %s, is_data = %d",
	TP_printk_btrfs("bytenr=%llu num_bytes=%llu action=%s is_data=%d",
		  (unsigned long long)__entry->bytenr,
		  (unsigned long long)__entry->bytenr,
		  (unsigned long long)__entry->num_bytes,
		  (unsigned long long)__entry->num_bytes,
		  show_ref_action(__entry->action),
		  show_ref_action(__entry->action),
@@ -721,8 +729,8 @@ DECLARE_EVENT_CLASS(btrfs__chunk,
		__entry->root_objectid	= fs_info->chunk_root->root_key.objectid;
		__entry->root_objectid	= fs_info->chunk_root->root_key.objectid;
	),
	),


	TP_printk_btrfs("root = %llu(%s), offset = %llu, size = %llu, "
	TP_printk_btrfs("root=%llu(%s) offset=%llu size=%llu "
		  "num_stripes = %d, sub_stripes = %d, type = %s",
		  "num_stripes=%d sub_stripes=%d type=%s",
		  show_root_type(__entry->root_objectid),
		  show_root_type(__entry->root_objectid),
		  (unsigned long long)__entry->offset,
		  (unsigned long long)__entry->offset,
		  (unsigned long long)__entry->size,
		  (unsigned long long)__entry->size,
@@ -771,8 +779,8 @@ TRACE_EVENT(btrfs_cow_block,
		__entry->cow_level	= btrfs_header_level(cow);
		__entry->cow_level	= btrfs_header_level(cow);
	),
	),


	TP_printk_btrfs("root = %llu(%s), refs = %d, orig_buf = %llu "
	TP_printk_btrfs("root=%llu(%s) refs=%d orig_buf=%llu "
		  "(orig_level = %d), cow_buf = %llu (cow_level = %d)",
		  "(orig_level=%d) cow_buf=%llu (cow_level=%d)",
		  show_root_type(__entry->root_objectid),
		  show_root_type(__entry->root_objectid),
		  __entry->refs,
		  __entry->refs,
		  (unsigned long long)__entry->buf_start,
		  (unsigned long long)__entry->buf_start,
@@ -836,7 +844,7 @@ TRACE_EVENT(btrfs_trigger_flush,
		__assign_str(reason, reason)
		__assign_str(reason, reason)
	),
	),


	TP_printk("%pU: %s: flush = %d(%s), flags = %llu(%s), bytes = %llu",
	TP_printk("%pU: %s: flush=%d(%s) flags=%llu(%s) bytes=%llu",
		  __entry->fsid, __get_str(reason), __entry->flush,
		  __entry->fsid, __get_str(reason), __entry->flush,
		  show_flush_action(__entry->flush),
		  show_flush_action(__entry->flush),
		  (unsigned long long)__entry->flags,
		  (unsigned long long)__entry->flags,
@@ -879,8 +887,8 @@ TRACE_EVENT(btrfs_flush_space,
		__entry->ret		=	ret;
		__entry->ret		=	ret;
	),
	),


	TP_printk("%pU: state = %d(%s), flags = %llu(%s), num_bytes = %llu, "
	TP_printk("%pU: state=%d(%s) flags=%llu(%s) num_bytes=%llu "
		  "orig_bytes = %llu, ret = %d", __entry->fsid, __entry->state,
		  "orig_bytes=%llu ret=%d", __entry->fsid, __entry->state,
		  show_flush_state(__entry->state),
		  show_flush_state(__entry->state),
		  (unsigned long long)__entry->flags,
		  (unsigned long long)__entry->flags,
		  __print_flags((unsigned long)__entry->flags, "|",
		  __print_flags((unsigned long)__entry->flags, "|",
@@ -905,7 +913,7 @@ DECLARE_EVENT_CLASS(btrfs__reserved_extent,
		__entry->len		= len;
		__entry->len		= len;
	),
	),


	TP_printk_btrfs("root = %llu(%s), start = %llu, len = %llu",
	TP_printk_btrfs("root=%llu(%s) start=%llu len=%llu",
		  show_root_type(BTRFS_EXTENT_TREE_OBJECTID),
		  show_root_type(BTRFS_EXTENT_TREE_OBJECTID),
		  (unsigned long long)__entry->start,
		  (unsigned long long)__entry->start,
		  (unsigned long long)__entry->len)
		  (unsigned long long)__entry->len)
@@ -944,7 +952,7 @@ TRACE_EVENT(find_free_extent,
		__entry->data		= data;
		__entry->data		= data;
	),
	),


	TP_printk_btrfs("root = %Lu(%s), len = %Lu, empty_size = %Lu, flags = %Lu(%s)",
	TP_printk_btrfs("root=%Lu(%s) len=%Lu empty_size=%Lu flags=%Lu(%s)",
		  show_root_type(BTRFS_EXTENT_TREE_OBJECTID),
		  show_root_type(BTRFS_EXTENT_TREE_OBJECTID),
		  __entry->num_bytes, __entry->empty_size, __entry->data,
		  __entry->num_bytes, __entry->empty_size, __entry->data,
		  __print_flags((unsigned long)__entry->data, "|",
		  __print_flags((unsigned long)__entry->data, "|",
@@ -973,8 +981,8 @@ DECLARE_EVENT_CLASS(btrfs__reserve_extent,
		__entry->len		= len;
		__entry->len		= len;
	),
	),


	TP_printk_btrfs("root = %Lu(%s), block_group = %Lu, flags = %Lu(%s), "
	TP_printk_btrfs("root=%Lu(%s) block_group=%Lu flags=%Lu(%s) "
		  "start = %Lu, len = %Lu",
		  "start=%Lu len=%Lu",
		  show_root_type(BTRFS_EXTENT_TREE_OBJECTID),
		  show_root_type(BTRFS_EXTENT_TREE_OBJECTID),
		  __entry->bg_objectid,
		  __entry->bg_objectid,
		  __entry->flags, __print_flags((unsigned long)__entry->flags,
		  __entry->flags, __print_flags((unsigned long)__entry->flags,
@@ -1025,8 +1033,8 @@ TRACE_EVENT(btrfs_find_cluster,
		__entry->min_bytes	= min_bytes;
		__entry->min_bytes	= min_bytes;
	),
	),


	TP_printk_btrfs("block_group = %Lu, flags = %Lu(%s), start = %Lu, len = %Lu,"
	TP_printk_btrfs("block_group=%Lu flags=%Lu(%s) start=%Lu len=%Lu "
		  " empty_size = %Lu, min_bytes = %Lu", __entry->bg_objectid,
		  "empty_size=%Lu min_bytes=%Lu", __entry->bg_objectid,
		  __entry->flags,
		  __entry->flags,
		  __print_flags((unsigned long)__entry->flags, "|",
		  __print_flags((unsigned long)__entry->flags, "|",
				BTRFS_GROUP_FLAGS), __entry->start,
				BTRFS_GROUP_FLAGS), __entry->start,
@@ -1075,8 +1083,8 @@ TRACE_EVENT(btrfs_setup_cluster,
		__entry->bitmap		= bitmap;
		__entry->bitmap		= bitmap;
	),
	),


	TP_printk_btrfs("block_group = %Lu, flags = %Lu(%s), window_start = %Lu, "
	TP_printk_btrfs("block_group=%Lu flags=%Lu(%s) window_start=%Lu "
		  "size = %Lu, max_size = %Lu, bitmap = %d",
		  "size=%Lu max_size=%Lu bitmap=%d",
		  __entry->bg_objectid,
		  __entry->bg_objectid,
		  __entry->flags,
		  __entry->flags,
		  __print_flags((unsigned long)__entry->flags, "|",
		  __print_flags((unsigned long)__entry->flags, "|",
@@ -1103,7 +1111,7 @@ TRACE_EVENT(alloc_extent_state,
		__entry->ip	= IP
		__entry->ip	= IP
	),
	),


	TP_printk("state=%p; mask = %s; caller = %pS", __entry->state,
	TP_printk("state=%p mask=%s caller=%pS", __entry->state,
		  show_gfp_flags(__entry->mask), (void *)__entry->ip)
		  show_gfp_flags(__entry->mask), (void *)__entry->ip)
);
);


@@ -1123,7 +1131,7 @@ TRACE_EVENT(free_extent_state,
		__entry->ip = IP
		__entry->ip = IP
	),
	),


	TP_printk(" state=%p; caller = %pS", __entry->state,
	TP_printk("state=%p caller=%pS", __entry->state,
		  (void *)__entry->ip)
		  (void *)__entry->ip)
);
);


@@ -1151,28 +1159,32 @@ DECLARE_EVENT_CLASS(btrfs__work,
		__entry->normal_work	= &work->normal_work;
		__entry->normal_work	= &work->normal_work;
	),
	),


	TP_printk_btrfs("work=%p (normal_work=%p), wq=%p, func=%pf, ordered_func=%p,"
	TP_printk_btrfs("work=%p (normal_work=%p) wq=%p func=%pf ordered_func=%p "
		  "ordered_free=%p",
		  "ordered_free=%p",
		  __entry->work, __entry->normal_work, __entry->wq,
		  __entry->work, __entry->normal_work, __entry->wq,
		   __entry->func, __entry->ordered_func, __entry->ordered_free)
		   __entry->func, __entry->ordered_func, __entry->ordered_free)
);
);


/* For situiations that the work is freed */
/*
 * For situiations when the work is freed, we pass fs_info and a tag that that
 * matches address of the work structure so it can be paired with the
 * scheduling event.
 */
DECLARE_EVENT_CLASS(btrfs__work__done,
DECLARE_EVENT_CLASS(btrfs__work__done,


	TP_PROTO(struct btrfs_work *work),
	TP_PROTO(struct btrfs_fs_info *fs_info, void *wtag),


	TP_ARGS(work),
	TP_ARGS(fs_info, wtag),


	TP_STRUCT__entry_btrfs(
	TP_STRUCT__entry_btrfs(
		__field(	void *,	work			)
		__field(	void *,	wtag			)
	),
	),


	TP_fast_assign_btrfs(btrfs_work_owner(work),
	TP_fast_assign_btrfs(fs_info,
		__entry->work		= work;
		__entry->wtag		= wtag;
	),
	),


	TP_printk_btrfs("work->%p", __entry->work)
	TP_printk_btrfs("work->%p", __entry->wtag)
);
);


DEFINE_EVENT(btrfs__work, btrfs_work_queued,
DEFINE_EVENT(btrfs__work, btrfs_work_queued,
@@ -1191,9 +1203,9 @@ DEFINE_EVENT(btrfs__work, btrfs_work_sched,


DEFINE_EVENT(btrfs__work__done, btrfs_all_work_done,
DEFINE_EVENT(btrfs__work__done, btrfs_all_work_done,


	TP_PROTO(struct btrfs_work *work),
	TP_PROTO(struct btrfs_fs_info *fs_info, void *wtag),


	TP_ARGS(work)
	TP_ARGS(fs_info, wtag)
);
);


DEFINE_EVENT(btrfs__work, btrfs_ordered_sched,
DEFINE_EVENT(btrfs__work, btrfs_ordered_sched,
@@ -1221,7 +1233,7 @@ DECLARE_EVENT_CLASS(btrfs__workqueue,
		__entry->high		= high;
		__entry->high		= high;
	),
	),


	TP_printk_btrfs("name=%s%s, wq=%p", __get_str(name),
	TP_printk_btrfs("name=%s%s wq=%p", __get_str(name),
		  __print_flags(__entry->high, "",
		  __print_flags(__entry->high, "",
				{(WQ_HIGHPRI),	"-high"}),
				{(WQ_HIGHPRI),	"-high"}),
		  __entry->wq)
		  __entry->wq)
@@ -1276,7 +1288,7 @@ DECLARE_EVENT_CLASS(btrfs__qgroup_data_map,
		__entry->free_reserved	=	free_reserved;
		__entry->free_reserved	=	free_reserved;
	),
	),


	TP_printk_btrfs("rootid=%llu, ino=%lu, free_reserved=%llu",
	TP_printk_btrfs("rootid=%llu ino=%lu free_reserved=%llu",
		  __entry->rootid, __entry->ino, __entry->free_reserved)
		  __entry->rootid, __entry->ino, __entry->free_reserved)
);
);


@@ -1323,7 +1335,7 @@ DECLARE_EVENT_CLASS(btrfs__qgroup_rsv_data,
		__entry->op		= op;
		__entry->op		= op;
	),
	),


	TP_printk_btrfs("root=%llu, ino=%lu, start=%llu, len=%llu, reserved=%llu, op=%s",
	TP_printk_btrfs("root=%llu ino=%lu start=%llu len=%llu reserved=%llu op=%s",
		  __entry->rootid, __entry->ino, __entry->start, __entry->len,
		  __entry->rootid, __entry->ino, __entry->start, __entry->len,
		  __entry->reserved,
		  __entry->reserved,
		  __print_flags((unsigned long)__entry->op, "",
		  __print_flags((unsigned long)__entry->op, "",
@@ -1361,7 +1373,7 @@ DECLARE_EVENT_CLASS(btrfs__qgroup_delayed_ref,
		__entry->reserved	= reserved;
		__entry->reserved	= reserved;
	),
	),


	TP_printk_btrfs("root=%llu, reserved=%llu, op=free",
	TP_printk_btrfs("root=%llu reserved=%llu op=free",
		  __entry->ref_root, __entry->reserved)
		  __entry->ref_root, __entry->reserved)
);
);


@@ -1388,7 +1400,7 @@ DECLARE_EVENT_CLASS(btrfs_qgroup_extent,
		__entry->num_bytes	= rec->num_bytes;
		__entry->num_bytes	= rec->num_bytes;
	),
	),


	TP_printk_btrfs("bytenr = %llu, num_bytes = %llu",
	TP_printk_btrfs("bytenr=%llu num_bytes=%llu",
		  (unsigned long long)__entry->bytenr,
		  (unsigned long long)__entry->bytenr,
		  (unsigned long long)__entry->num_bytes)
		  (unsigned long long)__entry->num_bytes)
);
);
@@ -1430,7 +1442,7 @@ TRACE_EVENT(btrfs_qgroup_account_extent,
		__entry->nr_new_roots	= nr_new_roots;
		__entry->nr_new_roots	= nr_new_roots;
	),
	),


	TP_printk_btrfs("bytenr = %llu, num_bytes = %llu, nr_old_roots = %llu, "
	TP_printk_btrfs("bytenr=%llu num_bytes=%llu nr_old_roots=%llu "
		  "nr_new_roots=%llu",
		  "nr_new_roots=%llu",
		  __entry->bytenr,
		  __entry->bytenr,
		  __entry->num_bytes,
		  __entry->num_bytes,
@@ -1457,7 +1469,7 @@ TRACE_EVENT(qgroup_update_counters,
		__entry->cur_new_count	= cur_new_count;
		__entry->cur_new_count	= cur_new_count;
	),
	),


	TP_printk_btrfs("qgid = %llu, cur_old_count = %llu, cur_new_count = %llu",
	TP_printk_btrfs("qgid=%llu cur_old_count=%llu cur_new_count=%llu",
		  __entry->qgid,
		  __entry->qgid,
		  __entry->cur_old_count,
		  __entry->cur_old_count,
		  __entry->cur_new_count)
		  __entry->cur_new_count)