@@ -1277,6 +1277,8 @@ struct f2fs_sb_info {
1277
1277
atomic_t max_aw_cnt ; /* max # of atomic writes */
1278
1278
atomic_t max_vw_cnt ; /* max # of volatile writes */
1279
1279
int bg_gc ; /* background gc calls */
1280
+ unsigned int io_skip_bggc ; /* skip background gc for in-flight IO */
1281
+ unsigned int other_skip_bggc ; /* skip background gc for other reasons */
1280
1282
unsigned int ndirty_inode [NR_INODE_TYPE ]; /* # of dirty inodes */
1281
1283
#endif
1282
1284
spinlock_t stat_lock ; /* lock for stat operations */
@@ -3104,6 +3106,7 @@ struct f2fs_stat_info {
3104
3106
int free_nids , avail_nids , alloc_nids ;
3105
3107
int total_count , utilization ;
3106
3108
int bg_gc , nr_wb_cp_data , nr_wb_data ;
3109
+ unsigned int io_skip_bggc , other_skip_bggc ;
3107
3110
int nr_flushing , nr_flushed , flush_list_empty ;
3108
3111
int nr_discarding , nr_discarded ;
3109
3112
int nr_discard_cmd ;
@@ -3141,6 +3144,8 @@ static inline struct f2fs_stat_info *F2FS_STAT(struct f2fs_sb_info *sbi)
3141
3144
#define stat_inc_bg_cp_count (si ) ((si)->bg_cp_count++)
3142
3145
#define stat_inc_call_count (si ) ((si)->call_count++)
3143
3146
#define stat_inc_bggc_count (sbi ) ((sbi)->bg_gc++)
3147
+ #define stat_io_skip_bggc_count (sbi ) ((sbi)->io_skip_bggc++)
3148
+ #define stat_other_skip_bggc_count (sbi ) ((sbi)->other_skip_bggc++)
3144
3149
#define stat_inc_dirty_inode (sbi , type ) ((sbi)->ndirty_inode[type]++)
3145
3150
#define stat_dec_dirty_inode (sbi , type ) ((sbi)->ndirty_inode[type]--)
3146
3151
#define stat_inc_total_hit (sbi ) (atomic64_inc(&(sbi)->total_hit_ext))
@@ -3257,6 +3262,8 @@ void f2fs_destroy_root_stats(void);
3257
3262
#define stat_inc_bg_cp_count (si ) do { } while (0)
3258
3263
#define stat_inc_call_count (si ) do { } while (0)
3259
3264
#define stat_inc_bggc_count (si ) do { } while (0)
3265
+ #define stat_io_skip_bggc_count (sbi ) do { } while (0)
3266
+ #define stat_other_skip_bggc_count (sbi ) do { } while (0)
3260
3267
#define stat_inc_dirty_inode (sbi , type ) do { } while (0)
3261
3268
#define stat_dec_dirty_inode (sbi , type ) do { } while (0)
3262
3269
#define stat_inc_total_hit (sb ) do { } while (0)
0 commit comments