diff options
Diffstat (limited to 'fs/f2fs/debug.c')
-rw-r--r-- | fs/f2fs/debug.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/fs/f2fs/debug.c b/fs/f2fs/debug.c index 3de9d20d0c14..b52c12cf5873 100644 --- a/fs/f2fs/debug.c +++ b/fs/f2fs/debug.c | |||
@@ -86,7 +86,6 @@ static void update_sit_info(struct f2fs_sb_info *sbi) | |||
86 | { | 86 | { |
87 | struct f2fs_stat_info *si = F2FS_STAT(sbi); | 87 | struct f2fs_stat_info *si = F2FS_STAT(sbi); |
88 | unsigned int blks_per_sec, hblks_per_sec, total_vblocks, bimodal, dist; | 88 | unsigned int blks_per_sec, hblks_per_sec, total_vblocks, bimodal, dist; |
89 | struct sit_info *sit_i = SIT_I(sbi); | ||
90 | unsigned int segno, vblocks; | 89 | unsigned int segno, vblocks; |
91 | int ndirty = 0; | 90 | int ndirty = 0; |
92 | 91 | ||
@@ -94,7 +93,6 @@ static void update_sit_info(struct f2fs_sb_info *sbi) | |||
94 | total_vblocks = 0; | 93 | total_vblocks = 0; |
95 | blks_per_sec = sbi->segs_per_sec * (1 << sbi->log_blocks_per_seg); | 94 | blks_per_sec = sbi->segs_per_sec * (1 << sbi->log_blocks_per_seg); |
96 | hblks_per_sec = blks_per_sec / 2; | 95 | hblks_per_sec = blks_per_sec / 2; |
97 | mutex_lock(&sit_i->sentry_lock); | ||
98 | for (segno = 0; segno < TOTAL_SEGS(sbi); segno += sbi->segs_per_sec) { | 96 | for (segno = 0; segno < TOTAL_SEGS(sbi); segno += sbi->segs_per_sec) { |
99 | vblocks = get_valid_blocks(sbi, segno, sbi->segs_per_sec); | 97 | vblocks = get_valid_blocks(sbi, segno, sbi->segs_per_sec); |
100 | dist = abs(vblocks - hblks_per_sec); | 98 | dist = abs(vblocks - hblks_per_sec); |
@@ -105,7 +103,6 @@ static void update_sit_info(struct f2fs_sb_info *sbi) | |||
105 | ndirty++; | 103 | ndirty++; |
106 | } | 104 | } |
107 | } | 105 | } |
108 | mutex_unlock(&sit_i->sentry_lock); | ||
109 | dist = TOTAL_SECS(sbi) * hblks_per_sec * hblks_per_sec / 100; | 106 | dist = TOTAL_SECS(sbi) * hblks_per_sec * hblks_per_sec / 100; |
110 | si->bimodal = bimodal / dist; | 107 | si->bimodal = bimodal / dist; |
111 | if (si->dirty_count) | 108 | if (si->dirty_count) |
@@ -236,6 +233,7 @@ static int stat_show(struct seq_file *s, void *v) | |||
236 | si->dirty_count); | 233 | si->dirty_count); |
237 | seq_printf(s, " - Prefree: %d\n - Free: %d (%d)\n\n", | 234 | seq_printf(s, " - Prefree: %d\n - Free: %d (%d)\n\n", |
238 | si->prefree_count, si->free_segs, si->free_secs); | 235 | si->prefree_count, si->free_segs, si->free_secs); |
236 | seq_printf(s, "CP calls: %d\n", si->cp_count); | ||
239 | seq_printf(s, "GC calls: %d (BG: %d)\n", | 237 | seq_printf(s, "GC calls: %d (BG: %d)\n", |
240 | si->call_count, si->bg_gc); | 238 | si->call_count, si->bg_gc); |
241 | seq_printf(s, " - data segments : %d\n", si->data_segs); | 239 | seq_printf(s, " - data segments : %d\n", si->data_segs); |
@@ -252,10 +250,10 @@ static int stat_show(struct seq_file *s, void *v) | |||
252 | si->ndirty_dent, si->ndirty_dirs); | 250 | si->ndirty_dent, si->ndirty_dirs); |
253 | seq_printf(s, " - meta: %4d in %4d\n", | 251 | seq_printf(s, " - meta: %4d in %4d\n", |
254 | si->ndirty_meta, si->meta_pages); | 252 | si->ndirty_meta, si->meta_pages); |
255 | seq_printf(s, " - NATs: %5d > %lu\n", | 253 | seq_printf(s, " - NATs: %9d\n - SITs: %9d\n", |
256 | si->nats, NM_WOUT_THRESHOLD); | 254 | si->nats, si->sits); |
257 | seq_printf(s, " - SITs: %5d\n - free_nids: %5d\n", | 255 | seq_printf(s, " - free_nids: %9d\n", |
258 | si->sits, si->fnids); | 256 | si->fnids); |
259 | seq_puts(s, "\nDistribution of User Blocks:"); | 257 | seq_puts(s, "\nDistribution of User Blocks:"); |
260 | seq_puts(s, " [ valid | invalid | free ]\n"); | 258 | seq_puts(s, " [ valid | invalid | free ]\n"); |
261 | seq_puts(s, " ["); | 259 | seq_puts(s, " ["); |