Re: [PATCH] bcache: fixup init dirty data errors

[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-rc7 next-20230822]
[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-fixup-init-dirty-data-errors/20230822-182044
base:   linus/master
patch link:    https://lore.kernel.org/r/20230822101958.2577-1-mingzhe.zou%40easystack.cn
patch subject: [PATCH] bcache: fixup init dirty data errors
config: i386-randconfig-011-20230822 (https://download.01.org/0day-ci/archive/20230823/202308231002.XWYzjVgk-lkp@xxxxxxxxx/config)
compiler: clang version 16.0.4 (https://github.com/llvm/llvm-project.git ae42196bc493ffe877a7e3dff8be32035dea4d07)
reproduce: (https://download.01.org/0day-ci/archive/20230823/202308231002.XWYzjVgk-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/202308231002.XWYzjVgk-lkp@xxxxxxxxx/

All errors (new ones prefixed by >>):

>> drivers/md/bcache/writeback.c:986:22: error: no member named 'dirty_sectors' in 'struct bcache_device'
           atomic_long_set(&d->dirty_sectors, 0);
                            ~  ^
   1 error generated.


vim +986 drivers/md/bcache/writeback.c

   976	
   977	void bch_sectors_dirty_init(struct bcache_device *d)
   978	{
   979		int i;
   980		struct bkey *k = NULL;
   981		struct btree_iter iter;
   982		struct sectors_dirty_init op;
   983		struct cache_set *c = d->c;
   984		struct bch_dirty_init_state state;
   985	
 > 986		atomic_long_set(&d->dirty_sectors, 0);
   987	
   988		/* Just count root keys if no leaf node */
   989		rw_lock(0, c->root, c->root->level);
   990		if (c->root->level == 0) {
   991			bch_btree_op_init(&op.op, -1);
   992			op.inode = d->id;
   993			op.count = 0;
   994	
   995			for_each_key_filter(&c->root->keys,
   996					    k, &iter, bch_ptr_invalid) {
   997				if (KEY_INODE(k) != op.inode)
   998					continue;
   999				sectors_dirty_init_fn(&op.op, c->root, k);
  1000			}
  1001	
  1002			rw_unlock(0, c->root);
  1003			return;
  1004		}
  1005	
  1006		memset(&state, 0, sizeof(struct bch_dirty_init_state));
  1007		state.c = c;
  1008		state.d = d;
  1009		state.total_threads = bch_btre_dirty_init_thread_nr();
  1010		state.key_idx = 0;
  1011		spin_lock_init(&state.idx_lock);
  1012		atomic_set(&state.started, 0);
  1013		atomic_set(&state.enough, 0);
  1014		init_waitqueue_head(&state.wait);
  1015	
  1016		for (i = 0; i < state.total_threads; i++) {
  1017			/* Fetch latest state.enough earlier */
  1018			smp_mb__before_atomic();
  1019			if (atomic_read(&state.enough))
  1020				break;
  1021	
  1022			state.infos[i].state = &state;
  1023			state.infos[i].thread =
  1024				kthread_run(bch_dirty_init_thread, &state.infos[i],
  1025					    "bch_dirtcnt[%d]", i);
  1026			if (IS_ERR(state.infos[i].thread)) {
  1027				pr_err("fails to run thread bch_dirty_init[%d]\n", i);
  1028				for (--i; i >= 0; i--)
  1029					kthread_stop(state.infos[i].thread);
  1030				goto out;
  1031			}
  1032			atomic_inc(&state.started);
  1033		}
  1034	
  1035	out:
  1036		/* Must wait for all threads to stop. */
  1037		wait_event(state.wait, atomic_read(&state.started) == 0);
  1038		rw_unlock(0, c->root);
  1039	}
  1040	

-- 
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