All of lore.kernel.org
 help / color / mirror / Atom feed
* [koverstreet-bcachefs:bcachefs-testing 204/207] fs/bcachefs/str_hash.c:164:2: error: expected expression
@ 2024-12-09 15:57 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2024-12-09 15:57 UTC (permalink / raw)
  To: Kent Overstreet; +Cc: llvm, oe-kbuild-all

tree:   https://github.com/koverstreet/bcachefs bcachefs-testing
head:   49f6359f9883c937742e95cef8eb3cb0e5aa2bb8
commit: 41df8115fe32fe3911ea5c1d7cb6d182abd689a7 [204/207] bcachefs: bch2_str_hash_check_key() now checks inode hash info
config: powerpc-allyesconfig (https://download.01.org/0day-ci/archive/20241209/202412092339.QB7hffGC-lkp@intel.com/config)
compiler: clang version 16.0.6 (https://github.com/llvm/llvm-project 7cbf1a2591520c2491aa35339f227775f4d3adf6)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241209/202412092339.QB7hffGC-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/202412092339.QB7hffGC-lkp@intel.com/

All errors (new ones prefixed by >>):

>> fs/bcachefs/str_hash.c:164:2: error: expected expression
           struct bch_inode_unpacked inode;
           ^
>> fs/bcachefs/str_hash.c:165:30: error: use of undeclared identifier 'inode'
           ret = bch2_inode_unpack(k, &inode);
                                       ^
   fs/bcachefs/str_hash.c:169:55: error: use of undeclared identifier 'inode'
           struct bch_hash_info hash2 = bch2_hash_info_init(c, &inode);
                                                                ^
   fs/bcachefs/str_hash.c:171:40: error: use of undeclared identifier 'inode'
                   ret = repair_inode_hash_info(trans, &inode);
                                                        ^
   4 errors generated.


vim +164 fs/bcachefs/str_hash.c

   140	
   141	/*
   142	 * All versions of the same inode in different snapshots must have the same hash
   143	 * seed/type: verify that the hash info we're using matches the root
   144	 */
   145	static int check_inode_hash_info_matches_root(struct btree_trans *trans, u64 inum,
   146						      struct bch_hash_info *hash_info)
   147	{
   148		struct bch_fs *c = trans->c;
   149		struct btree_iter iter;
   150		struct bkey_s_c k;
   151		int ret = 0;
   152	
   153		for_each_btree_key_reverse_norestart(trans, iter, BTREE_ID_inodes, SPOS(0, inum, U32_MAX),
   154						     BTREE_ITER_all_snapshots, k, ret) {
   155			if (k.k->p.offset != inum)
   156				break;
   157			if (bkey_is_inode(k.k))
   158				goto found;
   159		}
   160		bch_err(c, "%s(): inum %llu not found", __func__, inum);
   161		ret = -BCH_ERR_fsck_repair_unimplemented;
   162		goto err;
   163	found:
 > 164		struct bch_inode_unpacked inode;
 > 165		ret = bch2_inode_unpack(k, &inode);
   166		if (ret)
   167			goto err;
   168	
   169		struct bch_hash_info hash2 = bch2_hash_info_init(c, &inode);
   170		if (memcmp(hash_info, &hash2, sizeof(hash2))) {
   171			ret = repair_inode_hash_info(trans, &inode);
   172			if (!ret) {
   173				bch_err(c, "inode hash info mismatch with root, but mismatch not found");
   174				ret = -BCH_ERR_fsck_repair_unimplemented;
   175			}
   176		}
   177	err:
   178		bch2_trans_iter_exit(trans, &iter);
   179		return ret;
   180	}
   181	

-- 
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:[~2024-12-09 15:58 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-09 15:57 [koverstreet-bcachefs:bcachefs-testing 204/207] fs/bcachefs/str_hash.c:164:2: error: expected expression kernel test robot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.