CC: [email protected] TO: "Ritesh, Harjani," <[email protected]> CC: "Theodore Ts'o" <[email protected]>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master head: 48f99181fc118d82dc8bf6c7221ad1c654cb8bc2 commit: bf53b03e9d2ac23fb4a3e639fe023f5f1af607b0 [12926/15259] ext4: mballoc: use lock for checking free blocks while retrying :::::: branch date: 4 hours ago :::::: commit date: 5 days ago config: arm-randconfig-s032-20200603 (attached as .config) compiler: arm-linux-gnueabi-gcc (GCC) 9.3.0 reproduce: # apt-get install sparse # sparse version: v0.6.1-244-g0ee050a8-dirty git checkout bf53b03e9d2ac23fb4a3e639fe023f5f1af607b0 # save the attached .config to linux build tree make W=1 C=1 ARCH=arm CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot <[email protected]> sparse warnings: (new ones prefixed by >>) fs/ext4/mballoc.c:946:9: sparse: sparse: context imbalance in 'ext4_mb_init_cache' - different lock contexts for basic block fs/ext4/mballoc.c:1860:5: sparse: sparse: context imbalance in 'ext4_mb_try_best_found' - different lock contexts for basic block fs/ext4/mballoc.c:1888:5: sparse: sparse: context imbalance in 'ext4_mb_find_by_goal' - different lock contexts for basic block >> fs/ext4/mballoc.c:2175:12: sparse: sparse: context imbalance in >> 'ext4_mb_good_group_nolock' - wrong count at exit fs/ext4/mballoc.c:2286:49: sparse: sparse: context imbalance in 'ext4_mb_regular_allocator' - different lock contexts for basic block fs/ext4/mballoc.c:2825:17: sparse: sparse: context imbalance in 'ext4_mb_release' - different lock contexts for basic block include/linux/spinlock.h:393:9: sparse: sparse: context imbalance in 'ext4_free_data_in_buddy' - wrong count at exit fs/ext4/mballoc.c:3158:15: sparse: sparse: context imbalance in 'ext4_mb_mark_diskspace_used' - different lock contexts for basic block fs/ext4/mballoc.c:3409:13: sparse: sparse: context imbalance in 'ext4_discard_allocated_blocks' - different lock contexts for basic block fs/ext4/mballoc.c:3691:13: sparse: sparse: context imbalance in 'ext4_mb_put_pa' - different lock contexts for basic block fs/ext4/mballoc.c:4027:24: sparse: sparse: context imbalance in 'ext4_mb_discard_group_preallocations' - different lock contexts for basic block fs/ext4/mballoc.c:4177:9: sparse: sparse: context imbalance in 'ext4_discard_preallocations' - different lock contexts for basic block fs/ext4/mballoc.c:4244:9: sparse: sparse: context imbalance in 'ext4_mb_show_ac' - different lock contexts for basic block fs/ext4/mballoc.c:4472:9: sparse: sparse: context imbalance in 'ext4_mb_discard_lg_preallocations' - different lock contexts for basic block fs/ext4/mballoc.c:4244:9: sparse: sparse: context imbalance in 'ext4_mb_new_blocks' - different lock contexts for basic block fs/ext4/mballoc.c:4979:9: sparse: sparse: context imbalance in 'ext4_free_blocks' - different lock contexts for basic block fs/ext4/mballoc.c:5279:15: sparse: sparse: context imbalance in 'ext4_group_add_blocks' - different lock contexts for basic block fs/ext4/mballoc.c:5319:24: sparse: sparse: context imbalance in 'ext4_trim_extent' - wrong count at exit fs/ext4/mballoc.c:5343:1: sparse: sparse: context imbalance in 'ext4_trim_all_free' - different lock contexts for basic block fs/ext4/mballoc.c:5509:1: sparse: sparse: context imbalance in 'ext4_mballoc_query_range' - different lock contexts for basic block # https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=bf53b03e9d2ac23fb4a3e639fe023f5f1af607b0 git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git git remote update linux-next git checkout bf53b03e9d2ac23fb4a3e639fe023f5f1af607b0 vim +/ext4_mb_good_group_nolock +2175 fs/ext4/mballoc.c 9e467ce0e92226 Ritesh Harjani 2020-05-20 2169 9e467ce0e92226 Ritesh Harjani 2020-05-20 2170 /* 9e467ce0e92226 Ritesh Harjani 2020-05-20 2171 * This could return negative error code if something goes wrong 9e467ce0e92226 Ritesh Harjani 2020-05-20 2172 * during ext4_mb_init_group(). This should not be called with 9e467ce0e92226 Ritesh Harjani 2020-05-20 2173 * ext4_lock_group() held. 9e467ce0e92226 Ritesh Harjani 2020-05-20 2174 */ 9e467ce0e92226 Ritesh Harjani 2020-05-20 @2175 static int ext4_mb_good_group_nolock(struct ext4_allocation_context *ac, 9e467ce0e92226 Ritesh Harjani 2020-05-20 2176 ext4_group_t group, int cr) 9e467ce0e92226 Ritesh Harjani 2020-05-20 2177 { 9e467ce0e92226 Ritesh Harjani 2020-05-20 2178 struct ext4_group_info *grp = ext4_get_group_info(ac->ac_sb, group); bf53b03e9d2ac2 Ritesh Harjani 2020-05-20 2179 struct super_block *sb = ac->ac_sb; bf53b03e9d2ac2 Ritesh Harjani 2020-05-20 2180 bool should_lock = ac->ac_flags & EXT4_MB_STRICT_CHECK; 9e467ce0e92226 Ritesh Harjani 2020-05-20 2181 ext4_grpblk_t free; 9e467ce0e92226 Ritesh Harjani 2020-05-20 2182 int ret = 0; 9e467ce0e92226 Ritesh Harjani 2020-05-20 2183 bf53b03e9d2ac2 Ritesh Harjani 2020-05-20 2184 if (should_lock) bf53b03e9d2ac2 Ritesh Harjani 2020-05-20 2185 ext4_lock_group(sb, group); 9e467ce0e92226 Ritesh Harjani 2020-05-20 2186 free = grp->bb_free; 9e467ce0e92226 Ritesh Harjani 2020-05-20 2187 if (free == 0) 9e467ce0e92226 Ritesh Harjani 2020-05-20 2188 goto out; 9e467ce0e92226 Ritesh Harjani 2020-05-20 2189 if (cr <= 2 && free < ac->ac_g_ex.fe_len) 9e467ce0e92226 Ritesh Harjani 2020-05-20 2190 goto out; 9e467ce0e92226 Ritesh Harjani 2020-05-20 2191 if (unlikely(EXT4_MB_GRP_BBITMAP_CORRUPT(grp))) 9e467ce0e92226 Ritesh Harjani 2020-05-20 2192 goto out; bf53b03e9d2ac2 Ritesh Harjani 2020-05-20 2193 if (should_lock) bf53b03e9d2ac2 Ritesh Harjani 2020-05-20 2194 ext4_unlock_group(sb, group); 9e467ce0e92226 Ritesh Harjani 2020-05-20 2195 9e467ce0e92226 Ritesh Harjani 2020-05-20 2196 /* We only do this if the grp has never been initialized */ 9e467ce0e92226 Ritesh Harjani 2020-05-20 2197 if (unlikely(EXT4_MB_GRP_NEED_INIT(grp))) { 9e467ce0e92226 Ritesh Harjani 2020-05-20 2198 ret = ext4_mb_init_group(ac->ac_sb, group, GFP_NOFS); 9e467ce0e92226 Ritesh Harjani 2020-05-20 2199 if (ret) 9e467ce0e92226 Ritesh Harjani 2020-05-20 2200 return ret; 9e467ce0e92226 Ritesh Harjani 2020-05-20 2201 } 9e467ce0e92226 Ritesh Harjani 2020-05-20 2202 bf53b03e9d2ac2 Ritesh Harjani 2020-05-20 2203 if (should_lock) bf53b03e9d2ac2 Ritesh Harjani 2020-05-20 2204 ext4_lock_group(sb, group); 9e467ce0e92226 Ritesh Harjani 2020-05-20 2205 ret = ext4_mb_good_group(ac, group, cr); 9e467ce0e92226 Ritesh Harjani 2020-05-20 2206 out: bf53b03e9d2ac2 Ritesh Harjani 2020-05-20 2207 if (should_lock) bf53b03e9d2ac2 Ritesh Harjani 2020-05-20 2208 ext4_unlock_group(sb, group); 9e467ce0e92226 Ritesh Harjani 2020-05-20 2209 return ret; c9de560ded61fa Alex Tomas 2008-01-29 2210 } c9de560ded61fa Alex Tomas 2008-01-29 2211 :::::: The code at line 2175 was first introduced by commit :::::: 9e467ce0e92226a8c859d7850e6a6065f6eff8fd ext4: mballoc: refactor ext4_mb_good_group() :::::: TO: Ritesh Harjani <[email protected]> :::::: CC: Theodore Ts'o <[email protected]> --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/[email protected]
.config.gz
Description: application/gzip
_______________________________________________ kbuild mailing list -- [email protected] To unsubscribe send an email to [email protected]
