btrfs: tracepoints: add btrfs prefix to names where it's missing
Most of our tracepoints have the 'btrfs_' prefix in their names but a few of them are missing, making it inconsistent. So add the prefix to the ones that are missing it, creating consistency, making it clear for users these are btrfs tracepoints and eventually avoid name collisions with other tracepoints defined by other kernel subsystems. Signed-off-by: Filipe Manana <fdmanana@suse.com> Reviewed-by: David Sterba <dsterba@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
committed by
David Sterba
parent
9d072bfab5
commit
81eb6ce8b5
@@ -4376,7 +4376,7 @@ static noinline int find_free_extent(struct btrfs_root *root,
|
||||
ins->objectid = 0;
|
||||
ins->offset = 0;
|
||||
|
||||
trace_find_free_extent(root, ffe_ctl);
|
||||
trace_btrfs_find_free_extent(root, ffe_ctl);
|
||||
|
||||
space_info = btrfs_find_space_info(fs_info, ffe_ctl->flags);
|
||||
if (!space_info) {
|
||||
@@ -4427,7 +4427,7 @@ static noinline int find_free_extent(struct btrfs_root *root,
|
||||
}
|
||||
}
|
||||
search:
|
||||
trace_find_free_extent_search_loop(root, ffe_ctl);
|
||||
trace_btrfs_find_free_extent_search_loop(root, ffe_ctl);
|
||||
ffe_ctl->have_caching_bg = false;
|
||||
if (ffe_ctl->index == btrfs_bg_flags_to_raid_index(ffe_ctl->flags) ||
|
||||
ffe_ctl->index == 0)
|
||||
@@ -4479,7 +4479,7 @@ search:
|
||||
}
|
||||
|
||||
have_block_group:
|
||||
trace_find_free_extent_have_block_group(root, ffe_ctl, block_group);
|
||||
trace_btrfs_find_free_extent_have_block_group(root, ffe_ctl, block_group);
|
||||
ffe_ctl->cached = btrfs_block_group_done(block_group);
|
||||
if (unlikely(!ffe_ctl->cached)) {
|
||||
ffe_ctl->have_caching_bg = true;
|
||||
|
||||
+9
-10
@@ -83,7 +83,7 @@ static void qgroup_rsv_add(struct btrfs_fs_info *fs_info,
|
||||
struct btrfs_qgroup *qgroup, u64 num_bytes,
|
||||
enum btrfs_qgroup_rsv_type type)
|
||||
{
|
||||
trace_qgroup_update_reserve(fs_info, qgroup, num_bytes, type);
|
||||
trace_btrfs_qgroup_update_reserve(fs_info, qgroup, num_bytes, type);
|
||||
qgroup->rsv.values[type] += num_bytes;
|
||||
}
|
||||
|
||||
@@ -91,7 +91,7 @@ static void qgroup_rsv_release(struct btrfs_fs_info *fs_info,
|
||||
struct btrfs_qgroup *qgroup, u64 num_bytes,
|
||||
enum btrfs_qgroup_rsv_type type)
|
||||
{
|
||||
trace_qgroup_update_reserve(fs_info, qgroup, -(s64)num_bytes, type);
|
||||
trace_btrfs_qgroup_update_reserve(fs_info, qgroup, -(s64)num_bytes, type);
|
||||
if (qgroup->rsv.values[type] >= num_bytes) {
|
||||
qgroup->rsv.values[type] -= num_bytes;
|
||||
return;
|
||||
@@ -2837,8 +2837,8 @@ static void qgroup_update_counters(struct btrfs_fs_info *fs_info,
|
||||
cur_old_count = btrfs_qgroup_get_old_refcnt(qg, seq);
|
||||
cur_new_count = btrfs_qgroup_get_new_refcnt(qg, seq);
|
||||
|
||||
trace_qgroup_update_counters(fs_info, qg, cur_old_count,
|
||||
cur_new_count);
|
||||
trace_btrfs_qgroup_update_counters(fs_info, qg, cur_old_count,
|
||||
cur_new_count);
|
||||
|
||||
/* Rfer update part */
|
||||
if (cur_old_count == 0 && cur_new_count > 0) {
|
||||
@@ -3100,8 +3100,7 @@ cleanup:
|
||||
kfree(record);
|
||||
|
||||
}
|
||||
trace_qgroup_num_dirty_extents(fs_info, trans->transid,
|
||||
num_dirty_extents);
|
||||
trace_btrfs_qgroup_num_dirty_extents(fs_info, trans->transid, num_dirty_extents);
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -4474,7 +4473,7 @@ int btrfs_qgroup_reserve_meta(struct btrfs_root *root, int num_bytes,
|
||||
return 0;
|
||||
|
||||
BUG_ON(num_bytes != round_down(num_bytes, fs_info->nodesize));
|
||||
trace_qgroup_meta_reserve(root, (s64)num_bytes, type);
|
||||
trace_btrfs_qgroup_meta_reserve(root, (s64)num_bytes, type);
|
||||
ret = qgroup_reserve(root, num_bytes, enforce, type);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
@@ -4519,7 +4518,7 @@ void btrfs_qgroup_free_meta_all_pertrans(struct btrfs_root *root)
|
||||
return;
|
||||
|
||||
/* TODO: Update trace point to handle such free */
|
||||
trace_qgroup_meta_free_all_pertrans(root);
|
||||
trace_btrfs_qgroup_meta_free_all_pertrans(root);
|
||||
/* Special value -1 means to free all reserved space */
|
||||
btrfs_qgroup_free_refroot(fs_info, btrfs_root_id(root), (u64)-1,
|
||||
BTRFS_QGROUP_RSV_META_PERTRANS);
|
||||
@@ -4541,7 +4540,7 @@ void __btrfs_qgroup_free_meta(struct btrfs_root *root, int num_bytes,
|
||||
*/
|
||||
num_bytes = sub_root_meta_rsv(root, num_bytes, type);
|
||||
BUG_ON(num_bytes != round_down(num_bytes, fs_info->nodesize));
|
||||
trace_qgroup_meta_reserve(root, -(s64)num_bytes, type);
|
||||
trace_btrfs_qgroup_meta_reserve(root, -(s64)num_bytes, type);
|
||||
btrfs_qgroup_free_refroot(fs_info, btrfs_root_id(root), num_bytes, type);
|
||||
}
|
||||
|
||||
@@ -4595,7 +4594,7 @@ void btrfs_qgroup_convert_reserved_meta(struct btrfs_root *root, int num_bytes)
|
||||
/* Same as btrfs_qgroup_free_meta_prealloc() */
|
||||
num_bytes = sub_root_meta_rsv(root, num_bytes,
|
||||
BTRFS_QGROUP_RSV_META_PREALLOC);
|
||||
trace_qgroup_meta_convert(root, num_bytes);
|
||||
trace_btrfs_qgroup_meta_convert(root, num_bytes);
|
||||
qgroup_convert_meta(fs_info, btrfs_root_id(root), num_bytes);
|
||||
if (!sb_rdonly(fs_info->sb))
|
||||
add_root_meta_rsv(root, num_bytes, BTRFS_QGROUP_RSV_META_PERTRANS);
|
||||
|
||||
@@ -1236,7 +1236,7 @@ DEFINE_EVENT(btrfs__reserved_extent, btrfs_reserved_extent_free,
|
||||
TP_ARGS(fs_info, start, len)
|
||||
);
|
||||
|
||||
TRACE_EVENT(find_free_extent,
|
||||
TRACE_EVENT(btrfs_find_free_extent,
|
||||
|
||||
TP_PROTO(const struct btrfs_root *root,
|
||||
const struct find_free_extent_ctl *ffe_ctl),
|
||||
@@ -1264,7 +1264,7 @@ TRACE_EVENT(find_free_extent,
|
||||
BTRFS_GROUP_FLAGS))
|
||||
);
|
||||
|
||||
TRACE_EVENT(find_free_extent_search_loop,
|
||||
TRACE_EVENT(btrfs_find_free_extent_search_loop,
|
||||
|
||||
TP_PROTO(const struct btrfs_root *root,
|
||||
const struct find_free_extent_ctl *ffe_ctl),
|
||||
@@ -1294,7 +1294,7 @@ TRACE_EVENT(find_free_extent_search_loop,
|
||||
__entry->loop)
|
||||
);
|
||||
|
||||
TRACE_EVENT(find_free_extent_have_block_group,
|
||||
TRACE_EVENT(btrfs_find_free_extent_have_block_group,
|
||||
|
||||
TP_PROTO(const struct btrfs_root *root,
|
||||
const struct find_free_extent_ctl *ffe_ctl,
|
||||
@@ -1739,7 +1739,7 @@ DEFINE_EVENT(btrfs_qgroup_extent, btrfs_qgroup_trace_extent,
|
||||
TP_ARGS(fs_info, rec, bytenr)
|
||||
);
|
||||
|
||||
TRACE_EVENT(qgroup_num_dirty_extents,
|
||||
TRACE_EVENT(btrfs_qgroup_num_dirty_extents,
|
||||
|
||||
TP_PROTO(const struct btrfs_fs_info *fs_info, u64 transid,
|
||||
u64 num_dirty_extents),
|
||||
@@ -1793,7 +1793,7 @@ TRACE_EVENT(btrfs_qgroup_account_extent,
|
||||
__entry->nr_new_roots)
|
||||
);
|
||||
|
||||
TRACE_EVENT(qgroup_update_counters,
|
||||
TRACE_EVENT(btrfs_qgroup_update_counters,
|
||||
|
||||
TP_PROTO(const struct btrfs_fs_info *fs_info,
|
||||
const struct btrfs_qgroup *qgroup,
|
||||
@@ -1822,7 +1822,7 @@ TRACE_EVENT(qgroup_update_counters,
|
||||
__entry->cur_old_count, __entry->cur_new_count)
|
||||
);
|
||||
|
||||
TRACE_EVENT(qgroup_update_reserve,
|
||||
TRACE_EVENT(btrfs_qgroup_update_reserve,
|
||||
|
||||
TP_PROTO(const struct btrfs_fs_info *fs_info, const struct btrfs_qgroup *qgroup,
|
||||
s64 diff, int type),
|
||||
@@ -1848,7 +1848,7 @@ TRACE_EVENT(qgroup_update_reserve,
|
||||
__entry->cur_reserved, __entry->diff)
|
||||
);
|
||||
|
||||
TRACE_EVENT(qgroup_meta_reserve,
|
||||
TRACE_EVENT(btrfs_qgroup_meta_reserve,
|
||||
|
||||
TP_PROTO(const struct btrfs_root *root, s64 diff, int type),
|
||||
|
||||
@@ -1871,7 +1871,7 @@ TRACE_EVENT(qgroup_meta_reserve,
|
||||
__print_symbolic(__entry->type, QGROUP_RSV_TYPES), __entry->diff)
|
||||
);
|
||||
|
||||
TRACE_EVENT(qgroup_meta_convert,
|
||||
TRACE_EVENT(btrfs_qgroup_meta_convert,
|
||||
|
||||
TP_PROTO(const struct btrfs_root *root, s64 diff),
|
||||
|
||||
@@ -1894,7 +1894,7 @@ TRACE_EVENT(qgroup_meta_convert,
|
||||
__entry->diff)
|
||||
);
|
||||
|
||||
TRACE_EVENT(qgroup_meta_free_all_pertrans,
|
||||
TRACE_EVENT(btrfs_qgroup_meta_free_all_pertrans,
|
||||
|
||||
TP_PROTO(struct btrfs_root *root),
|
||||
|
||||
|
||||
Reference in New Issue
Block a user