[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202406191248.wSUI6f8j-lkp@intel.com>
Date: Wed, 19 Jun 2024 12:33:13 +0800
From: kernel test robot <lkp@...el.com>
To: Kent Overstreet <kent.overstreet@...ux.dev>
Cc: oe-kbuild-all@...ts.linux.dev, linux-kernel@...r.kernel.org
Subject: fs/bcachefs/backpointers.c:396:21: warning: 'bucket.offset' is used
uninitialized
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 92e5605a199efbaee59fb19e15d6cc2103a04ec2
commit: 633cf069445d95384d88e9ff40f395c001f8b2b7 bcachefs: Kill bch2_dev_bkey_exists() in backpointer code
date: 6 weeks ago
config: um-randconfig-r081-20240305 (https://download.01.org/0day-ci/archive/20240619/202406191248.wSUI6f8j-lkp@intel.com/config)
compiler: gcc-13 (Ubuntu 13.2.0-4ubuntu3) 13.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240619/202406191248.wSUI6f8j-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@...el.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202406191248.wSUI6f8j-lkp@intel.com/
All warnings (new ones prefixed by >>):
fs/bcachefs/backpointers.c: In function 'bch2_check_btree_backpointer':
>> fs/bcachefs/backpointers.c:396:21: warning: 'bucket.offset' is used uninitialized [-Wuninitialized]
396 | struct bpos bucket;
| ^~~~~~
vim +396 fs/bcachefs/backpointers.c
386
387 static int bch2_check_btree_backpointer(struct btree_trans *trans, struct btree_iter *bp_iter,
388 struct bkey_s_c k)
389 {
390 struct bch_fs *c = trans->c;
391 struct btree_iter alloc_iter = { NULL };
392 struct bkey_s_c alloc_k;
393 struct printbuf buf = PRINTBUF;
394 int ret = 0;
395
> 396 struct bpos bucket;
397 if (!bp_pos_to_bucket_nodev_noerror(c, k.k->p, &bucket)) {
398 if (fsck_err(c, backpointer_to_missing_device,
399 "backpointer for missing device:\n%s",
400 (bch2_bkey_val_to_text(&buf, c, k), buf.buf)))
401 ret = bch2_btree_delete_at(trans, bp_iter, 0);
402 goto out;
403 }
404
405 alloc_k = bch2_bkey_get_iter(trans, &alloc_iter, BTREE_ID_alloc, bucket, 0);
406 ret = bkey_err(alloc_k);
407 if (ret)
408 goto out;
409
410 if (fsck_err_on(alloc_k.k->type != KEY_TYPE_alloc_v4, c,
411 backpointer_to_missing_alloc,
412 "backpointer for nonexistent alloc key: %llu:%llu:0\n%s",
413 alloc_iter.pos.inode, alloc_iter.pos.offset,
414 (bch2_bkey_val_to_text(&buf, c, k), buf.buf))) {
415 ret = bch2_btree_delete_at(trans, bp_iter, 0);
416 goto out;
417 }
418 out:
419 fsck_err:
420 bch2_trans_iter_exit(trans, &alloc_iter);
421 printbuf_exit(&buf);
422 return ret;
423 }
424
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
Powered by blists - more mailing lists