Skip to contentSkip to conversation

btrfs: qgroup: Remove duplicated trace points for qgroup_rsv_add/release()

PATCH In review Qu Wenruo 3 participants 3 messages Nov 13, 2018 – Jan 30, 2019 Btrfs file system

lore
Share & tools
lore

Qu Wenruo

author
#0 lore raw

PATCH 1/1 btrfs: qgroup: Remove duplicated trace points for qgroup_rsv_add/release()

Inside qgroup_rsv_add/release(), we have trace events trace_qgroup_update_reserve() to catch reserved space update.

However we still have two manual trace_qgroup_update_reserve() calls just outside these functions.

Remove these duplicated calls.

Fixes 64ee4e751a1c ("btrfs: qgroup: Update trace events to use new separate rsv types")
---
 fs/btrfs/qgroup.c | 2 --
 1 file changed, 2 deletions(-)
fs/btrfs/qgroup.c +0 -2
index 45868fd76209..c1fbd8a30fc4 100644
@@ -2952,7 +2952,6 @@ static int qgroup_reserve(struct btrfs_root *root, u64 num_bytes, bool enforce,
 
 		qg = unode_aux_to_qgroup(unode);
 
-		trace_qgroup_update_reserve(fs_info, qg, num_bytes, type);
 		qgroup_rsv_add(fs_info, qg, num_bytes, type);
 	}
 
@@ -3019,7 +3018,6 @@ void btrfs_qgroup_free_refroot(struct btrfs_fs_info *fs_info,
 
 		qg = unode_aux_to_qgroup(unode);
 
-		trace_qgroup_update_reserve(fs_info, qg, -(s64)num_bytes, type);
 		qgroup_rsv_release(fs_info, qg, num_bytes, type);
 
 		list_for_each_entry(glist, &qg->groups, next_group) {
Signature · 1 line
2.19.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 10 lines · Qu Wenruo

Inside qgroup_rsv_add/release(), we have trace events trace_qgroup_update_reserve() to catch reserved space update.

However we still have two manual trace_qgroup_update_reserve() calls just outside these functions.

Remove these duplicated calls.

Fixes 64ee4e751a1c ("btrfs: qgroup: Update trace events to use new separate rsv types")
Quoted 25 lines
---
 fs/btrfs/qgroup.c | 2 --
 1 file changed, 2 deletions(-)
fs/btrfs/qgroup.c +0 -2
index 45868fd76209..c1fbd8a30fc4 100644
@@ -2952,7 +2952,6 @@ static int qgroup_reserve(struct btrfs_root *root, u64 num_bytes, bool enforce,
 
 		qg = unode_aux_to_qgroup(unode);
 
-		trace_qgroup_update_reserve(fs_info, qg, num_bytes, type);
 		qgroup_rsv_add(fs_info, qg, num_bytes, type);
 	}
 
@@ -3019,7 +3018,6 @@ void btrfs_qgroup_free_refroot(struct btrfs_fs_info *fs_info,
 
 		qg = unode_aux_to_qgroup(unode);
 
-		trace_qgroup_update_reserve(fs_info, qg, -(s64)num_bytes, type);
 		qgroup_rsv_release(fs_info, qg, num_bytes, type);
 
 		list_for_each_entry(glist, &qg->groups, next_group) {
#2 lore raw
In reply to Qu Wenruo
Quoted 10 lines · Qu Wenruo

Inside qgroup_rsv_add/release(), we have trace events trace_qgroup_update_reserve() to catch reserved space update.

However we still have two manual trace_qgroup_update_reserve() calls just outside these functions.

Remove these duplicated calls.

Fixes 64ee4e751a1c ("btrfs: qgroup: Update trace events to use new separate rsv types")

Added to misc-next, thanks.