All of lore.kernel.org
 help / color / mirror / Atom feed
* [chao-linux:compression 1/3] fs//f2fs/file.c:543:5: error: implicit declaration of function 'stat_sub_compr_blocks'; did you mean 'stat_dec_compr_blocks'?
@ 2019-10-30 19:51 kbuild test robot
  0 siblings, 0 replies; only message in thread
From: kbuild test robot @ 2019-10-30 19:51 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 4873 bytes --]

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/chao/linux.git compression
head:   1c310bddebde4e94a780c2b2699a3ac35e166ca9
commit: b49443e5f3aecab358837790dfb5a30fd95a7926 [1/3] f2fs: support data compression
config: i386-randconfig-b004-201943 (attached as .config)
compiler: gcc-7 (Debian 7.4.0-14) 7.4.0
reproduce:
        git checkout b49443e5f3aecab358837790dfb5a30fd95a7926
        # save the attached .config to linux build tree
        make ARCH=i386 

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

   fs//f2fs/file.c: In function 'f2fs_truncate_data_blocks_range':
>> fs//f2fs/file.c:543:5: error: implicit declaration of function 'stat_sub_compr_blocks'; did you mean 'stat_dec_compr_blocks'? [-Werror=implicit-function-declaration]
        stat_sub_compr_blocks(dn->inode, compr_blocks);
        ^~~~~~~~~~~~~~~~~~~~~
        stat_dec_compr_blocks
   cc1: some warnings being treated as errors
--
   fs//f2fs/inode.c: In function 'do_read_inode':
>> fs//f2fs/inode.c:448:2: error: implicit declaration of function 'stat_add_compr_blocks'; did you mean 'stat_dec_compr_blocks'? [-Werror=implicit-function-declaration]
     stat_add_compr_blocks(inode, F2FS_I(inode)->i_compressed_blocks);
     ^~~~~~~~~~~~~~~~~~~~~
     stat_dec_compr_blocks
   fs//f2fs/inode.c: In function 'f2fs_evict_inode':
>> fs//f2fs/inode.c:756:2: error: implicit declaration of function 'stat_sub_compr_blocks'; did you mean 'stat_dec_compr_blocks'? [-Werror=implicit-function-declaration]
     stat_sub_compr_blocks(inode, F2FS_I(inode)->i_compressed_blocks);
     ^~~~~~~~~~~~~~~~~~~~~
     stat_dec_compr_blocks
   cc1: some warnings being treated as errors

vim +543 fs//f2fs/file.c

   516	
   517	void f2fs_truncate_data_blocks_range(struct dnode_of_data *dn, int count)
   518	{
   519		struct f2fs_sb_info *sbi = F2FS_I_SB(dn->inode);
   520		struct f2fs_node *raw_node;
   521		int nr_free = 0, ofs = dn->ofs_in_node, len = count;
   522		__le32 *addr;
   523		int base = 0;
   524		bool compressed_cluster = false;
   525		int cluster_index = 0, valid_blocks = 0;
   526		int cluster_size = F2FS_I(dn->inode)->i_cluster_size;
   527	
   528		if (IS_INODE(dn->node_page) && f2fs_has_extra_attr(dn->inode))
   529			base = get_extra_isize(dn->inode);
   530	
   531		raw_node = F2FS_NODE(dn->node_page);
   532		addr = blkaddr_in_node(raw_node) + base + ofs;
   533	
   534		/* Assumption: truncateion starts with cluster */
   535		for (; count > 0; count--, addr++, dn->ofs_in_node++, cluster_index++) {
   536			block_t blkaddr = le32_to_cpu(*addr);
   537	
   538			if (f2fs_compressed_file(dn->inode) &&
   539						!(cluster_index & (cluster_size - 1))) {
   540				if (compressed_cluster) {
   541					int compr_blocks = cluster_size - valid_blocks;
   542	
 > 543					stat_sub_compr_blocks(dn->inode, compr_blocks);
   544					F2FS_I(dn->inode)->i_compressed_blocks -=
   545									compr_blocks;
   546				}
   547				compressed_cluster = (blkaddr == COMPRESS_ADDR);
   548				valid_blocks = 0;
   549			}
   550	
   551			if (blkaddr == NULL_ADDR)
   552				continue;
   553	
   554			dn->data_blkaddr = NULL_ADDR;
   555			f2fs_set_data_blkaddr(dn);
   556	
   557			if (__is_valid_data_blkaddr(blkaddr)) {
   558				if (!f2fs_is_valid_blkaddr(sbi, blkaddr,
   559						DATA_GENERIC_ENHANCE))
   560					continue;
   561				if (compressed_cluster)
   562					valid_blocks++;
   563			}
   564	
   565			if (dn->ofs_in_node == 0 && IS_INODE(dn->node_page))
   566				clear_inode_flag(dn->inode, FI_FIRST_BLOCK_WRITTEN);
   567	
   568			f2fs_invalidate_blocks(sbi, blkaddr);
   569			nr_free++;
   570		}
   571	
   572		if (compressed_cluster) {
   573			int compr_blocks = cluster_size - valid_blocks;
   574	
   575			stat_sub_compr_blocks(dn->inode, compr_blocks);
   576			F2FS_I(dn->inode)->i_compressed_blocks -= compr_blocks;
   577		}
   578	
   579		if (nr_free) {
   580			pgoff_t fofs;
   581			/*
   582			 * once we invalidate valid blkaddr in range [ofs, ofs + count],
   583			 * we will invalidate all blkaddr in the whole range.
   584			 */
   585			fofs = f2fs_start_bidx_of_node(ofs_of_node(dn->node_page),
   586								dn->inode) + ofs;
   587			f2fs_update_extent_cache_range(dn, fofs, 0, len);
   588			dec_valid_block_count(sbi, dn->inode, nr_free);
   589		}
   590		dn->ofs_in_node = ofs;
   591	
   592		f2fs_update_time(sbi, REQ_TIME);
   593		trace_f2fs_truncate_data_blocks_range(dn->inode, dn->nid,
   594						 dn->ofs_in_node, nr_free);
   595	}
   596	

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 33929 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2019-10-30 19:51 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-10-30 19:51 [chao-linux:compression 1/3] fs//f2fs/file.c:543:5: error: implicit declaration of function 'stat_sub_compr_blocks'; did you mean 'stat_dec_compr_blocks'? kbuild test robot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.