From: kbuild test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: [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'?
Date: Thu, 31 Oct 2019 03:51:21 +0800 [thread overview]
Message-ID: <201910310320.HEdW2efn%lkp@intel.com> (raw)
[-- 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 --]
reply other threads:[~2019-10-30 19:51 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=201910310320.HEdW2efn%lkp@intel.com \
--to=lkp@intel.com \
--cc=kbuild-all@lists.01.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.