[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <202103042052.QSm6X15G-lkp@intel.com>
Date: Thu, 4 Mar 2021 20:25:22 +0800
From: kernel test robot <lkp@...el.com>
To: Daeho Jeong <daeho43@...il.com>, linux-kernel@...r.kernel.org,
linux-f2fs-devel@...ts.sourceforge.net, kernel-team@...roid.com
Cc: Daeho Jeong <daehojeong@...gle.com>
Subject: Re: [PATCH] f2fs: add sysfs nodes to get accumulated compression info
Hi Daeho,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on f2fs/dev-test]
[also build test ERROR on linus/master v5.12-rc1]
[cannot apply to linux/master next-20210304]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Daeho-Jeong/f2fs-add-sysfs-nodes-to-get-accumulated-compression-info/20210304-173739
base: https://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs.git dev-test
config: nios2-randconfig-r011-20210304 (attached as .config)
compiler: nios2-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/0day-ci/linux/commit/c1c09c0edfbbbbb5753d532576be053767bbf0ae
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Daeho-Jeong/f2fs-add-sysfs-nodes-to-get-accumulated-compression-info/20210304-173739
git checkout c1c09c0edfbbbbb5753d532576be053767bbf0ae
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=nios2
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@...el.com>
All errors (new ones prefixed by >>):
In file included from fs/f2fs/dir.c:13:
fs/f2fs/f2fs.h: In function 'set_compress_context':
>> fs/f2fs/f2fs.h:4050:2: error: implicit declaration of function 'stat_inc_acc_compr_inodes'; did you mean 'stat_inc_compr_inode'? [-Werror=implicit-function-declaration]
4050 | stat_inc_acc_compr_inodes(inode);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
| stat_inc_compr_inode
fs/f2fs/f2fs.h: In function 'f2fs_disable_compressed_file':
>> fs/f2fs/f2fs.h:4066:2: error: implicit declaration of function 'stat_dec_acc_compr_inodes'; did you mean 'stat_dec_compr_inode'? [-Werror=implicit-function-declaration]
4066 | stat_dec_acc_compr_inodes(inode);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
| stat_dec_compr_inode
fs/f2fs/f2fs.h: In function 'f2fs_i_compr_blocks_update':
>> fs/f2fs/f2fs.h:4173:4: error: implicit declaration of function 'stat_add_acc_compr_blocks'; did you mean 'stat_add_compr_blocks'? [-Werror=implicit-function-declaration]
4173 | stat_add_acc_compr_blocks(inode, diff);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
| stat_add_compr_blocks
>> fs/f2fs/f2fs.h:4178:4: error: implicit declaration of function 'stat_sub_acc_compr_blocks'; did you mean 'stat_sub_compr_blocks'? [-Werror=implicit-function-declaration]
4178 | stat_sub_acc_compr_blocks(inode, diff);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
| stat_sub_compr_blocks
cc1: some warnings being treated as errors
vim +4050 fs/f2fs/f2fs.h
4028
4029 static inline void set_compress_context(struct inode *inode)
4030 {
4031 struct f2fs_sb_info *sbi = F2FS_I_SB(inode);
4032
4033 F2FS_I(inode)->i_compress_algorithm =
4034 F2FS_OPTION(sbi).compress_algorithm;
4035 F2FS_I(inode)->i_log_cluster_size =
4036 F2FS_OPTION(sbi).compress_log_size;
4037 F2FS_I(inode)->i_compress_flag =
4038 F2FS_OPTION(sbi).compress_chksum ?
4039 1 << COMPRESS_CHKSUM : 0;
4040 F2FS_I(inode)->i_cluster_size =
4041 1 << F2FS_I(inode)->i_log_cluster_size;
4042 if (F2FS_I(inode)->i_compress_algorithm == COMPRESS_LZ4 &&
4043 F2FS_OPTION(sbi).compress_level)
4044 F2FS_I(inode)->i_compress_flag |=
4045 F2FS_OPTION(sbi).compress_level <<
4046 COMPRESS_LEVEL_OFFSET;
4047 F2FS_I(inode)->i_flags |= F2FS_COMPR_FL;
4048 set_inode_flag(inode, FI_COMPRESSED_FILE);
4049 stat_inc_compr_inode(inode);
> 4050 stat_inc_acc_compr_inodes(inode);
4051 f2fs_mark_inode_dirty_sync(inode, true);
4052 }
4053
4054 static inline bool f2fs_disable_compressed_file(struct inode *inode)
4055 {
4056 struct f2fs_inode_info *fi = F2FS_I(inode);
4057
4058 if (!f2fs_compressed_file(inode))
4059 return true;
4060 if (S_ISREG(inode->i_mode) &&
4061 (get_dirty_pages(inode) || atomic_read(&fi->i_compr_blocks)))
4062 return false;
4063
4064 fi->i_flags &= ~F2FS_COMPR_FL;
4065 stat_dec_compr_inode(inode);
> 4066 stat_dec_acc_compr_inodes(inode);
4067 clear_inode_flag(inode, FI_COMPRESSED_FILE);
4068 f2fs_mark_inode_dirty_sync(inode, true);
4069 return true;
4070 }
4071
4072 #define F2FS_FEATURE_FUNCS(name, flagname) \
4073 static inline int f2fs_sb_has_##name(struct f2fs_sb_info *sbi) \
4074 { \
4075 return F2FS_HAS_FEATURE(sbi, F2FS_FEATURE_##flagname); \
4076 }
4077
4078 F2FS_FEATURE_FUNCS(encrypt, ENCRYPT);
4079 F2FS_FEATURE_FUNCS(blkzoned, BLKZONED);
4080 F2FS_FEATURE_FUNCS(extra_attr, EXTRA_ATTR);
4081 F2FS_FEATURE_FUNCS(project_quota, PRJQUOTA);
4082 F2FS_FEATURE_FUNCS(inode_chksum, INODE_CHKSUM);
4083 F2FS_FEATURE_FUNCS(flexible_inline_xattr, FLEXIBLE_INLINE_XATTR);
4084 F2FS_FEATURE_FUNCS(quota_ino, QUOTA_INO);
4085 F2FS_FEATURE_FUNCS(inode_crtime, INODE_CRTIME);
4086 F2FS_FEATURE_FUNCS(lost_found, LOST_FOUND);
4087 F2FS_FEATURE_FUNCS(verity, VERITY);
4088 F2FS_FEATURE_FUNCS(sb_chksum, SB_CHKSUM);
4089 F2FS_FEATURE_FUNCS(casefold, CASEFOLD);
4090 F2FS_FEATURE_FUNCS(compression, COMPRESSION);
4091
4092 #ifdef CONFIG_BLK_DEV_ZONED
4093 static inline bool f2fs_blkz_is_seq(struct f2fs_sb_info *sbi, int devi,
4094 block_t blkaddr)
4095 {
4096 unsigned int zno = blkaddr >> sbi->log_blocks_per_blkz;
4097
4098 return test_bit(zno, FDEV(devi).blkz_seq);
4099 }
4100 #endif
4101
4102 static inline bool f2fs_hw_should_discard(struct f2fs_sb_info *sbi)
4103 {
4104 return f2fs_sb_has_blkzoned(sbi);
4105 }
4106
4107 static inline bool f2fs_bdev_support_discard(struct block_device *bdev)
4108 {
4109 return blk_queue_discard(bdev_get_queue(bdev)) ||
4110 bdev_is_zoned(bdev);
4111 }
4112
4113 static inline bool f2fs_hw_support_discard(struct f2fs_sb_info *sbi)
4114 {
4115 int i;
4116
4117 if (!f2fs_is_multi_device(sbi))
4118 return f2fs_bdev_support_discard(sbi->sb->s_bdev);
4119
4120 for (i = 0; i < sbi->s_ndevs; i++)
4121 if (f2fs_bdev_support_discard(FDEV(i).bdev))
4122 return true;
4123 return false;
4124 }
4125
4126 static inline bool f2fs_realtime_discard_enable(struct f2fs_sb_info *sbi)
4127 {
4128 return (test_opt(sbi, DISCARD) && f2fs_hw_support_discard(sbi)) ||
4129 f2fs_hw_should_discard(sbi);
4130 }
4131
4132 static inline bool f2fs_hw_is_readonly(struct f2fs_sb_info *sbi)
4133 {
4134 int i;
4135
4136 if (!f2fs_is_multi_device(sbi))
4137 return bdev_read_only(sbi->sb->s_bdev);
4138
4139 for (i = 0; i < sbi->s_ndevs; i++)
4140 if (bdev_read_only(FDEV(i).bdev))
4141 return true;
4142 return false;
4143 }
4144
4145 static inline bool f2fs_lfs_mode(struct f2fs_sb_info *sbi)
4146 {
4147 return F2FS_OPTION(sbi).fs_mode == FS_MODE_LFS;
4148 }
4149
4150 static inline bool f2fs_may_compress(struct inode *inode)
4151 {
4152 if (IS_SWAPFILE(inode) || f2fs_is_pinned_file(inode) ||
4153 f2fs_is_atomic_file(inode) ||
4154 f2fs_is_volatile_file(inode))
4155 return false;
4156 return S_ISREG(inode->i_mode) || S_ISDIR(inode->i_mode);
4157 }
4158
4159 static inline void f2fs_i_compr_blocks_update(struct inode *inode,
4160 u64 blocks, bool add, bool accumulate)
4161 {
4162 int diff = F2FS_I(inode)->i_cluster_size - blocks;
4163 struct f2fs_inode_info *fi = F2FS_I(inode);
4164
4165 /* don't update i_compr_blocks if saved blocks were released */
4166 if (!add && !atomic_read(&fi->i_compr_blocks))
4167 return;
4168
4169 if (add) {
4170 atomic_add(diff, &fi->i_compr_blocks);
4171 stat_add_compr_blocks(inode, diff);
4172 if (accumulate)
> 4173 stat_add_acc_compr_blocks(inode, diff);
4174 } else {
4175 atomic_sub(diff, &fi->i_compr_blocks);
4176 stat_sub_compr_blocks(inode, diff);
4177 if (accumulate)
> 4178 stat_sub_acc_compr_blocks(inode, diff);
4179 }
4180 f2fs_mark_inode_dirty_sync(inode, true);
4181 }
4182
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
Download attachment ".config.gz" of type "application/gzip" (33046 bytes)
Powered by blists - more mailing lists