public inbox for linux-btrfs@vger.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Naohiro Aota <naohiro.aota@wdc.com>, linux-btrfs@vger.kernel.org
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
	Naohiro Aota <naohiro.aota@wdc.com>
Subject: Re: [PATCH 4/4] btrfs: tests: zoned: add selftest for zoned code
Date: Sat, 24 Jan 2026 02:58:23 +0100	[thread overview]
Message-ID: <202601240254.ewdvMi5U-lkp@intel.com> (raw)
In-Reply-To: <20260123125920.4129581-5-naohiro.aota@wdc.com>

Hi Naohiro,

kernel test robot noticed the following build errors:

[auto build test ERROR on kdave/for-next]
[also build test ERROR on next-20260123]
[cannot apply to linus/master v6.16-rc1]
[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/Naohiro-Aota/btrfs-tests-add-cleanup-functions-for-test-specific-functions/20260123-210300
base:   https://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux.git for-next
patch link:    https://lore.kernel.org/r/20260123125920.4129581-5-naohiro.aota%40wdc.com
patch subject: [PATCH 4/4] btrfs: tests: zoned: add selftest for zoned code
config: x86_64-kexec (https://download.01.org/0day-ci/archive/20260124/202601240254.ewdvMi5U-lkp@intel.com/config)
compiler: clang version 20.1.8 (https://github.com/llvm/llvm-project 87f0227cb60147a26a1eeb4fb06e3b505e9c7261)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260124/202601240254.ewdvMi5U-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/202601240254.ewdvMi5U-lkp@intel.com/

All errors (new ones prefixed by >>):

>> fs/btrfs/tests/zoned-tests.c:89:8: error: call to undeclared function 'btrfs_load_block_group_by_raid_type'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
      89 |         ret = btrfs_load_block_group_by_raid_type(bg, map, zone_info, active,
         |               ^
   fs/btrfs/tests/zoned-tests.c:89:8: note: did you mean 'btrfs_load_block_group_zone_info'?
   fs/btrfs/tests/../zoned.h:195:19: note: 'btrfs_load_block_group_zone_info' declared here
     195 | static inline int btrfs_load_block_group_zone_info(
         |                   ^
   1 error generated.


vim +/btrfs_load_block_group_by_raid_type +89 fs/btrfs/tests/zoned-tests.c

    39	
    40	static int test_load_zone_info(struct btrfs_fs_info *fs_info,
    41				       struct load_zone_info_test_vector *test)
    42	{
    43		struct btrfs_block_group *bg __free(btrfs_free_dummy_block_group) = NULL;
    44		struct btrfs_chunk_map *map __free(btrfs_free_chunk_map) = NULL;
    45		struct zone_info AUTO_KFREE(zone_info);
    46		unsigned long AUTO_KFREE(active);
    47		int i, ret;
    48	
    49		bg = btrfs_alloc_dummy_block_group(fs_info, test->bg_length);
    50		if (!bg) {
    51			test_std_err(TEST_ALLOC_BLOCK_GROUP);
    52			return -ENOMEM;
    53		}
    54	
    55		map = btrfs_alloc_chunk_map(test->num_stripes, GFP_KERNEL);
    56		if (!map) {
    57			test_std_err(TEST_ALLOC_EXTENT_MAP);
    58			return -ENOMEM;
    59		}
    60	
    61		zone_info = kcalloc(test->num_stripes, sizeof(*zone_info), GFP_KERNEL);
    62		if (!zone_info) {
    63			test_err("cannot allocate zone info");
    64			return -ENOMEM;
    65		}
    66	
    67		active = bitmap_zalloc(test->num_stripes, GFP_KERNEL);
    68		if (!zone_info) {
    69			test_err("cannot allocate active bitmap");
    70			return -ENOMEM;
    71		}
    72	
    73		map->type = test->raid_type;
    74		map->num_stripes = test->num_stripes;
    75		if (test->raid_type == BTRFS_BLOCK_GROUP_RAID10)
    76			map->sub_stripes = 2;
    77		for (i = 0; i < test->num_stripes; i++) {
    78			zone_info[i].physical = 0;
    79			zone_info[i].alloc_offset = test->alloc_offsets[i];
    80			zone_info[i].capacity = ZONE_SIZE;
    81			if (zone_info[i].alloc_offset && zone_info[i].alloc_offset < ZONE_SIZE)
    82				__set_bit(i, active);
    83		}
    84		if (test->degraded)
    85			btrfs_set_opt(fs_info->mount_opt, DEGRADED);
    86		else
    87			btrfs_clear_opt(fs_info->mount_opt, DEGRADED);
    88	
  > 89		ret = btrfs_load_block_group_by_raid_type(bg, map, zone_info, active,
    90							  test->last_alloc);
    91	
    92		if (ret != test->expected_result) {
    93			test_err("unexpected return value: ret %d expected %d", ret,
    94				 test->expected_result);
    95			return -EINVAL;
    96		}
    97	
    98		if (!ret && bg->alloc_offset != test->expected_alloc_offset) {
    99			test_err("unexpected alloc_offset: alloc_offset %llu expected %llu",
   100				 bg->alloc_offset, test->expected_alloc_offset);
   101			return -EINVAL;
   102		}
   103	
   104		return 0;
   105	}
   106	

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

  parent reply	other threads:[~2026-01-24  1:58 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-23 12:59 [PATCH 0/4] btrfs: tests: zoned: add selftest for zoned code Naohiro Aota
2026-01-23 12:59 ` [PATCH 1/4] btrfs: tests: add cleanup functions for test specific functions Naohiro Aota
2026-01-23 12:59 ` [PATCH 2/4] btrfs: add cleanup function for btrfs_free_chunk_map Naohiro Aota
2026-01-23 12:59 ` [PATCH 3/4] btrfs: zoned: factor out the zone loading part into a testable function Naohiro Aota
2026-01-23 12:59 ` [PATCH 4/4] btrfs: tests: zoned: add selftest for zoned code Naohiro Aota
2026-01-23 22:17   ` kernel test robot
2026-01-23 23:00   ` kernel test robot
2026-01-24  1:58   ` kernel test robot [this message]
2026-01-24 14:22   ` kernel test robot

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=202601240254.ewdvMi5U-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=llvm@lists.linux.dev \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox