lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202109170641.iObLoRQz-lkp@intel.com>
Date:   Fri, 17 Sep 2021 06:19:44 +0800
From:   kernel test robot <lkp@...el.com>
To:     Fengnan Chang <changfengnan@...o.com>
Cc:     kbuild-all@...ts.01.org, Chao Yu <yuchao0@...wei.com>,
        Chao Yu <chao@...nel.org>, linux-kernel@...r.kernel.org
Subject: [chao:dev 4/10] fs/f2fs/segment.c:3428:52: error: macro
 "stat_inc_block_count" passed 3 arguments, but takes just 2

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/chao/linux.git dev
head:   baf1982847e386d70b3ae5f0a3d1cd52b625c542
commit: 1f6f797a43ca967a0f8a2735fa310d0049ab6559 [4/10] f2fs: separate buffer and direct io in block allocation statistics
config: arc-buildonly-randconfig-r003-20210916 (attached as .config)
compiler: arc-elf-gcc (GCC) 11.2.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://git.kernel.org/pub/scm/linux/kernel/git/chao/linux.git/commit/?id=1f6f797a43ca967a0f8a2735fa310d0049ab6559
        git remote add chao https://git.kernel.org/pub/scm/linux/kernel/git/chao/linux.git
        git fetch --no-tags chao dev
        git checkout 1f6f797a43ca967a0f8a2735fa310d0049ab6559
        # save the attached .config to linux build tree
        mkdir build_dir
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=arc SHELL=/bin/bash fs/f2fs/

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 >>):

   fs/f2fs/segment.c: In function 'f2fs_allocate_data_block':
>> fs/f2fs/segment.c:3428:52: error: macro "stat_inc_block_count" passed 3 arguments, but takes just 2
    3428 |         stat_inc_block_count(sbi, curseg, direct_io);
         |                                                    ^
   In file included from fs/f2fs/segment.c:19:
   fs/f2fs/f2fs.h:3879: note: macro "stat_inc_block_count" defined here
    3879 | #define stat_inc_block_count(sbi, curseg)               do { } while (0)
         | 
>> fs/f2fs/segment.c:3428:9: error: 'stat_inc_block_count' undeclared (first use in this function); did you mean 'written_block_count'?
    3428 |         stat_inc_block_count(sbi, curseg, direct_io);
         |         ^~~~~~~~~~~~~~~~~~~~
         |         written_block_count
   fs/f2fs/segment.c:3428:9: note: each undeclared identifier is reported only once for each function it appears in
   fs/f2fs/segment.c: In function 'f2fs_inplace_write_data':
   fs/f2fs/segment.c:3614:48: error: macro "stat_inc_inplace_blocks" passed 2 arguments, but takes just 1
    3614 |         stat_inc_inplace_blocks(fio->sbi, false);
         |                                                ^
   In file included from fs/f2fs/segment.c:19:
   fs/f2fs/f2fs.h:3880: note: macro "stat_inc_inplace_blocks" defined here
    3880 | #define stat_inc_inplace_blocks(sbi)                    do { } while (0)
         | 
   fs/f2fs/segment.c:3614:9: error: 'stat_inc_inplace_blocks' undeclared (first use in this function)
    3614 |         stat_inc_inplace_blocks(fio->sbi, false);
         |         ^~~~~~~~~~~~~~~~~~~~~~~


vim +/stat_inc_block_count +3428 fs/f2fs/segment.c

  3390	
  3391	void f2fs_allocate_data_block(struct f2fs_sb_info *sbi, struct page *page,
  3392			block_t old_blkaddr, block_t *new_blkaddr,
  3393			struct f2fs_summary *sum, int type,
  3394			struct f2fs_io_info *fio, bool direct_io)
  3395	{
  3396		struct sit_info *sit_i = SIT_I(sbi);
  3397		struct curseg_info *curseg = CURSEG_I(sbi, type);
  3398		unsigned long long old_mtime;
  3399		bool from_gc = (type == CURSEG_ALL_DATA_ATGC);
  3400		struct seg_entry *se = NULL;
  3401	
  3402		down_read(&SM_I(sbi)->curseg_lock);
  3403	
  3404		mutex_lock(&curseg->curseg_mutex);
  3405		down_write(&sit_i->sentry_lock);
  3406	
  3407		if (from_gc) {
  3408			f2fs_bug_on(sbi, GET_SEGNO(sbi, old_blkaddr) == NULL_SEGNO);
  3409			se = get_seg_entry(sbi, GET_SEGNO(sbi, old_blkaddr));
  3410			sanity_check_seg_type(sbi, se->type);
  3411			f2fs_bug_on(sbi, IS_NODESEG(se->type));
  3412		}
  3413		*new_blkaddr = NEXT_FREE_BLKADDR(sbi, curseg);
  3414	
  3415		f2fs_bug_on(sbi, curseg->next_blkoff >= sbi->blocks_per_seg);
  3416	
  3417		f2fs_wait_discard_bio(sbi, *new_blkaddr);
  3418	
  3419		/*
  3420		 * __add_sum_entry should be resided under the curseg_mutex
  3421		 * because, this function updates a summary entry in the
  3422		 * current summary block.
  3423		 */
  3424		__add_sum_entry(sbi, type, sum);
  3425	
  3426		__refresh_next_blkoff(sbi, curseg);
  3427	
> 3428		stat_inc_block_count(sbi, curseg, direct_io);
  3429	
  3430		if (from_gc) {
  3431			old_mtime = get_segment_mtime(sbi, old_blkaddr);
  3432		} else {
  3433			update_segment_mtime(sbi, old_blkaddr, 0);
  3434			old_mtime = 0;
  3435		}
  3436		update_segment_mtime(sbi, *new_blkaddr, old_mtime);
  3437	
  3438		/*
  3439		 * SIT information should be updated before segment allocation,
  3440		 * since SSR needs latest valid block information.
  3441		 */
  3442		update_sit_entry(sbi, *new_blkaddr, 1);
  3443		if (GET_SEGNO(sbi, old_blkaddr) != NULL_SEGNO)
  3444			update_sit_entry(sbi, old_blkaddr, -1);
  3445	
  3446		if (!__has_curseg_space(sbi, curseg)) {
  3447			if (from_gc)
  3448				get_atssr_segment(sbi, type, se->type,
  3449							AT_SSR, se->mtime);
  3450			else
  3451				sit_i->s_ops->allocate_segment(sbi, type, false);
  3452		}
  3453		/*
  3454		 * segment dirty status should be updated after segment allocation,
  3455		 * so we just need to update status only one time after previous
  3456		 * segment being closed.
  3457		 */
  3458		locate_dirty_segment(sbi, GET_SEGNO(sbi, old_blkaddr));
  3459		locate_dirty_segment(sbi, GET_SEGNO(sbi, *new_blkaddr));
  3460	
  3461		up_write(&sit_i->sentry_lock);
  3462	
  3463		if (page && IS_NODESEG(type)) {
  3464			fill_node_footer_blkaddr(page, NEXT_FREE_BLKADDR(sbi, curseg));
  3465	
  3466			f2fs_inode_chksum_set(sbi, page);
  3467		}
  3468	
  3469		if (fio) {
  3470			struct f2fs_bio_info *io;
  3471	
  3472			if (F2FS_IO_ALIGNED(sbi))
  3473				fio->retry = false;
  3474	
  3475			INIT_LIST_HEAD(&fio->list);
  3476			fio->in_list = true;
  3477			io = sbi->write_io[fio->type] + fio->temp;
  3478			spin_lock(&io->io_lock);
  3479			list_add_tail(&fio->list, &io->io_list);
  3480			spin_unlock(&io->io_lock);
  3481		}
  3482	
  3483		mutex_unlock(&curseg->curseg_mutex);
  3484	
  3485		up_read(&SM_I(sbi)->curseg_lock);
  3486	}
  3487	

---
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" (36523 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ