diff options
author | Changman Lee <cm224.lee@samsung.com> | 2014-02-13 01:12:29 -0500 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk.kim@samsung.com> | 2014-02-17 00:58:53 -0500 |
commit | 942e0be6219cc80384eb961feb963cab275bcbbf (patch) | |
tree | b38db31dd6a15cce11b5dc2310e342ad88249a59 | |
parent | 662befda25fb16d7164633c39e9e20aeac5107d9 (diff) |
f2fs: show counts of checkpoint in status
This patch shows the counts of checkpoint in f2fs' status.
Signed-off-by: Changman Lee <cm224.lee@samsung.com>
Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
-rw-r--r-- | fs/f2fs/checkpoint.c | 1 | ||||
-rw-r--r-- | fs/f2fs/debug.c | 1 | ||||
-rw-r--r-- | fs/f2fs/f2fs.h | 4 |
3 files changed, 5 insertions, 1 deletions
diff --git a/fs/f2fs/checkpoint.c b/fs/f2fs/checkpoint.c index deb60356f7cf..757b77b7118e 100644 --- a/fs/f2fs/checkpoint.c +++ b/fs/f2fs/checkpoint.c | |||
@@ -914,6 +914,7 @@ void write_checkpoint(struct f2fs_sb_info *sbi, bool is_umount) | |||
914 | unblock_operations(sbi); | 914 | unblock_operations(sbi); |
915 | mutex_unlock(&sbi->cp_mutex); | 915 | mutex_unlock(&sbi->cp_mutex); |
916 | 916 | ||
917 | stat_inc_cp_count(sbi->stat_info); | ||
917 | trace_f2fs_write_checkpoint(sbi->sb, is_umount, "finish checkpoint"); | 918 | trace_f2fs_write_checkpoint(sbi->sb, is_umount, "finish checkpoint"); |
918 | } | 919 | } |
919 | 920 | ||
diff --git a/fs/f2fs/debug.c b/fs/f2fs/debug.c index 3de9d20d0c14..46a12e46179a 100644 --- a/fs/f2fs/debug.c +++ b/fs/f2fs/debug.c | |||
@@ -236,6 +236,7 @@ static int stat_show(struct seq_file *s, void *v) | |||
236 | si->dirty_count); | 236 | si->dirty_count); |
237 | seq_printf(s, " - Prefree: %d\n - Free: %d (%d)\n\n", | 237 | seq_printf(s, " - Prefree: %d\n - Free: %d (%d)\n\n", |
238 | si->prefree_count, si->free_segs, si->free_secs); | 238 | si->prefree_count, si->free_segs, si->free_secs); |
239 | seq_printf(s, "CP calls: %d\n", si->cp_count); | ||
239 | seq_printf(s, "GC calls: %d (BG: %d)\n", | 240 | seq_printf(s, "GC calls: %d (BG: %d)\n", |
240 | si->call_count, si->bg_gc); | 241 | si->call_count, si->bg_gc); |
241 | seq_printf(s, " - data segments : %d\n", si->data_segs); | 242 | seq_printf(s, " - data segments : %d\n", si->data_segs); |
diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h index 817eccced9fe..91f4c5e7b6a2 100644 --- a/fs/f2fs/f2fs.h +++ b/fs/f2fs/f2fs.h | |||
@@ -1255,7 +1255,7 @@ struct f2fs_stat_info { | |||
1255 | int util_free, util_valid, util_invalid; | 1255 | int util_free, util_valid, util_invalid; |
1256 | int rsvd_segs, overp_segs; | 1256 | int rsvd_segs, overp_segs; |
1257 | int dirty_count, node_pages, meta_pages; | 1257 | int dirty_count, node_pages, meta_pages; |
1258 | int prefree_count, call_count; | 1258 | int prefree_count, call_count, cp_count; |
1259 | int tot_segs, node_segs, data_segs, free_segs, free_secs; | 1259 | int tot_segs, node_segs, data_segs, free_segs, free_secs; |
1260 | int tot_blks, data_blks, node_blks; | 1260 | int tot_blks, data_blks, node_blks; |
1261 | int curseg[NR_CURSEG_TYPE]; | 1261 | int curseg[NR_CURSEG_TYPE]; |
@@ -1272,6 +1272,7 @@ static inline struct f2fs_stat_info *F2FS_STAT(struct f2fs_sb_info *sbi) | |||
1272 | return (struct f2fs_stat_info *)sbi->stat_info; | 1272 | return (struct f2fs_stat_info *)sbi->stat_info; |
1273 | } | 1273 | } |
1274 | 1274 | ||
1275 | #define stat_inc_cp_count(si) ((si)->cp_count++) | ||
1275 | #define stat_inc_call_count(si) ((si)->call_count++) | 1276 | #define stat_inc_call_count(si) ((si)->call_count++) |
1276 | #define stat_inc_bggc_count(sbi) ((sbi)->bg_gc++) | 1277 | #define stat_inc_bggc_count(sbi) ((sbi)->bg_gc++) |
1277 | #define stat_inc_dirty_dir(sbi) ((sbi)->n_dirty_dirs++) | 1278 | #define stat_inc_dirty_dir(sbi) ((sbi)->n_dirty_dirs++) |
@@ -1326,6 +1327,7 @@ void f2fs_destroy_stats(struct f2fs_sb_info *); | |||
1326 | void __init f2fs_create_root_stats(void); | 1327 | void __init f2fs_create_root_stats(void); |
1327 | void f2fs_destroy_root_stats(void); | 1328 | void f2fs_destroy_root_stats(void); |
1328 | #else | 1329 | #else |
1330 | #define stat_inc_cp_count(si) | ||
1329 | #define stat_inc_call_count(si) | 1331 | #define stat_inc_call_count(si) |
1330 | #define stat_inc_bggc_count(si) | 1332 | #define stat_inc_bggc_count(si) |
1331 | #define stat_inc_dirty_dir(sbi) | 1333 | #define stat_inc_dirty_dir(sbi) |