f2fs: show # of APPEND and UPDATE inodes
authorJaegeuk Kim <jaegeuk@kernel.org>
Wed, 1 Feb 2017 23:40:11 +0000 (15:40 -0800)
committerJaegeuk Kim <jaegeuk@kernel.org>
Thu, 23 Feb 2017 04:54:53 +0000 (20:54 -0800)
This patch shows cached # of APPEND and UPDATE inode entries.

Reviewed-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
fs/f2fs/debug.c
fs/f2fs/f2fs.h

index 0ca977a94c13ca556c1cba1dbc59ea13c0da551f..de8da9fc5c992b9e2a1cb9bf7add9ee32c294fd6 100644 (file)
@@ -70,6 +70,8 @@ static void update_general_status(struct f2fs_sb_info *sbi)
        si->inline_xattr = atomic_read(&sbi->inline_xattr);
        si->inline_inode = atomic_read(&sbi->inline_inode);
        si->inline_dir = atomic_read(&sbi->inline_dir);
+       si->append = sbi->im[APPEND_INO].ino_num;
+       si->update = sbi->im[UPDATE_INO].ino_num;
        si->orphans = sbi->im[ORPHAN_INO].ino_num;
        si->utilization = utilization(sbi);
 
@@ -264,8 +266,8 @@ static int stat_show(struct seq_file *s, void *v)
                           si->inline_inode);
                seq_printf(s, "  - Inline_dentry Inode: %u\n",
                           si->inline_dir);
-               seq_printf(s, "  - Orphan Inode: %u\n",
-                          si->orphans);
+               seq_printf(s, "  - Orphan/Append/Update Inode: %u, %u, %u\n",
+                          si->orphans, si->append, si->update);
                seq_printf(s, "\nMain area: %d segs, %d secs %d zones\n",
                           si->main_area_segs, si->main_area_sections,
                           si->main_area_zones);
index 8c2c12fa2b082e1af54eb76073bd569eb3f45bcd..59a32e4b02f474d59596d964b46e5dccc4e7aeab 100644 (file)
@@ -2301,7 +2301,7 @@ struct f2fs_stat_info {
        int nats, dirty_nats, sits, dirty_sits, free_nids, alloc_nids;
        int total_count, utilization;
        int bg_gc, nr_wb_cp_data, nr_wb_data, nr_flush, nr_discard;
-       int inline_xattr, inline_inode, inline_dir, orphans;
+       int inline_xattr, inline_inode, inline_dir, append, update, orphans;
        int aw_cnt, max_aw_cnt;
        unsigned int valid_count, valid_node_count, valid_inode_count, discard_blks;
        unsigned int bimodal, avg_vblocks;