All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Johannes Thumshirn <jth@kernel.org>, linux-btrfs@vger.kernel.org
Cc: oe-kbuild-all@lists.linux.dev,
	Naohiro Aota <naohiro.aota@wdc.com>,
	Damien Le Moal <dlemoal@kernel.org>,
	David Sterba <dsterba@suse.com>,
	Josef Bacik <josef@toxicpanda.com>,
	Johannes Thumshirn <johannes.thumshirn@wdc.com>
Subject: Re: [PATCH v2] btrfs: zoned: fix alloc_offset calculation for partly conventional block groups
Date: Fri, 6 Jun 2025 08:06:02 +0800	[thread overview]
Message-ID: <202506060751.KRci5LHx-lkp@intel.com> (raw)
In-Reply-To: <20250605091811.386815-1-jth@kernel.org>

Hi Johannes,

kernel test robot noticed the following build errors:

[auto build test ERROR on kdave/for-next]
[also build test ERROR on linus/master v6.15 next-20250605]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Johannes-Thumshirn/btrfs-zoned-fix-alloc_offset-calculation-for-partly-conventional-block-groups/20250605-171925
base:   https://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux.git for-next
patch link:    https://lore.kernel.org/r/20250605091811.386815-1-jth%40kernel.org
patch subject: [PATCH v2] btrfs: zoned: fix alloc_offset calculation for partly conventional block groups
config: i386-buildonly-randconfig-002-20250606 (https://download.01.org/0day-ci/archive/20250606/202506060751.KRci5LHx-lkp@intel.com/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250606/202506060751.KRci5LHx-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/202506060751.KRci5LHx-lkp@intel.com/

All errors (new ones prefixed by >>):

   ld: fs/btrfs/zoned.o: in function `btrfs_load_block_group_raid0':
>> fs/btrfs/zoned.c:1531: undefined reference to `__umoddi3'
   ld: fs/btrfs/zoned.o: in function `btrfs_load_block_group_raid10':
   fs/btrfs/zoned.c:1592: undefined reference to `__umoddi3'


vim +1531 fs/btrfs/zoned.c

  1504	
  1505	static int btrfs_load_block_group_raid0(struct btrfs_block_group *bg,
  1506						struct btrfs_chunk_map *map,
  1507						struct zone_info *zone_info,
  1508						unsigned long *active,
  1509						u64 last_alloc)
  1510	{
  1511		struct btrfs_fs_info *fs_info = bg->fs_info;
  1512	
  1513		if ((map->type & BTRFS_BLOCK_GROUP_DATA) && !fs_info->stripe_root) {
  1514			btrfs_err(fs_info, "zoned: data %s needs raid-stripe-tree",
  1515				  btrfs_bg_type_to_raid_name(map->type));
  1516			return -EINVAL;
  1517		}
  1518	
  1519		for (int i = 0; i < map->num_stripes; i++) {
  1520			if (zone_info[i].alloc_offset == WP_MISSING_DEV)
  1521				continue;
  1522	
  1523			if (zone_info[i].alloc_offset == WP_CONVENTIONAL) {
  1524				u64 stripe_nr, full_stripe_nr;
  1525				u64 stripe_offset;
  1526				int stripe_index;
  1527	
  1528				stripe_nr = div64_u64(last_alloc, map->stripe_size);
  1529				stripe_offset = stripe_nr * map->stripe_size;
  1530				full_stripe_nr = div_u64(stripe_nr, map->num_stripes);
> 1531				stripe_index = stripe_nr % map->num_stripes;
  1532	
  1533				zone_info[i].alloc_offset =
  1534					full_stripe_nr * map->stripe_size;
  1535	
  1536				if (stripe_index > i)
  1537					zone_info[i].alloc_offset += map->stripe_size;
  1538				else if (stripe_index == i)
  1539					zone_info[i].alloc_offset +=
  1540						(last_alloc - stripe_offset);
  1541			}
  1542	
  1543			if (test_bit(0, active) != test_bit(i, active)) {
  1544				if (!btrfs_zone_activate(bg))
  1545					return -EIO;
  1546			} else {
  1547				if (test_bit(0, active))
  1548					set_bit(BLOCK_GROUP_FLAG_ZONE_IS_ACTIVE, &bg->runtime_flags);
  1549			}
  1550			bg->zone_capacity += zone_info[i].capacity;
  1551			bg->alloc_offset += zone_info[i].alloc_offset;
  1552		}
  1553	
  1554		return 0;
  1555	}
  1556	

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

      reply	other threads:[~2025-06-06  0:06 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-05  9:18 [PATCH v2] btrfs: zoned: fix alloc_offset calculation for partly conventional block groups Johannes Thumshirn
2025-06-06  0:06 ` kernel test robot [this message]

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=202506060751.KRci5LHx-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=dlemoal@kernel.org \
    --cc=dsterba@suse.com \
    --cc=johannes.thumshirn@wdc.com \
    --cc=josef@toxicpanda.com \
    --cc=jth@kernel.org \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=naohiro.aota@wdc.com \
    --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.