diff options
Diffstat (limited to 'fs/f2fs/f2fs.h')
-rw-r--r-- | fs/f2fs/f2fs.h | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h index c7620b973073..0a352b658ed8 100644 --- a/fs/f2fs/f2fs.h +++ b/fs/f2fs/f2fs.h | |||
@@ -1113,11 +1113,16 @@ struct f2fs_stat_info { | |||
1113 | unsigned base_mem, cache_mem; | 1113 | unsigned base_mem, cache_mem; |
1114 | }; | 1114 | }; |
1115 | 1115 | ||
1116 | static inline struct f2fs_stat_info *F2FS_STAT(struct f2fs_sb_info *sbi) | ||
1117 | { | ||
1118 | return (struct f2fs_stat_info*)sbi->stat_info; | ||
1119 | } | ||
1120 | |||
1116 | #define stat_inc_call_count(si) ((si)->call_count++) | 1121 | #define stat_inc_call_count(si) ((si)->call_count++) |
1117 | 1122 | ||
1118 | #define stat_inc_seg_count(sbi, type) \ | 1123 | #define stat_inc_seg_count(sbi, type) \ |
1119 | do { \ | 1124 | do { \ |
1120 | struct f2fs_stat_info *si = sbi->stat_info; \ | 1125 | struct f2fs_stat_info *si = F2FS_STAT(sbi); \ |
1121 | (si)->tot_segs++; \ | 1126 | (si)->tot_segs++; \ |
1122 | if (type == SUM_TYPE_DATA) \ | 1127 | if (type == SUM_TYPE_DATA) \ |
1123 | si->data_segs++; \ | 1128 | si->data_segs++; \ |
@@ -1130,14 +1135,14 @@ struct f2fs_stat_info { | |||
1130 | 1135 | ||
1131 | #define stat_inc_data_blk_count(sbi, blks) \ | 1136 | #define stat_inc_data_blk_count(sbi, blks) \ |
1132 | do { \ | 1137 | do { \ |
1133 | struct f2fs_stat_info *si = sbi->stat_info; \ | 1138 | struct f2fs_stat_info *si = F2FS_STAT(sbi); \ |
1134 | stat_inc_tot_blk_count(si, blks); \ | 1139 | stat_inc_tot_blk_count(si, blks); \ |
1135 | si->data_blks += (blks); \ | 1140 | si->data_blks += (blks); \ |
1136 | } while (0) | 1141 | } while (0) |
1137 | 1142 | ||
1138 | #define stat_inc_node_blk_count(sbi, blks) \ | 1143 | #define stat_inc_node_blk_count(sbi, blks) \ |
1139 | do { \ | 1144 | do { \ |
1140 | struct f2fs_stat_info *si = sbi->stat_info; \ | 1145 | struct f2fs_stat_info *si = F2FS_STAT(sbi); \ |
1141 | stat_inc_tot_blk_count(si, blks); \ | 1146 | stat_inc_tot_blk_count(si, blks); \ |
1142 | si->node_blks += (blks); \ | 1147 | si->node_blks += (blks); \ |
1143 | } while (0) | 1148 | } while (0) |