All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Kent Overstreet <kent.overstreet@linux.dev>
Cc: oe-kbuild-all@lists.linux.dev,
	Kent Overstreet <kent.overstreet@linux.dev>
Subject: [bcachefs:master /569] fs/bcachefs/data/rebalance.c:368:2: error: a label can only be part of a statement and a declaration is not a statement
Date: Mon, 13 Oct 2025 18:43:45 +0800	[thread overview]
Message-ID: <202510131849.cvspSn85-lkp@intel.com> (raw)

tree:   https://evilpiepirate.org/git/bcachefs.git master
head:   ab6262d0e3688744f5ecdd6086e0c15e3ec22c79
commit: c2566abb1266756014a8464808dcdf7def91fe31 [/569] bcachefs: bch2_bkey_get_io_opts() responsible for indirect extent opts
config: arm-randconfig-001-20251013 (https://download.01.org/0day-ci/archive/20251013/202510131849.cvspSn85-lkp@intel.com/config)
compiler: arm-linux-gnueabi-gcc (GCC) 10.5.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251013/202510131849.cvspSn85-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/202510131849.cvspSn85-lkp@intel.com/

All errors (new ones prefixed by >>):

   fs/bcachefs/data/rebalance.c: In function 'bch2_bkey_get_io_opts':
>> fs/bcachefs/data/rebalance.c:368:2: error: a label can only be part of a statement and a declaration is not a statement
     368 |  const struct bch_extent_rebalance *old = bch2_bkey_rebalance_opts(k);
         |  ^~~~~


vim +368 fs/bcachefs/data/rebalance.c

   288	
   289	int bch2_bkey_get_io_opts(struct btree_trans *trans,
   290				  struct per_snapshot_io_opts *snapshot_opts, struct bkey_s_c k,
   291				  struct bch_inode_opts *opts)
   292	{
   293		struct bch_fs *c = trans->c;
   294	
   295		if (!snapshot_opts) {
   296			bch2_inode_opts_get(c, opts, bkey_is_btree_ptr(k.k));
   297	
   298			if (k.k->type == KEY_TYPE_reflink_v)
   299				goto indirect_extent_fixups;
   300	
   301			if (!bkey_is_btree_ptr(k.k) && k.k->type != KEY_TYPE_reflink_v) {
   302				struct bch_inode_unpacked inode;
   303				int ret = bch2_inode_find_by_inum_snapshot(trans, k.k->p.inode, k.k->p.snapshot,
   304									   &inode, BTREE_ITER_cached);
   305				if (bch2_err_matches(ret, BCH_ERR_transaction_restart))
   306					return ret;
   307				if (!ret)
   308					bch2_inode_opts_get_inode(c, &inode, opts);
   309			}
   310	
   311			return 0;
   312		}
   313	
   314		if (snapshot_opts->fs_io_opts.change_cookie != atomic_read(&c->opt_change_cookie)) {
   315			bch2_inode_opts_get(c, &snapshot_opts->fs_io_opts, bkey_is_btree_ptr(k.k));
   316	
   317			snapshot_opts->cur_inum = 0;
   318			snapshot_opts->d.nr = 0;
   319		}
   320	
   321		if (bkey_is_btree_ptr(k.k)) {
   322			*opts = snapshot_opts->fs_io_opts;
   323			return 0;
   324		}
   325	
   326		if (k.k->type == KEY_TYPE_reflink_v) {
   327			*opts = snapshot_opts->fs_io_opts;
   328			goto indirect_extent_fixups;
   329		}
   330	
   331		if (snapshot_opts->cur_inum != k.k->p.inode) {
   332			snapshot_opts->d.nr = 0;
   333	
   334			int ret = for_each_btree_key(trans, iter, BTREE_ID_inodes, POS(0, k.k->p.inode),
   335						     BTREE_ITER_all_snapshots, k, ({
   336				if (k.k->p.offset != k.k->p.inode)
   337					break;
   338	
   339				if (!bkey_is_inode(k.k))
   340					continue;
   341	
   342				struct bch_inode_unpacked inode;
   343				_ret3 = bch2_inode_unpack(k, &inode);
   344				if (_ret3)
   345					break;
   346	
   347				struct snapshot_io_opts_entry e = { .snapshot = k.k->p.snapshot };
   348				bch2_inode_opts_get_inode(c, &inode, &e.io_opts);
   349	
   350				darray_push(&snapshot_opts->d, e);
   351			}));
   352	
   353			snapshot_opts->cur_inum = k.k->p.inode;
   354	
   355			return ret ?: bch_err_throw(c, transaction_restart_nested);
   356		}
   357	
   358		if (k.k->p.snapshot)
   359			darray_for_each(snapshot_opts->d, i)
   360				if (bch2_snapshot_is_ancestor(c, k.k->p.snapshot, i->snapshot)) {
   361					*opts = i->io_opts;
   362					return 0;
   363				}
   364	
   365		*opts = snapshot_opts->fs_io_opts;
   366		return 0;
   367	indirect_extent_fixups:
 > 368		const struct bch_extent_rebalance *old = bch2_bkey_rebalance_opts(k);
   369		if (old) {
   370	#define x(_name)								\
   371		if (old->_name##_from_inode) {						\
   372			opts->_name			= old->_name;			\
   373			opts->_name##_from_inode	= old->_name##_from_inode;	\
   374		}
   375		BCH_REBALANCE_OPTS()
   376	#undef x
   377		}
   378	
   379		return 0;
   380	}
   381	

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

                 reply	other threads:[~2025-10-13 10:44 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=202510131849.cvspSn85-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=kent.overstreet@linux.dev \
    --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 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.