From: kernel test robot <lkp@intel.com>
To: Su Yue <glass.su@suse.com>, linux-raid@vger.kernel.org
Cc: oe-kbuild-all@lists.linux.dev, song@kernel.org, xni@redhat.com,
linan122@huawei.com, yukuai@fnnas.com, heming.zhao@suse.com,
l@damenly.org, Su Yue <glass.su@suse.com>
Subject: Re: [PATCH 1/3] md: restore bitmap/location to fix wrong bitmap offset while growing
Date: Fri, 6 Mar 2026 06:50:09 +0800 [thread overview]
Message-ID: <202603060614.AZY6J9w9-lkp@intel.com> (raw)
In-Reply-To: <20260303033731.83885-2-glass.su@suse.com>
Hi Su,
kernel test robot noticed the following build errors:
[auto build test ERROR on linus/master]
[also build test ERROR on v7.0-rc2 next-20260305]
[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/Su-Yue/md-restore-bitmap-location-to-fix-wrong-bitmap-offset-while-growing/20260303-114108
base: linus/master
patch link: https://lore.kernel.org/r/20260303033731.83885-2-glass.su%40suse.com
patch subject: [PATCH 1/3] md: restore bitmap/location to fix wrong bitmap offset while growing
config: i386-randconfig-051-20260305 (https://download.01.org/0day-ci/archive/20260306/202603060614.AZY6J9w9-lkp@intel.com/config)
compiler: gcc-14 (Debian 14.2.0-19) 14.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260306/202603060614.AZY6J9w9-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/202603060614.AZY6J9w9-lkp@intel.com/
All errors (new ones prefixed by >>):
ld: drivers/md/md.o: in function `md_alloc':
>> drivers/md/md.c:6376:(.text+0xb36c): undefined reference to `md_sysfs_create_common_group'
vim +6376 drivers/md/md.c
6276
6277 struct mddev *md_alloc(dev_t dev, char *name)
6278 {
6279 /*
6280 * If dev is zero, name is the name of a device to allocate with
6281 * an arbitrary minor number. It will be "md_???"
6282 * If dev is non-zero it must be a device number with a MAJOR of
6283 * MD_MAJOR or mdp_major. In this case, if "name" is NULL, then
6284 * the device is being created by opening a node in /dev.
6285 * If "name" is not NULL, the device is being created by
6286 * writing to /sys/module/md_mod/parameters/new_array.
6287 */
6288 static DEFINE_MUTEX(disks_mutex);
6289 struct mddev *mddev;
6290 struct gendisk *disk;
6291 int partitioned;
6292 int shift;
6293 int unit;
6294 int error;
6295
6296 /*
6297 * Wait for any previous instance of this device to be completely
6298 * removed (mddev_delayed_delete).
6299 */
6300 flush_workqueue(md_misc_wq);
6301
6302 mutex_lock(&disks_mutex);
6303 mddev = mddev_alloc(dev);
6304 if (IS_ERR(mddev)) {
6305 error = PTR_ERR(mddev);
6306 goto out_unlock;
6307 }
6308
6309 partitioned = (MAJOR(mddev->unit) != MD_MAJOR);
6310 shift = partitioned ? MdpMinorShift : 0;
6311 unit = MINOR(mddev->unit) >> shift;
6312
6313 if (name && !dev) {
6314 /* Need to ensure that 'name' is not a duplicate.
6315 */
6316 struct mddev *mddev2;
6317 spin_lock(&all_mddevs_lock);
6318
6319 list_for_each_entry(mddev2, &all_mddevs, all_mddevs)
6320 if (mddev2->gendisk &&
6321 strcmp(mddev2->gendisk->disk_name, name) == 0) {
6322 spin_unlock(&all_mddevs_lock);
6323 error = -EEXIST;
6324 goto out_free_mddev;
6325 }
6326 spin_unlock(&all_mddevs_lock);
6327 }
6328 if (name && dev)
6329 /*
6330 * Creating /dev/mdNNN via "newarray", so adjust hold_active.
6331 */
6332 mddev->hold_active = UNTIL_STOP;
6333
6334 disk = blk_alloc_disk(NULL, NUMA_NO_NODE);
6335 if (IS_ERR(disk)) {
6336 error = PTR_ERR(disk);
6337 goto out_free_mddev;
6338 }
6339
6340 disk->major = MAJOR(mddev->unit);
6341 disk->first_minor = unit << shift;
6342 disk->minors = 1 << shift;
6343 if (name)
6344 strcpy(disk->disk_name, name);
6345 else if (partitioned)
6346 sprintf(disk->disk_name, "md_d%d", unit);
6347 else
6348 sprintf(disk->disk_name, "md%d", unit);
6349 disk->fops = &md_fops;
6350 disk->private_data = mddev;
6351
6352 disk->events |= DISK_EVENT_MEDIA_CHANGE;
6353 mddev->gendisk = disk;
6354 error = add_disk(disk);
6355 if (error)
6356 goto out_put_disk;
6357
6358 kobject_init(&mddev->kobj, &md_ktype);
6359 error = kobject_add(&mddev->kobj, &disk_to_dev(disk)->kobj, "%s", "md");
6360 if (error) {
6361 /*
6362 * The disk is already live at this point. Clear the hold flag
6363 * and let mddev_put take care of the deletion, as it isn't any
6364 * different from a normal close on last release now.
6365 */
6366 mddev->hold_active = 0;
6367 mutex_unlock(&disks_mutex);
6368 mddev_put(mddev);
6369 return ERR_PTR(error);
6370 }
6371
6372 /*
6373 * md_sysfs_remove_common_group is not needed because mddev_delayed_delete
6374 * calls kobject_put(&mddev->kobj) if mddev is to be deleted.
6375 */
> 6376 if (md_sysfs_create_common_group(mddev))
6377 pr_warn("md: cannot register common bitmap attributes for %s\n",
6378 mdname(mddev));
6379
6380 kobject_uevent(&mddev->kobj, KOBJ_ADD);
6381 mddev->sysfs_state = sysfs_get_dirent_safe(mddev->kobj.sd, "array_state");
6382 mddev->sysfs_level = sysfs_get_dirent_safe(mddev->kobj.sd, "level");
6383 mutex_unlock(&disks_mutex);
6384 return mddev;
6385
6386 out_put_disk:
6387 put_disk(disk);
6388 out_free_mddev:
6389 mddev_free(mddev);
6390 out_unlock:
6391 mutex_unlock(&disks_mutex);
6392 return ERR_PTR(error);
6393 }
6394
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next prev parent reply other threads:[~2026-03-05 22:50 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-03 3:37 [PATCH 0/3] md: bitmap grow fixes Su Yue
2026-03-03 3:37 ` [PATCH 1/3] md: restore bitmap/location to fix wrong bitmap offset while growing Su Yue
2026-03-04 2:30 ` Yu Kuai
2026-03-04 3:14 ` Su Yue
2026-03-05 17:57 ` Yu Kuai
2026-03-15 8:56 ` Glass Su
2026-03-15 18:12 ` Yu Kuai
2026-03-05 22:38 ` kernel test robot
2026-03-05 22:50 ` kernel test robot [this message]
2026-03-06 4:25 ` Glass Su
2026-03-03 3:37 ` [PATCH 2/3] md: call md_bitmap_create,destroy in location_store Su Yue
2026-03-03 3:37 ` [PATCH 3/3] md: remove member group from bitmap_operations Su Yue
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=202603060614.AZY6J9w9-lkp@intel.com \
--to=lkp@intel.com \
--cc=glass.su@suse.com \
--cc=heming.zhao@suse.com \
--cc=l@damenly.org \
--cc=linan122@huawei.com \
--cc=linux-raid@vger.kernel.org \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=song@kernel.org \
--cc=xni@redhat.com \
--cc=yukuai@fnnas.com \
/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