ext4: Add new ext4 trim tracepoints
Add ext4_trim_extent and ext4_trim_all_free. Reviewed-by: Lukas Czerner <lczerner@redhat.com> Signed-off-by: Tao Ma <boyu.mt@taobao.com> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
This commit is contained in:
@@ -4780,6 +4780,8 @@ static void ext4_trim_extent(struct super_block *sb, int start, int count,
|
||||
{
|
||||
struct ext4_free_extent ex;
|
||||
|
||||
trace_ext4_trim_extent(sb, group, start, count);
|
||||
|
||||
assert_spin_locked(ext4_group_lock_ptr(sb, group));
|
||||
|
||||
ex.fe_start = start;
|
||||
@@ -4825,6 +4827,8 @@ ext4_trim_all_free(struct super_block *sb, ext4_group_t group,
|
||||
struct ext4_buddy e4b;
|
||||
int ret;
|
||||
|
||||
trace_ext4_trim_all_free(sb, group, start, max);
|
||||
|
||||
ret = ext4_mb_load_buddy(sb, group, &e4b);
|
||||
if (ret) {
|
||||
ext4_error(sb, "Error in loading buddy "
|
||||
|
Reference in New Issue
Block a user