Re: [PATCH 2/3] bcache: Separate bch_moving_gc() from bch_btree_gc()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Mingzhe,

kernel test robot noticed the following build errors:

[auto build test ERROR on linus/master]
[also build test ERROR on v6.5-rc2 next-20230718]
[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#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Mingzhe-Zou/bcache-Separate-bch_moving_gc-from-bch_btree_gc/20230718-195022
base:   linus/master
patch link:    https://lore.kernel.org/r/20230717124143.171-2-mingzhe.zou%40easystack.cn
patch subject: [PATCH 2/3] bcache: Separate bch_moving_gc() from bch_btree_gc()
config: arc-randconfig-r043-20230718 (https://download.01.org/0day-ci/archive/20230719/202307191019.6OQTEaHw-lkp@xxxxxxxxx/config)
compiler: arc-elf-gcc (GCC) 12.3.0
reproduce: (https://download.01.org/0day-ci/archive/20230719/202307191019.6OQTEaHw-lkp@xxxxxxxxx/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202307191019.6OQTEaHw-lkp@xxxxxxxxx/

All errors (new ones prefixed by >>):

   In file included from include/asm-generic/bug.h:22,
                    from arch/arc/include/asm/bug.h:30,
                    from include/linux/bug.h:5,
                    from include/linux/thread_info.h:13,
                    from include/asm-generic/preempt.h:5,
                    from ./arch/arc/include/generated/asm/preempt.h:1,
                    from include/linux/preempt.h:79,
                    from include/linux/spinlock.h:56,
                    from include/linux/wait.h:9,
                    from include/linux/mempool.h:8,
                    from include/linux/bio.h:8,
                    from drivers/md/bcache/bcache.h:181,
                    from drivers/md/bcache/movinggc.c:8:
   drivers/md/bcache/movinggc.c: In function 'bch_moving_gc':
>> drivers/md/bcache/movinggc.c:236:18: error: 'struct cache_set' has no member named 'sb'
     236 |                 c->sb.set_uuid, sectors_to_move, ca->heap.used);
         |                  ^~
   include/linux/printk.h:427:33: note: in definition of macro 'printk_index_wrap'
     427 |                 _p_func(_fmt, ##__VA_ARGS__);                           \
         |                                 ^~~~~~~~~~~
   include/linux/printk.h:528:9: note: in expansion of macro 'printk'
     528 |         printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__)
         |         ^~~~~~
   drivers/md/bcache/movinggc.c:235:9: note: in expansion of macro 'pr_info'
     235 |         pr_info("moving gc: on set %pU, %lu sectors from %zu buckets",
         |         ^~~~~~~


vim +236 drivers/md/bcache/movinggc.c

   196	
   197	void bch_moving_gc(struct cache_set *c)
   198	{
   199		struct cache *ca = c->cache;
   200		struct bucket *b;
   201		unsigned long sectors_to_move, reserve_sectors;
   202	
   203		c->cache->only_moving_gc = 0;
   204	
   205		if (!c->copy_gc_enabled)
   206			return;
   207	
   208		mutex_lock(&c->bucket_lock);
   209	
   210		sectors_to_move = 0;
   211		reserve_sectors = ca->sb.bucket_size *
   212				     fifo_used(&ca->free[RESERVE_MOVINGGC]);
   213	
   214		ca->heap.used = 0;
   215	
   216		for_each_bucket(b, ca) {
   217			if (GC_MOVE(b) || GC_MARK(b) == GC_MARK_METADATA ||
   218			    !b->gc_sectors_used ||
   219			    b->gc_sectors_used == ca->sb.bucket_size ||
   220			    atomic_read(&b->pin))
   221				continue;
   222	
   223			if (!heap_full(&ca->heap)) {
   224				sectors_to_move += b->gc_sectors_used;
   225				heap_add(&ca->heap, b, bucket_cmp);
   226			} else if (bucket_cmp(b, heap_peek(&ca->heap))) {
   227				sectors_to_move -= bucket_heap_top(ca);
   228				sectors_to_move += b->gc_sectors_used;
   229	
   230				ca->heap.data[0] = b;
   231				heap_sift(&ca->heap, 0, bucket_cmp);
   232			}
   233		}
   234	 
   235		pr_info("moving gc: on set %pU, %lu sectors from %zu buckets",
 > 236			c->sb.set_uuid, sectors_to_move, ca->heap.used);
   237	
   238		while (sectors_to_move > reserve_sectors) {
   239			heap_pop(&ca->heap, b, bucket_cmp);
   240			sectors_to_move -= b->gc_sectors_used;
   241		}
   242	
   243		while (heap_pop(&ca->heap, b, bucket_cmp))
   244			SET_GC_MOVE(b, 1);
   245	
   246		mutex_unlock(&c->bucket_lock);
   247	
   248		c->moving_gc_keys.last_scanned = ZERO_KEY;
   249	
   250		read_moving(c);
   251	}
   252	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux ARM Kernel]     [Linux Filesystem Development]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux