llvm.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
* [koverstreet-bcachefs:bcachefs-testing 285/286] fs/bcachefs/backpointers.c:993:26: error: use of undeclared identifier 'bitmap'; did you mean 'bmap'?
@ 2025-08-09  2:53 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2025-08-09  2:53 UTC (permalink / raw)
  To: Kent Overstreet; +Cc: llvm, oe-kbuild-all

tree:   https://github.com/koverstreet/bcachefs bcachefs-testing
head:   f5a36d2f14aaecaa10d3534fe4628230a72f52d1
commit: 75a8c12d5cd2f2dd902a6c956d89393a449b022c [285/286] bcachefs: Fix backpointer_node_has_missing()
config: arm-randconfig-002-20250809 (https://download.01.org/0day-ci/archive/20250809/202508091053.RatDuRNU-lkp@intel.com/config)
compiler: clang version 20.1.8 (https://github.com/llvm/llvm-project 87f0227cb60147a26a1eeb4fb06e3b505e9c7261)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250809/202508091053.RatDuRNU-lkp@intel.com/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@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202508091053.RatDuRNU-lkp@intel.com/

All errors (new ones prefixed by >>):

   In file included from fs/bcachefs/backpointers.c:2:
   In file included from fs/bcachefs/bcachefs.h:218:
   In file included from fs/bcachefs/bcachefs_format.h:524:
   fs/bcachefs/sb-counters_format.h:132:2: warning: label at end of compound statement is a C23 extension [-Wc23-extensions]
     132 |         }
         |         ^
>> fs/bcachefs/backpointers.c:993:26: error: use of undeclared identifier 'bitmap'; did you mean 'bmap'?
     993 |                                                      find_next_bit(bitmap, ca->mi.nbuckets, bucket.offset));
         |                                                                    ^~~~~~
         |                                                                    bmap
   arch/arm/include/asm/bitops.h:205:52: note: expanded from macro 'find_next_bit'
     205 | #define find_next_bit(p,sz,off)         _find_next_bit_le(p,sz,off)
         |                                                           ^
   include/linux/minmax.h:161:52: note: expanded from macro 'min_t'
     161 | #define min_t(type, x, y) __cmp_once(min, type, x, y)
         |                                                    ^
   include/linux/minmax.h:89:33: note: expanded from macro '__cmp_once'
      89 |         __cmp_once_unique(op, type, x, y, __UNIQUE_ID(x_), __UNIQUE_ID(y_))
         |                                        ^
   include/linux/minmax.h:86:31: note: expanded from macro '__cmp_once_unique'
      86 |         ({ type ux = (x); type uy = (y); __cmp(op, ux, uy); })
         |                                      ^
   include/linux/fs.h:3050:12: note: 'bmap' declared here
    3050 | extern int bmap(struct inode *inode, sector_t *block);
         |            ^
   1 warning and 1 error generated.


vim +993 fs/bcachefs/backpointers.c

c738866e47ef2e4 Kent Overstreet 2024-11-15   963  
c738866e47ef2e4 Kent Overstreet 2024-11-15   964  static bool backpointer_node_has_missing(struct bch_fs *c, struct bkey_s_c k)
c738866e47ef2e4 Kent Overstreet 2024-11-15   965  {
c738866e47ef2e4 Kent Overstreet 2024-11-15   966  	switch (k.k->type) {
c738866e47ef2e4 Kent Overstreet 2024-11-15   967  	case KEY_TYPE_btree_ptr_v2: {
c738866e47ef2e4 Kent Overstreet 2024-11-15   968  		bool ret = false;
c738866e47ef2e4 Kent Overstreet 2024-11-15   969  
18dad454cd16cbb Kent Overstreet 2025-05-24   970  		guard(rcu)();
c738866e47ef2e4 Kent Overstreet 2024-11-15   971  		struct bpos pos = bkey_s_c_to_btree_ptr_v2(k).v->min_key;
c738866e47ef2e4 Kent Overstreet 2024-11-15   972  		while (pos.inode <= k.k->p.inode) {
c738866e47ef2e4 Kent Overstreet 2024-11-15   973  			if (pos.inode >= c->sb.nr_devices)
c738866e47ef2e4 Kent Overstreet 2024-11-15   974  				break;
c738866e47ef2e4 Kent Overstreet 2024-11-15   975  
c738866e47ef2e4 Kent Overstreet 2024-11-15   976  			struct bch_dev *ca = bch2_dev_rcu_noerror(c, pos.inode);
c738866e47ef2e4 Kent Overstreet 2024-11-15   977  			if (!ca)
c738866e47ef2e4 Kent Overstreet 2024-11-15   978  				goto next;
c738866e47ef2e4 Kent Overstreet 2024-11-15   979  
c738866e47ef2e4 Kent Overstreet 2024-11-15   980  			struct bpos bucket = bp_pos_to_bucket(ca, pos);
13ffcbae86dadbf Kent Overstreet 2025-05-09   981  			u64 next = ca->mi.nbuckets;
13ffcbae86dadbf Kent Overstreet 2025-05-09   982  
75a8c12d5cd2f2d Kent Overstreet 2025-08-08   983  			unsigned long *mismatch = READ_ONCE(ca->bucket_backpointer_mismatch.buckets);
75a8c12d5cd2f2d Kent Overstreet 2025-08-08   984  			unsigned long *empty = READ_ONCE(ca->bucket_backpointer_empty.buckets);
75a8c12d5cd2f2d Kent Overstreet 2025-08-08   985  			if (mismatch) {
75a8c12d5cd2f2d Kent Overstreet 2025-08-08   986  				/* Find the first bucket with mismatches - but
75a8c12d5cd2f2d Kent Overstreet 2025-08-08   987  				 * not empty buckets; we don't need to pin those
75a8c12d5cd2f2d Kent Overstreet 2025-08-08   988  				 * because we just recreate all backpointers in
75a8c12d5cd2f2d Kent Overstreet 2025-08-08   989  				 * those buckets
75a8c12d5cd2f2d Kent Overstreet 2025-08-08   990  				 */
75a8c12d5cd2f2d Kent Overstreet 2025-08-08   991  				do {
13ffcbae86dadbf Kent Overstreet 2025-05-09   992  					next = min_t(u64, next,
15f969326ee296f Kent Overstreet 2025-05-17  @993  						     find_next_bit(bitmap, ca->mi.nbuckets, bucket.offset));
75a8c12d5cd2f2d Kent Overstreet 2025-08-08   994  				} while (next < ca->mi.nbuckets &&
75a8c12d5cd2f2d Kent Overstreet 2025-08-08   995  					 (empty && test_bit(next, empty)));
75a8c12d5cd2f2d Kent Overstreet 2025-08-08   996  
75a8c12d5cd2f2d Kent Overstreet 2025-08-08   997  			}
13ffcbae86dadbf Kent Overstreet 2025-05-09   998  
13ffcbae86dadbf Kent Overstreet 2025-05-09   999  			bucket.offset = next;
c738866e47ef2e4 Kent Overstreet 2024-11-15  1000  			if (bucket.offset == ca->mi.nbuckets)
c738866e47ef2e4 Kent Overstreet 2024-11-15  1001  				goto next;
c738866e47ef2e4 Kent Overstreet 2024-11-15  1002  
c738866e47ef2e4 Kent Overstreet 2024-11-15  1003  			ret = bpos_le(bucket_pos_to_bp_end(ca, bucket), k.k->p);
c738866e47ef2e4 Kent Overstreet 2024-11-15  1004  			if (ret)
c738866e47ef2e4 Kent Overstreet 2024-11-15  1005  				break;
c738866e47ef2e4 Kent Overstreet 2024-11-15  1006  next:
c738866e47ef2e4 Kent Overstreet 2024-11-15  1007  			pos = SPOS(pos.inode + 1, 0, 0);
c738866e47ef2e4 Kent Overstreet 2024-11-15  1008  		}
c738866e47ef2e4 Kent Overstreet 2024-11-15  1009  
c738866e47ef2e4 Kent Overstreet 2024-11-15  1010  		return ret;
c738866e47ef2e4 Kent Overstreet 2024-11-15  1011  	}
c738866e47ef2e4 Kent Overstreet 2024-11-15  1012  	case KEY_TYPE_btree_ptr:
c738866e47ef2e4 Kent Overstreet 2024-11-15  1013  		return true;
c738866e47ef2e4 Kent Overstreet 2024-11-15  1014  	default:
c738866e47ef2e4 Kent Overstreet 2024-11-15  1015  		return false;
c738866e47ef2e4 Kent Overstreet 2024-11-15  1016  	}
c738866e47ef2e4 Kent Overstreet 2024-11-15  1017  }
c738866e47ef2e4 Kent Overstreet 2024-11-15  1018  

:::::: The code at line 993 was first introduced by commit
:::::: 15f969326ee296f7b7faf7704105a99fa02c288d bcachefs: Improve bucket_bitmap code

:::::: TO: Kent Overstreet <kent.overstreet@linux.dev>
:::::: CC: Kent Overstreet <kent.overstreet@linux.dev>

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2025-08-09  2:54 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-09  2:53 [koverstreet-bcachefs:bcachefs-testing 285/286] fs/bcachefs/backpointers.c:993:26: error: use of undeclared identifier 'bitmap'; did you mean 'bmap'? kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).