From: kernel test robot <lkp@intel.com>
To: Kent Overstreet <kent.overstreet@linux.dev>
Cc: oe-kbuild-all@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: fs/bcachefs/backpointers.c:396:21: warning: 'bucket.offset' is used uninitialized
Date: Wed, 19 Jun 2024 12:33:13 +0800 [thread overview]
Message-ID: <202406191248.wSUI6f8j-lkp@intel.com> (raw)
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@intel.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
reply other threads:[~2024-06-19 4:33 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202406191248.wSUI6f8j-lkp@intel.com \
--to=lkp@intel.com \
--cc=kent.overstreet@linux.dev \
--cc=linux-kernel@vger.kernel.org \
--cc=oe-kbuild-all@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome