Skip to contentSkip to conversation

ext4: Add new ext4 trim tracepoints

PATCH New Tao Ma 1 participant 1 message Feb 1, 2011

Subsystems (2)
lore
Share & tools
lore

Tao Ma

author
#0 lore raw

PATCH 1/1 ext4: Add new ext4 trim tracepoints

From: Tao Ma <[email protected]>

Add ext4_trim_extent and ext4_trim_all_free.

---
 fs/ext4/mballoc.c           |    4 +++
 include/trace/events/ext4.h |   49 +++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 53 insertions(+), 0 deletions(-)
fs/ext4/mballoc.c +4 -0
index 02cff4a..fb5f765 100644
@@ -4715,6 +4715,8 @@ static int ext4_trim_extent(struct super_block *sb, int start, int count,
 	struct ext4_free_extent ex;
 	int ret = 0;
 
+	trace_ext4_trim_extent(sb, group, start, count);
+
 	assert_spin_locked(ext4_group_lock_ptr(sb, group));
 
 	ex.fe_start = start;
@@ -4767,6 +4769,8 @@ ext4_grpblk_t ext4_trim_all_free(struct super_block *sb, struct ext4_buddy *e4b,
 	group = e4b->bd_group;
 	start = (e4b->bd_info->bb_first_free > start) ?
 		e4b->bd_info->bb_first_free : start;
+
+	trace_ext4_trim_all_free(sb, group, start, max);
 	ext4_lock_group(sb, group);
 
 	while (start < max) {
include/trace/events/ext4.h +49 -0

55 lines not on this page · raw message

Signature · 1 line
1.6.3.GIT