@@ -1770,6 +1770,7 @@ struct f2fs_sb_info {
1770
1770
atomic_t inline_dir ; /* # of inline_dentry inodes */
1771
1771
atomic_t compr_inode ; /* # of compressed inodes */
1772
1772
atomic64_t compr_blocks ; /* # of compressed blocks */
1773
+ atomic_t swapfile_inode ; /* # of swapfile inodes */
1773
1774
atomic_t max_aw_cnt ; /* max # of atomic writes */
1774
1775
unsigned int io_skip_bggc ; /* skip background gc for in-flight IO */
1775
1776
unsigned int other_skip_bggc ; /* skip background gc for other reasons */
@@ -3876,7 +3877,7 @@ struct f2fs_stat_info {
3876
3877
int nr_issued_ckpt , nr_total_ckpt , nr_queued_ckpt ;
3877
3878
unsigned int cur_ckpt_time , peak_ckpt_time ;
3878
3879
int inline_xattr , inline_inode , inline_dir , append , update , orphans ;
3879
- int compr_inode ;
3880
+ int compr_inode , swapfile_inode ;
3880
3881
unsigned long long compr_blocks ;
3881
3882
int aw_cnt , max_aw_cnt ;
3882
3883
unsigned int valid_count , valid_node_count , valid_inode_count , discard_blks ;
@@ -3965,6 +3966,10 @@ static inline struct f2fs_stat_info *F2FS_STAT(struct f2fs_sb_info *sbi)
3965
3966
(atomic64_add(blocks, &F2FS_I_SB(inode)->compr_blocks))
3966
3967
#define stat_sub_compr_blocks (inode , blocks ) \
3967
3968
(atomic64_sub(blocks, &F2FS_I_SB(inode)->compr_blocks))
3969
+ #define stat_inc_swapfile_inode (inode ) \
3970
+ (atomic_inc(&F2FS_I_SB(inode)->swapfile_inode))
3971
+ #define stat_dec_swapfile_inode (inode ) \
3972
+ (atomic_dec(&F2FS_I_SB(inode)->swapfile_inode))
3968
3973
#define stat_inc_meta_count (sbi , blkaddr ) \
3969
3974
do { \
3970
3975
if (blkaddr < SIT_I(sbi)->sit_base_addr) \
@@ -4049,6 +4054,8 @@ void f2fs_update_sit_info(struct f2fs_sb_info *sbi);
4049
4054
#define stat_dec_compr_inode (inode ) do { } while (0)
4050
4055
#define stat_add_compr_blocks (inode , blocks ) do { } while (0)
4051
4056
#define stat_sub_compr_blocks (inode , blocks ) do { } while (0)
4057
+ #define stat_inc_swapfile_inode (inode ) do { } while (0)
4058
+ #define stat_dec_swapfile_inode (inode ) do { } while (0)
4052
4059
#define stat_update_max_atomic_write (inode ) do { } while (0)
4053
4060
#define stat_inc_meta_count (sbi , blkaddr ) do { } while (0)
4054
4061
#define stat_inc_seg_type (sbi , curseg ) do { } while (0)
0 commit comments