All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: kbuild@lists.01.org
Subject: Re: [PATCH V3 2/5] ext4: add new helper interface ext4_try_to_trim_range()
Date: Tue, 27 Jul 2021 03:09:12 +0800	[thread overview]
Message-ID: <202107270304.5jQGa1Ge-lkp@intel.com> (raw)

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

CC: kbuild-all(a)lists.01.org
In-Reply-To: <20210724074124.25731-3-jianchao.wan9@gmail.com>
References: <20210724074124.25731-3-jianchao.wan9@gmail.com>
TO: Wang Jianchao <jianchao.wan9@gmail.com>
TO: linux-ext4(a)vger.kernel.org
TO: linux-kernel(a)vger.kernel.org
CC: tytso(a)mit.edu
CC: adilger.kernel(a)dilger.ca

Hi Wang,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on ext4/dev]
[also build test WARNING on linux/master linus/master v5.14-rc3 next-20210723]
[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/Wang-Jianchao/ext4-get-discard-out-of-jbd2-commit-context/20210724-154426
base:   https://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4.git dev
:::::: branch date: 2 days ago
:::::: commit date: 2 days ago
config: mips-randconfig-s031-20210726 (attached as .config)
compiler: mips-linux-gcc (GCC) 10.3.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # apt-get install sparse
        # sparse version: v0.6.3-341-g8af24329-dirty
        # https://github.com/0day-ci/linux/commit/55a3430685e83709742c1fe2e0d4b347781bcc80
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Wang-Jianchao/ext4-get-discard-out-of-jbd2-commit-context/20210724-154426
        git checkout 55a3430685e83709742c1fe2e0d4b347781bcc80
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-10.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=mips SHELL=/bin/bash fs/ext4/

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


sparse warnings: (new ones prefixed by >>)
   command-line: note: in included file:
   builtin:1:9: sparse: sparse: preprocessor token __ATOMIC_ACQUIRE redefined
   builtin:0:0: sparse: this was the original definition
   builtin:1:9: sparse: sparse: preprocessor token __ATOMIC_SEQ_CST redefined
   builtin:0:0: sparse: this was the original definition
   builtin:1:9: sparse: sparse: preprocessor token __ATOMIC_ACQ_REL redefined
   builtin:0:0: sparse: this was the original definition
   builtin:1:9: sparse: sparse: preprocessor token __ATOMIC_RELEASE redefined
   builtin:0:0: sparse: this was the original definition
   fs/ext4/mballoc.c:989:9: sparse: sparse: context imbalance in 'ext4_mb_choose_next_group_cr1' - wrong count at exit
   fs/ext4/mballoc.c:1259:9: sparse: sparse: context imbalance in 'ext4_mb_init_cache' - different lock contexts for basic block
   fs/ext4/mballoc.c:2163:5: sparse: sparse: context imbalance in 'ext4_mb_try_best_found' - different lock contexts for basic block
   fs/ext4/mballoc.c:2191:5: sparse: sparse: context imbalance in 'ext4_mb_find_by_goal' - different lock contexts for basic block
   fs/ext4/mballoc.c:2478:12: sparse: sparse: context imbalance in 'ext4_mb_good_group_nolock' - wrong count at exit
   fs/ext4/mballoc.c:2693:87: sparse: sparse: context imbalance in 'ext4_mb_regular_allocator' - different lock contexts for basic block
   fs/ext4/mballoc.c:2967:13: sparse: sparse: context imbalance in 'ext4_mb_seq_structs_summary_start' - wrong count at exit
   fs/ext4/mballoc.c:3039:13: sparse: sparse: context imbalance in 'ext4_mb_seq_structs_summary_stop' - unexpected unlock
   fs/ext4/mballoc.c:3478:17: sparse: sparse: context imbalance in 'ext4_mb_release' - different lock contexts for basic block
   fs/ext4/mballoc.c:3598:26: sparse: sparse: context imbalance in 'ext4_free_data_in_buddy' - wrong count at exit
   fs/ext4/mballoc.c:3814:15: sparse: sparse: context imbalance in 'ext4_mb_mark_diskspace_used' - different lock contexts for basic block
   fs/ext4/mballoc.c:3822:6: sparse: sparse: context imbalance in 'ext4_mb_mark_bb' - different lock contexts for basic block
   fs/ext4/mballoc.c:4144:13: sparse: sparse: context imbalance in 'ext4_discard_allocated_blocks' - different lock contexts for basic block
   fs/ext4/mballoc.c:4446:13: sparse: sparse: context imbalance in 'ext4_mb_put_pa' - different lock contexts for basic block
   fs/ext4/mballoc.c:4783:9: sparse: sparse: context imbalance in 'ext4_mb_discard_group_preallocations' - different lock contexts for basic block
   fs/ext4/mballoc.c:4936:9: sparse: sparse: context imbalance in 'ext4_discard_preallocations' - different lock contexts for basic block
   fs/ext4/mballoc.c:5003:9: sparse: sparse: context imbalance in 'ext4_mb_show_ac' - different lock contexts for basic block
   fs/ext4/mballoc.c:5231:9: sparse: sparse: context imbalance in 'ext4_mb_discard_lg_preallocations' - different lock contexts for basic block
   fs/ext4/mballoc.c:5003:9: sparse: sparse: context imbalance in 'ext4_mb_new_blocks' - different lock contexts for basic block
   fs/ext4/mballoc.c:5876:9: sparse: sparse: context imbalance in 'ext4_free_blocks' - different lock contexts for basic block
   fs/ext4/mballoc.c:6176:15: sparse: sparse: context imbalance in 'ext4_group_add_blocks' - different lock contexts for basic block
   fs/ext4/mballoc.c:6216:24: sparse: sparse: context imbalance in 'ext4_trim_extent' - wrong count at exit
>> fs/ext4/mballoc.c:6266:9: sparse: sparse: context imbalance in 'ext4_try_to_trim_range' - different lock contexts for basic block
   fs/ext4/mballoc.c:6288:1: sparse: sparse: context imbalance in 'ext4_trim_all_free' - different lock contexts for basic block
   fs/ext4/mballoc.c:6417:1: sparse: sparse: context imbalance in 'ext4_mballoc_query_range' - different lock contexts for basic block

vim +/ext4_try_to_trim_range +6266 fs/ext4/mballoc.c

7360d1731e5dc7 Lukas Czerner 2010-10-27  6220  
55a3430685e837 Wang Jianchao 2021-07-24  6221  static int ext4_try_to_trim_range(struct super_block *sb,
55a3430685e837 Wang Jianchao 2021-07-24  6222  		struct ext4_buddy *e4b, ext4_grpblk_t start,
55a3430685e837 Wang Jianchao 2021-07-24  6223  		ext4_grpblk_t max, ext4_grpblk_t minblocks)
55a3430685e837 Wang Jianchao 2021-07-24  6224  {
55a3430685e837 Wang Jianchao 2021-07-24  6225  	ext4_grpblk_t next, count, free_count;
55a3430685e837 Wang Jianchao 2021-07-24  6226  	void *bitmap;
55a3430685e837 Wang Jianchao 2021-07-24  6227  	int ret = 0;
55a3430685e837 Wang Jianchao 2021-07-24  6228  
55a3430685e837 Wang Jianchao 2021-07-24  6229  	bitmap = e4b->bd_bitmap;
55a3430685e837 Wang Jianchao 2021-07-24  6230  	start = (e4b->bd_info->bb_first_free > start) ?
55a3430685e837 Wang Jianchao 2021-07-24  6231  		e4b->bd_info->bb_first_free : start;
55a3430685e837 Wang Jianchao 2021-07-24  6232  	count = 0;
55a3430685e837 Wang Jianchao 2021-07-24  6233  	free_count = 0;
55a3430685e837 Wang Jianchao 2021-07-24  6234  
55a3430685e837 Wang Jianchao 2021-07-24  6235  	while (start <= max) {
55a3430685e837 Wang Jianchao 2021-07-24  6236  		start = mb_find_next_zero_bit(bitmap, max + 1, start);
55a3430685e837 Wang Jianchao 2021-07-24  6237  		if (start > max)
55a3430685e837 Wang Jianchao 2021-07-24  6238  			break;
55a3430685e837 Wang Jianchao 2021-07-24  6239  		next = mb_find_next_bit(bitmap, max + 1, start);
55a3430685e837 Wang Jianchao 2021-07-24  6240  
55a3430685e837 Wang Jianchao 2021-07-24  6241  		if ((next - start) >= minblocks) {
55a3430685e837 Wang Jianchao 2021-07-24  6242  			ret = ext4_trim_extent(sb, start, next - start, e4b);
55a3430685e837 Wang Jianchao 2021-07-24  6243  			if (ret && ret != -EOPNOTSUPP)
55a3430685e837 Wang Jianchao 2021-07-24  6244  				break;
55a3430685e837 Wang Jianchao 2021-07-24  6245  			ret = 0;
55a3430685e837 Wang Jianchao 2021-07-24  6246  			count += next - start;
55a3430685e837 Wang Jianchao 2021-07-24  6247  		}
55a3430685e837 Wang Jianchao 2021-07-24  6248  		free_count += next - start;
55a3430685e837 Wang Jianchao 2021-07-24  6249  		start = next + 1;
55a3430685e837 Wang Jianchao 2021-07-24  6250  
55a3430685e837 Wang Jianchao 2021-07-24  6251  		if (fatal_signal_pending(current)) {
55a3430685e837 Wang Jianchao 2021-07-24  6252  			count = -ERESTARTSYS;
55a3430685e837 Wang Jianchao 2021-07-24  6253  			break;
55a3430685e837 Wang Jianchao 2021-07-24  6254  		}
55a3430685e837 Wang Jianchao 2021-07-24  6255  
55a3430685e837 Wang Jianchao 2021-07-24  6256  		if (need_resched()) {
55a3430685e837 Wang Jianchao 2021-07-24  6257  			ext4_unlock_group(sb, e4b->bd_group);
55a3430685e837 Wang Jianchao 2021-07-24  6258  			cond_resched();
55a3430685e837 Wang Jianchao 2021-07-24  6259  			ext4_lock_group(sb, e4b->bd_group);
55a3430685e837 Wang Jianchao 2021-07-24  6260  		}
55a3430685e837 Wang Jianchao 2021-07-24  6261  
55a3430685e837 Wang Jianchao 2021-07-24  6262  		if ((e4b->bd_info->bb_free - free_count) < minblocks)
55a3430685e837 Wang Jianchao 2021-07-24  6263  			break;
55a3430685e837 Wang Jianchao 2021-07-24  6264  	}
55a3430685e837 Wang Jianchao 2021-07-24  6265  
55a3430685e837 Wang Jianchao 2021-07-24 @6266  	return count;
55a3430685e837 Wang Jianchao 2021-07-24  6267  }
55a3430685e837 Wang Jianchao 2021-07-24  6268  

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

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

             reply	other threads:[~2021-07-26 19:09 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-26 19:09 kernel test robot [this message]
  -- strict thread matches above, loose matches on Subject: below --
2021-07-25  9:00 [PATCH V3 2/5] ext4: add new helper interface ext4_try_to_trim_range() kernel test robot
2021-07-26  3:42 ` kernel test robot
2021-07-26  3:42   ` kernel test robot
2021-07-24  7:41 [PATCH V3 0/5] ext4: get discard out of jbd2 commit context Wang Jianchao
2021-07-24  7:41 ` [PATCH V3 2/5] ext4: add new helper interface ext4_try_to_trim_range() Wang Jianchao
2021-08-04 15:29   ` Jan Kara
2021-08-12 17:44   ` Theodore Ts'o
2021-08-26  7:19     ` Wang Jianchao

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=202107270304.5jQGa1Ge-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=kbuild@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.