From: kernel test robot <lkp@intel.com>
To: Guoqing Jiang <guoqing.jiang@linux.dev>, song@kernel.org
Cc: llvm@lists.linux.dev, kbuild-all@lists.01.org,
buczek@molgen.mpg.de, linux-raid@vger.kernel.org,
Guoqing Jiang <guoqing.jiang@cloud.ionos.com>
Subject: Re: [PATCH V3 1/2] md: don't unregister sync_thread with reconfig_mutex held
Date: Fri, 6 May 2022 02:04:28 +0800 [thread overview]
Message-ID: <202205060116.J42KgtCW-lkp@intel.com> (raw)
In-Reply-To: <20220505081641.21500-2-guoqing.jiang@linux.dev>
Hi Guoqing,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on song-md/md-next]
[also build test WARNING on v5.18-rc5 next-20220505]
[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]
url: https://github.com/intel-lab-lkp/linux/commits/Guoqing-Jiang/two-fixes-for-md/20220505-162202
base: git://git.kernel.org/pub/scm/linux/kernel/git/song/md.git md-next
config: hexagon-randconfig-r045-20220505 (https://download.01.org/0day-ci/archive/20220506/202205060116.J42KgtCW-lkp@intel.com/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project 5e004fb787698440a387750db7f8028e7cb14cfc)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/intel-lab-lkp/linux/commit/e8e9c97eb79c337a89a98a92106cfa6139a7c9e0
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review Guoqing-Jiang/two-fixes-for-md/20220505-162202
git checkout e8e9c97eb79c337a89a98a92106cfa6139a7c9e0
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=hexagon SHELL=/bin/bash drivers/md/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
>> drivers/md/md.c:9448:3: warning: ignoring return value of function declared with 'warn_unused_result' attribute [-Wunused-result]
mddev_lock(mddev);
^~~~~~~~~~ ~~~~~
1 warning generated.
vim +/warn_unused_result +9448 drivers/md/md.c
9434
9435 void md_reap_sync_thread(struct mddev *mddev)
9436 {
9437 struct md_rdev *rdev;
9438 sector_t old_dev_sectors = mddev->dev_sectors;
9439 bool is_reshaped = false, is_locked = false;
9440
9441 if (mddev_is_locked(mddev)) {
9442 is_locked = true;
9443 mddev_unlock(mddev);
9444 }
9445 /* resync has finished, collect result */
9446 md_unregister_thread(&mddev->sync_thread);
9447 if (is_locked)
> 9448 mddev_lock(mddev);
9449
9450 if (!test_bit(MD_RECOVERY_INTR, &mddev->recovery) &&
9451 !test_bit(MD_RECOVERY_REQUESTED, &mddev->recovery) &&
9452 mddev->degraded != mddev->raid_disks) {
9453 /* success...*/
9454 /* activate any spares */
9455 if (mddev->pers->spare_active(mddev)) {
9456 sysfs_notify_dirent_safe(mddev->sysfs_degraded);
9457 set_bit(MD_SB_CHANGE_DEVS, &mddev->sb_flags);
9458 }
9459 }
9460 if (test_bit(MD_RECOVERY_RESHAPE, &mddev->recovery) &&
9461 mddev->pers->finish_reshape) {
9462 mddev->pers->finish_reshape(mddev);
9463 if (mddev_is_clustered(mddev))
9464 is_reshaped = true;
9465 }
9466
9467 /* If array is no-longer degraded, then any saved_raid_disk
9468 * information must be scrapped.
9469 */
9470 if (!mddev->degraded)
9471 rdev_for_each(rdev, mddev)
9472 rdev->saved_raid_disk = -1;
9473
9474 md_update_sb(mddev, 1);
9475 /* MD_SB_CHANGE_PENDING should be cleared by md_update_sb, so we can
9476 * call resync_finish here if MD_CLUSTER_RESYNC_LOCKED is set by
9477 * clustered raid */
9478 if (test_and_clear_bit(MD_CLUSTER_RESYNC_LOCKED, &mddev->flags))
9479 md_cluster_ops->resync_finish(mddev);
9480 clear_bit(MD_RECOVERY_RUNNING, &mddev->recovery);
9481 clear_bit(MD_RECOVERY_DONE, &mddev->recovery);
9482 clear_bit(MD_RECOVERY_SYNC, &mddev->recovery);
9483 clear_bit(MD_RECOVERY_RESHAPE, &mddev->recovery);
9484 clear_bit(MD_RECOVERY_REQUESTED, &mddev->recovery);
9485 clear_bit(MD_RECOVERY_CHECK, &mddev->recovery);
9486 /*
9487 * We call md_cluster_ops->update_size here because sync_size could
9488 * be changed by md_update_sb, and MD_RECOVERY_RESHAPE is cleared,
9489 * so it is time to update size across cluster.
9490 */
9491 if (mddev_is_clustered(mddev) && is_reshaped
9492 && !test_bit(MD_CLOSING, &mddev->flags))
9493 md_cluster_ops->update_size(mddev, old_dev_sectors);
9494 wake_up(&resync_wait);
9495 /* flag recovery needed just to double check */
9496 set_bit(MD_RECOVERY_NEEDED, &mddev->recovery);
9497 sysfs_notify_dirent_safe(mddev->sysfs_action);
9498 md_new_event();
9499 if (mddev->event_work.func)
9500 queue_work(md_misc_wq, &mddev->event_work);
9501 }
9502 EXPORT_SYMBOL(md_reap_sync_thread);
9503
--
0-DAY CI Kernel Test Service
https://01.org/lkp
next prev parent reply other threads:[~2022-05-05 18:05 UTC|newest]
Thread overview: 44+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-05 8:16 [PATCH 0/2] two fixes for md Guoqing Jiang
2022-05-05 8:16 ` [PATCH V3 1/2] md: don't unregister sync_thread with reconfig_mutex held Guoqing Jiang
2022-05-05 14:02 ` kernel test robot
2022-05-05 18:04 ` kernel test robot [this message]
2022-05-06 2:34 ` Guoqing Jiang
2022-05-05 8:16 ` [PATCH 2/2] md: protect md_unregister_thread from reentrancy Guoqing Jiang
2022-05-09 6:39 ` Song Liu
2022-05-09 8:12 ` Guoqing Jiang
2022-05-06 11:36 ` [Update PATCH V3] md: don't unregister sync_thread with reconfig_mutex held Guoqing Jiang
2022-05-09 6:37 ` Song Liu
2022-05-09 8:09 ` Guoqing Jiang
2022-05-09 9:32 ` Wols Lists
2022-05-09 10:37 ` Guoqing Jiang
2022-05-09 11:19 ` Wols Lists
2022-05-09 11:26 ` Guoqing Jiang
2022-05-10 6:44 ` Song Liu
2022-05-10 12:01 ` Donald Buczek
2022-05-10 12:09 ` Guoqing Jiang
2022-05-10 12:35 ` Donald Buczek
2022-05-10 18:02 ` Song Liu
2022-05-11 8:10 ` Guoqing Jiang
2022-05-11 21:45 ` Song Liu
2022-05-20 18:27 ` Logan Gunthorpe
2022-05-21 18:23 ` Donald Buczek
2022-05-23 1:08 ` Guoqing Jiang
2022-05-23 5:41 ` Donald Buczek
2022-05-23 9:51 ` Guoqing Jiang
2022-05-24 16:13 ` Logan Gunthorpe
2022-05-25 9:04 ` Guoqing Jiang
2022-05-25 18:22 ` Logan Gunthorpe
2022-05-26 9:46 ` Jan Kara
2022-05-26 11:53 ` Jan Kara
2022-05-31 6:11 ` Christoph Hellwig
2022-05-31 7:43 ` Jan Kara
2022-05-30 9:55 ` Guoqing Jiang
2022-05-30 16:35 ` Logan Gunthorpe
2022-05-31 8:13 ` Guoqing Jiang
2022-05-24 15:58 ` Logan Gunthorpe
2022-05-24 18:16 ` Song Liu
2022-05-25 9:17 ` Guoqing Jiang
2022-05-24 15:51 ` Logan Gunthorpe
2022-06-02 8:12 ` Xiao Ni
2022-05-09 8:18 ` Donald Buczek
2022-05-09 8:48 ` Guoqing Jiang
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=202205060116.J42KgtCW-lkp@intel.com \
--to=lkp@intel.com \
--cc=buczek@molgen.mpg.de \
--cc=guoqing.jiang@cloud.ionos.com \
--cc=guoqing.jiang@linux.dev \
--cc=kbuild-all@lists.01.org \
--cc=linux-raid@vger.kernel.org \
--cc=llvm@lists.linux.dev \
--cc=song@kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).