mirror of https://gitee.com/openkylin/linux.git
f2fs: add nat/sit entries into status
This patch adds NAT/SIT entry informations. Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
This commit is contained in:
parent
7aed0d4537
commit
dd4e4b59b1
|
@ -57,7 +57,9 @@ static void update_general_status(struct f2fs_sb_info *sbi)
|
||||||
si->node_pages = NODE_MAPPING(sbi)->nrpages;
|
si->node_pages = NODE_MAPPING(sbi)->nrpages;
|
||||||
si->meta_pages = META_MAPPING(sbi)->nrpages;
|
si->meta_pages = META_MAPPING(sbi)->nrpages;
|
||||||
si->nats = NM_I(sbi)->nat_cnt;
|
si->nats = NM_I(sbi)->nat_cnt;
|
||||||
si->sits = SIT_I(sbi)->dirty_sentries;
|
si->dirty_nats = NM_I(sbi)->dirty_nat_cnt;
|
||||||
|
si->sits = MAIN_SEGS(sbi);
|
||||||
|
si->dirty_sits = SIT_I(sbi)->dirty_sentries;
|
||||||
si->fnids = NM_I(sbi)->fcnt;
|
si->fnids = NM_I(sbi)->fcnt;
|
||||||
si->bg_gc = sbi->bg_gc;
|
si->bg_gc = sbi->bg_gc;
|
||||||
si->util_free = (int)(free_user_blocks(sbi) >> sbi->log_blocks_per_seg)
|
si->util_free = (int)(free_user_blocks(sbi) >> sbi->log_blocks_per_seg)
|
||||||
|
@ -260,8 +262,8 @@ static int stat_show(struct seq_file *s, void *v)
|
||||||
si->ndirty_dent, si->ndirty_dirs);
|
si->ndirty_dent, si->ndirty_dirs);
|
||||||
seq_printf(s, " - meta: %4d in %4d\n",
|
seq_printf(s, " - meta: %4d in %4d\n",
|
||||||
si->ndirty_meta, si->meta_pages);
|
si->ndirty_meta, si->meta_pages);
|
||||||
seq_printf(s, " - NATs: %9d\n - SITs: %9d\n",
|
seq_printf(s, " - NATs: %9d/%9d\n - SITs: %9d/%9d\n",
|
||||||
si->nats, si->sits);
|
si->dirty_nats, si->nats, si->dirty_sits, si->sits);
|
||||||
seq_printf(s, " - free_nids: %9d\n",
|
seq_printf(s, " - free_nids: %9d\n",
|
||||||
si->fnids);
|
si->fnids);
|
||||||
seq_puts(s, "\nDistribution of User Blocks:");
|
seq_puts(s, "\nDistribution of User Blocks:");
|
||||||
|
|
|
@ -1512,7 +1512,7 @@ struct f2fs_stat_info {
|
||||||
int main_area_segs, main_area_sections, main_area_zones;
|
int main_area_segs, main_area_sections, main_area_zones;
|
||||||
int hit_ext, total_ext;
|
int hit_ext, total_ext;
|
||||||
int ndirty_node, ndirty_dent, ndirty_dirs, ndirty_meta;
|
int ndirty_node, ndirty_dent, ndirty_dirs, ndirty_meta;
|
||||||
int nats, sits, fnids;
|
int nats, dirty_nats, sits, dirty_sits, fnids;
|
||||||
int total_count, utilization;
|
int total_count, utilization;
|
||||||
int bg_gc, inline_inode, inline_dir, inmem_pages;
|
int bg_gc, inline_inode, inline_dir, inmem_pages;
|
||||||
unsigned int valid_count, valid_node_count, valid_inode_count;
|
unsigned int valid_count, valid_node_count, valid_inode_count;
|
||||||
|
|
Loading…
Reference in New Issue