aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ocfs2/alloc.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/ocfs2/alloc.c')
-rw-r--r--fs/ocfs2/alloc.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/fs/ocfs2/alloc.c b/fs/ocfs2/alloc.c
index ae3ea783dad7..ed553c60de82 100644
--- a/fs/ocfs2/alloc.c
+++ b/fs/ocfs2/alloc.c
@@ -7196,6 +7196,8 @@ static int ocfs2_trim_extent(struct super_block *sb,
7196 discard = le64_to_cpu(gd->bg_blkno) + 7196 discard = le64_to_cpu(gd->bg_blkno) +
7197 ocfs2_clusters_to_blocks(sb, start); 7197 ocfs2_clusters_to_blocks(sb, start);
7198 7198
7199 trace_ocfs2_trim_extent(sb, (unsigned long long)discard, bcount);
7200
7199 return sb_issue_discard(sb, discard, bcount, GFP_NOFS, 0); 7201 return sb_issue_discard(sb, discard, bcount, GFP_NOFS, 0);
7200} 7202}
7201 7203
@@ -7209,6 +7211,9 @@ static int ocfs2_trim_group(struct super_block *sb,
7209 if (le16_to_cpu(gd->bg_free_bits_count) < minbits) 7211 if (le16_to_cpu(gd->bg_free_bits_count) < minbits)
7210 return 0; 7212 return 0;
7211 7213
7214 trace_ocfs2_trim_group((unsigned long long)le64_to_cpu(gd->bg_blkno),
7215 start, max, minbits);
7216
7212 while (start < max) { 7217 while (start < max) {
7213 start = ocfs2_find_next_zero_bit(bitmap, max, start); 7218 start = ocfs2_find_next_zero_bit(bitmap, max, start);
7214 if (start >= max) 7219 if (start >= max)
@@ -7292,6 +7297,8 @@ int ocfs2_trim_fs(struct super_block *sb, struct fstrim_range *range)
7292 if (start + len > le32_to_cpu(main_bm->i_clusters)) 7297 if (start + len > le32_to_cpu(main_bm->i_clusters))
7293 len = le32_to_cpu(main_bm->i_clusters) - start; 7298 len = le32_to_cpu(main_bm->i_clusters) - start;
7294 7299
7300 trace_ocfs2_trim_fs(start, len, minlen);
7301
7295 /* Determine first and last group to examine based on start and len */ 7302 /* Determine first and last group to examine based on start and len */
7296 first_group = ocfs2_which_cluster_group(main_bm_inode, start); 7303 first_group = ocfs2_which_cluster_group(main_bm_inode, start);
7297 if (first_group == osb->first_cluster_group_blkno) 7304 if (first_group == osb->first_cluster_group_blkno)