CC: [email protected] In-Reply-To: <[email protected]> References: <[email protected]> TO: Jaegeuk Kim <[email protected]> TO: [email protected] TO: [email protected] CC: Jaegeuk Kim <[email protected]>
Hi Jaegeuk, I love your patch! Perhaps something to improve: [auto build test WARNING on f2fs/dev-test] [also build test WARNING on linux/master linus/master v5.14-rc2 next-20210722] [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/Jaegeuk-Kim/f2fs-use-rwlock-instead-of-rwsem-for-journal/20210722-094334 base: https://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs.git dev-test :::::: branch date: 24 hours ago :::::: commit date: 24 hours ago config: arm64-randconfig-s032-20210722 (attached as .config) compiler: aarch64-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/d6b325e856f8fd166ea9722d4489f897cf468edf git remote add linux-review https://github.com/0day-ci/linux git fetch --no-tags linux-review Jaegeuk-Kim/f2fs-use-rwlock-instead-of-rwsem-for-journal/20210722-094334 git checkout d6b325e856f8fd166ea9722d4489f897cf468edf # 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=arm64 SHELL=/bin/bash fs/f2fs/ 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/f2fs/node.c:2956:9: sparse: sparse: context imbalance in >> '__flush_nat_entry_set' - different lock contexts for basic block -- fs/f2fs/segment.c: note: in included file (through include/linux/irqflags.h, include/linux/spinlock.h, include/linux/wait.h, ...): arch/arm64/include/asm/percpu.h:126:1: sparse: sparse: cast truncates bits from constant value (ffffffff becomes ff) arch/arm64/include/asm/percpu.h:126:1: sparse: sparse: cast truncates bits from constant value (ffffffff becomes ffff) arch/arm64/include/asm/percpu.h:126:1: sparse: sparse: cast truncates bits from constant value (ffffffff becomes ff) arch/arm64/include/asm/percpu.h:126:1: sparse: sparse: cast truncates bits from constant value (ffffffff becomes ffff) >> fs/f2fs/segment.c:4258:17: sparse: sparse: context imbalance in >> 'f2fs_flush_sit_entries' - different lock contexts for basic block vim +/__flush_nat_entry_set +2956 fs/f2fs/node.c 22ad0b6ab46683 Jaegeuk Kim 2017-02-09 2887 edc55aaf0d1712 Jaegeuk Kim 2018-09-17 2888 static int __flush_nat_entry_set(struct f2fs_sb_info *sbi, 22ad0b6ab46683 Jaegeuk Kim 2017-02-09 2889 struct nat_entry_set *set, struct cp_control *cpc) 309cc2b6e7ae66 Jaegeuk Kim 2014-09-22 2890 { 309cc2b6e7ae66 Jaegeuk Kim 2014-09-22 2891 struct curseg_info *curseg = CURSEG_I(sbi, CURSEG_HOT_DATA); b7ad7512b84b26 Chao Yu 2016-02-19 2892 struct f2fs_journal *journal = curseg->journal; 309cc2b6e7ae66 Jaegeuk Kim 2014-09-22 2893 nid_t start_nid = set->set * NAT_ENTRY_PER_BLOCK; 309cc2b6e7ae66 Jaegeuk Kim 2014-09-22 2894 bool to_journal = true; 309cc2b6e7ae66 Jaegeuk Kim 2014-09-22 2895 struct f2fs_nat_block *nat_blk; 309cc2b6e7ae66 Jaegeuk Kim 2014-09-22 2896 struct nat_entry *ne, *cur; 309cc2b6e7ae66 Jaegeuk Kim 2014-09-22 2897 struct page *page = NULL; e05df3b115e730 Jaegeuk Kim 2012-11-02 2898 e05df3b115e730 Jaegeuk Kim 2012-11-02 2899 /* aec71382c68135 Chao Yu 2014-06-24 2900 * there are two steps to flush nat entries: aec71382c68135 Chao Yu 2014-06-24 2901 * #1, flush nat entries to journal in current hot data summary block. aec71382c68135 Chao Yu 2014-06-24 2902 * #2, flush nat entries to nat page. e05df3b115e730 Jaegeuk Kim 2012-11-02 2903 */ 22ad0b6ab46683 Jaegeuk Kim 2017-02-09 2904 if (enabled_nat_bits(sbi, cpc) || 22ad0b6ab46683 Jaegeuk Kim 2017-02-09 2905 !__has_cursum_space(journal, set->entry_cnt, NAT_JOURNAL)) aec71382c68135 Chao Yu 2014-06-24 2906 to_journal = false; aec71382c68135 Chao Yu 2014-06-24 2907 aec71382c68135 Chao Yu 2014-06-24 2908 if (to_journal) { d6b325e856f8fd Jaegeuk Kim 2021-07-21 2909 write_lock(&curseg->journal_rwlock); aec71382c68135 Chao Yu 2014-06-24 2910 } else { e05df3b115e730 Jaegeuk Kim 2012-11-02 2911 page = get_next_nat_page(sbi, start_nid); edc55aaf0d1712 Jaegeuk Kim 2018-09-17 2912 if (IS_ERR(page)) edc55aaf0d1712 Jaegeuk Kim 2018-09-17 2913 return PTR_ERR(page); edc55aaf0d1712 Jaegeuk Kim 2018-09-17 2914 e05df3b115e730 Jaegeuk Kim 2012-11-02 2915 nat_blk = page_address(page); 9850cf4a890888 Jaegeuk Kim 2014-09-02 2916 f2fs_bug_on(sbi, !nat_blk); e05df3b115e730 Jaegeuk Kim 2012-11-02 2917 } e05df3b115e730 Jaegeuk Kim 2012-11-02 2918 aec71382c68135 Chao Yu 2014-06-24 2919 /* flush dirty nats in nat entry set */ 309cc2b6e7ae66 Jaegeuk Kim 2014-09-22 2920 list_for_each_entry_safe(ne, cur, &set->entry_list, list) { aec71382c68135 Chao Yu 2014-06-24 2921 struct f2fs_nat_entry *raw_ne; aec71382c68135 Chao Yu 2014-06-24 2922 nid_t nid = nat_get_nid(ne); aec71382c68135 Chao Yu 2014-06-24 2923 int offset; e05df3b115e730 Jaegeuk Kim 2012-11-02 2924 febeca6d375531 Chao Yu 2017-06-05 2925 f2fs_bug_on(sbi, nat_get_blkaddr(ne) == NEW_ADDR); 309cc2b6e7ae66 Jaegeuk Kim 2014-09-22 2926 aec71382c68135 Chao Yu 2014-06-24 2927 if (to_journal) { 4d57b86dd86404 Chao Yu 2018-05-30 2928 offset = f2fs_lookup_journal_in_cursum(journal, aec71382c68135 Chao Yu 2014-06-24 2929 NAT_JOURNAL, nid, 1); 9850cf4a890888 Jaegeuk Kim 2014-09-02 2930 f2fs_bug_on(sbi, offset < 0); dfc08a12e49a64 Chao Yu 2016-02-14 2931 raw_ne = &nat_in_journal(journal, offset); dfc08a12e49a64 Chao Yu 2016-02-14 2932 nid_in_journal(journal, offset) = cpu_to_le32(nid); aec71382c68135 Chao Yu 2014-06-24 2933 } else { aec71382c68135 Chao Yu 2014-06-24 2934 raw_ne = &nat_blk->entries[nid - start_nid]; e05df3b115e730 Jaegeuk Kim 2012-11-02 2935 } aec71382c68135 Chao Yu 2014-06-24 2936 raw_nat_from_node_info(raw_ne, &ne->ni); 88bd02c9472a16 Jaegeuk Kim 2014-09-15 2937 nat_reset_flag(ne); 0b28b71e298fb7 Kinglong Mee 2017-02-28 2938 __clear_nat_cache_dirty(NM_I(sbi), set, ne); 04d47e673863c6 Chao Yu 2016-11-17 2939 if (nat_get_blkaddr(ne) == NULL_ADDR) { 5921aaa185908c LiFan 2017-11-22 2940 add_free_nid(sbi, nid, false, true); 4ac912427c4214 Chao Yu 2017-02-23 2941 } else { 4ac912427c4214 Chao Yu 2017-02-23 2942 spin_lock(&NM_I(sbi)->nid_list_lock); 346fe752c431bc Chao Yu 2017-03-13 2943 update_free_nid_bitmap(sbi, nid, false, false); 04d47e673863c6 Chao Yu 2016-11-17 2944 spin_unlock(&NM_I(sbi)->nid_list_lock); 04d47e673863c6 Chao Yu 2016-11-17 2945 } e05df3b115e730 Jaegeuk Kim 2012-11-02 2946 } aec71382c68135 Chao Yu 2014-06-24 2947 22ad0b6ab46683 Jaegeuk Kim 2017-02-09 2948 if (to_journal) { d6b325e856f8fd Jaegeuk Kim 2021-07-21 2949 write_unlock(&curseg->journal_rwlock); 22ad0b6ab46683 Jaegeuk Kim 2017-02-09 2950 } else { 22ad0b6ab46683 Jaegeuk Kim 2017-02-09 2951 __update_nat_bits(sbi, start_nid, page); e05df3b115e730 Jaegeuk Kim 2012-11-02 2952 f2fs_put_page(page, 1); 22ad0b6ab46683 Jaegeuk Kim 2017-02-09 2953 } aec71382c68135 Chao Yu 2014-06-24 2954 59c9081bc86ef0 Yunlei He 2017-03-13 2955 /* Allow dirty nats by node block allocation in write_begin */ 59c9081bc86ef0 Yunlei He 2017-03-13 @2956 if (!set->entry_cnt) { 309cc2b6e7ae66 Jaegeuk Kim 2014-09-22 2957 radix_tree_delete(&NM_I(sbi)->nat_set_root, set->set); 309cc2b6e7ae66 Jaegeuk Kim 2014-09-22 2958 kmem_cache_free(nat_entry_set_slab, set); 309cc2b6e7ae66 Jaegeuk Kim 2014-09-22 2959 } edc55aaf0d1712 Jaegeuk Kim 2018-09-17 2960 return 0; 59c9081bc86ef0 Yunlei He 2017-03-13 2961 } 309cc2b6e7ae66 Jaegeuk Kim 2014-09-22 2962 --- 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]
