CC: kbuild-...@lists.01.org
CC: linux-ker...@vger.kernel.org
TO: Coly Li <col...@suse.de>
CC: Hannes Reinecke <h...@suse.de>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/colyli/linux-bcache.git 
nvdimm-meta
head:   e9d63ebcb289612237d5a62fa9876114798555eb
commit: 83cf31104f672925fccbdfabf3d5f14a78a9e568 [10/12] bcache: support 
storing bcache journal into NVDIMM meta device
:::::: branch date: 13 hours ago
:::::: commit date: 13 hours ago
config: powerpc-randconfig-s032-20210726 (attached as .config)
compiler: powerpc-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://git.kernel.org/pub/scm/linux/kernel/git/colyli/linux-bcache.git/commit/?id=83cf31104f672925fccbdfabf3d5f14a78a9e568
        git remote add bcache 
https://git.kernel.org/pub/scm/linux/kernel/git/colyli/linux-bcache.git
        git fetch --no-tags bcache nvdimm-meta
        git checkout 83cf31104f672925fccbdfabf3d5f14a78a9e568
        # 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=powerpc 
SHELL=/bin/bash drivers/md/bcache/

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


sparse warnings: (new ones prefixed by >>)
   drivers/md/bcache/journal.c: note: in included file (through 
drivers/md/bcache/bcache.h):
   include/uapi/linux/bcache.h:362:38: sparse: sparse: array of flexible 
structures
   drivers/md/bcache/journal.c: note: in included file (through 
drivers/md/bcache/bcache.h):
   drivers/md/bcache/bset.h:231:36: sparse: sparse: array of flexible structures
   drivers/md/bcache/journal.c:829:17: sparse: sparse: context imbalance in 
'journal_write_unlocked' - unexpected unlock
>> drivers/md/bcache/journal.c:860:13: sparse: sparse: context imbalance in 
>> 'journal_write' - wrong count at exit
   drivers/md/bcache/journal.c:876:9: sparse: sparse: context imbalance in 
'journal_try_write' - different lock contexts for basic block

vim +/journal_write +860 drivers/md/bcache/journal.c

83cf31104f6729 Coly Li         2021-07-24  818  
83cf31104f6729 Coly Li         2021-07-24  819  static void 
journal_write_unlocked(struct closure *cl)
83cf31104f6729 Coly Li         2021-07-24  820  {
83cf31104f6729 Coly Li         2021-07-24  821          struct cache_set *c = 
container_of(cl, struct cache_set, journal.io);
83cf31104f6729 Coly Li         2021-07-24  822          struct cache *ca = 
c->cache;
83cf31104f6729 Coly Li         2021-07-24  823          struct journal_write *w 
= c->journal.cur;
83cf31104f6729 Coly Li         2021-07-24  824  
83cf31104f6729 Coly Li         2021-07-24  825          if (!w->need_write) {
83cf31104f6729 Coly Li         2021-07-24  826                  
closure_return_with_destructor(cl, journal_write_unlock);
83cf31104f6729 Coly Li         2021-07-24  827                  return;
83cf31104f6729 Coly Li         2021-07-24  828          } else if 
(journal_full(&c->journal)) {
83cf31104f6729 Coly Li         2021-07-24 @829                  
journal_reclaim(c);
83cf31104f6729 Coly Li         2021-07-24  830                  
spin_unlock(&c->journal.lock);
83cf31104f6729 Coly Li         2021-07-24  831  
83cf31104f6729 Coly Li         2021-07-24  832                  
btree_flush_write(c);
83cf31104f6729 Coly Li         2021-07-24  833                  continue_at(cl, 
journal_write, bch_journal_wq);
83cf31104f6729 Coly Li         2021-07-24  834                  return;
83cf31104f6729 Coly Li         2021-07-24  835          }
83cf31104f6729 Coly Li         2021-07-24  836  
83cf31104f6729 Coly Li         2021-07-24  837          c->journal.blocks_free 
-= set_blocks(w->data, block_bytes(ca));
83cf31104f6729 Coly Li         2021-07-24  838  
83cf31104f6729 Coly Li         2021-07-24  839          w->data->btree_level = 
c->root->level;
83cf31104f6729 Coly Li         2021-07-24  840  
83cf31104f6729 Coly Li         2021-07-24  841          
bkey_copy(&w->data->btree_root, &c->root->key);
83cf31104f6729 Coly Li         2021-07-24  842          
bkey_copy(&w->data->uuid_bucket, &c->uuid_bucket);
83cf31104f6729 Coly Li         2021-07-24  843  
83cf31104f6729 Coly Li         2021-07-24  844          
w->data->prio_bucket[ca->sb.nr_this_dev] = ca->prio_buckets[0];
83cf31104f6729 Coly Li         2021-07-24  845          w->data->magic          
= jset_magic(&ca->sb);
83cf31104f6729 Coly Li         2021-07-24  846          w->data->version        
= BCACHE_JSET_VERSION;
83cf31104f6729 Coly Li         2021-07-24  847          w->data->last_seq       
= last_seq(&c->journal);
83cf31104f6729 Coly Li         2021-07-24  848          w->data->csum           
= csum_set(w->data);
83cf31104f6729 Coly Li         2021-07-24  849  
83cf31104f6729 Coly Li         2021-07-24  850          if 
(!bch_has_feature_nvdimm_meta(&ca->sb))
83cf31104f6729 Coly Li         2021-07-24  851                  
__journal_write_unlocked(c);
83cf31104f6729 Coly Li         2021-07-24  852  #if 
defined(CONFIG_BCACHE_NVM_PAGES)
83cf31104f6729 Coly Li         2021-07-24  853          else
83cf31104f6729 Coly Li         2021-07-24  854                  
__journal_nvdimm_write_unlocked(c);
83cf31104f6729 Coly Li         2021-07-24  855  #endif
cafe563591446c Kent Overstreet 2013-03-23  856  
cafe563591446c Kent Overstreet 2013-03-23  857          continue_at(cl, 
journal_write_done, NULL);
cafe563591446c Kent Overstreet 2013-03-23  858  }
cafe563591446c Kent Overstreet 2013-03-23  859  
cafe563591446c Kent Overstreet 2013-03-23 @860  static void 
journal_write(struct closure *cl)
cafe563591446c Kent Overstreet 2013-03-23  861  {
7857d5d470ec53 Kent Overstreet 2013-10-08  862          struct cache_set *c = 
container_of(cl, struct cache_set, journal.io);
cafe563591446c Kent Overstreet 2013-03-23  863  
cafe563591446c Kent Overstreet 2013-03-23  864          
spin_lock(&c->journal.lock);
cafe563591446c Kent Overstreet 2013-03-23  865          
journal_write_unlocked(cl);
cafe563591446c Kent Overstreet 2013-03-23  866  }
cafe563591446c Kent Overstreet 2013-03-23  867  

:::::: The code at line 860 was first introduced by commit
:::::: cafe563591446cf80bfbc2fe3bc72a2e36cf1060 bcache: A block layer cache

:::::: TO: Kent Overstreet <koverstr...@google.com>
:::::: CC: Kent Overstreet <koverstr...@google.com>

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

Attachment: .config.gz
Description: application/gzip

_______________________________________________
kbuild mailing list -- kbuild@lists.01.org
To unsubscribe send an email to kbuild-le...@lists.01.org

Reply via email to