You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
f2fs: add block count by in-place-update in stat info
This patch adds block count by in-place-update in stat. Signed-off-by: Changman Lee <cm224.lee@samsung.com> Reviewed-by: Chao Yu <chao2.yu@samsung.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
This commit is contained in:
committed by
Jaegeuk Kim
parent
dd802406e3
commit
b9a2c25207
@@ -79,6 +79,8 @@ static void update_general_status(struct f2fs_sb_info *sbi)
|
||||
si->segment_count[i] = sbi->segment_count[i];
|
||||
si->block_count[i] = sbi->block_count[i];
|
||||
}
|
||||
|
||||
si->inplace_count = atomic_read(&sbi->inplace_count);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -277,6 +279,7 @@ static int stat_show(struct seq_file *s, void *v)
|
||||
for (j = 0; j < si->util_free; j++)
|
||||
seq_putc(s, '-');
|
||||
seq_puts(s, "]\n\n");
|
||||
seq_printf(s, "IPU: %u blocks\n", si->inplace_count);
|
||||
seq_printf(s, "SSR: %u blocks in %u segments\n",
|
||||
si->block_count[SSR], si->segment_count[SSR]);
|
||||
seq_printf(s, "LFS: %u blocks in %u segments\n",
|
||||
@@ -331,6 +334,7 @@ int f2fs_build_stats(struct f2fs_sb_info *sbi)
|
||||
|
||||
atomic_set(&sbi->inline_inode, 0);
|
||||
atomic_set(&sbi->inline_dir, 0);
|
||||
atomic_set(&sbi->inplace_count, 0);
|
||||
|
||||
mutex_lock(&f2fs_stat_mutex);
|
||||
list_add_tail(&si->stat_list, &f2fs_stat_list);
|
||||
|
||||
Reference in New Issue
Block a user