From: "Yu Kuai" <yukuai@fnnas.com>
To: "Tarun Sahu" <tarunsahu@google.com>, <linux-raid@vger.kernel.org>,
<linux-scsi@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
<song@kernel.org>, "Yu Kuai" <yukuai@fnnas.com>
Cc: <berrange@redhat.com>, <neil@brown.name>, <hch@lst.de>,
<pasha.tatashin@soleen.com>, <mclapinski@google.com>,
<khazhy@google.com>
Subject: Re: [RFC PATCH v2] md: remove legacy 1s delay in md_notify_reboot
Date: Sun, 30 Nov 2025 09:58:04 +0800 [thread overview]
Message-ID: <a5066e6e-40ec-4c58-a60d-55510191bf27@fnnas.com> (raw)
In-Reply-To: <20251121191422.2758555-1-tarunsahu@google.com>
在 2025/11/22 3:14, Tarun Sahu 写道:
> During system shutdown, the md driver registered notifier function
> (md_notify_reboot) currently imposes a hardcoded one-second delay.
>
> This delay was introduced approximately 23 years ago and was likely
> necessary for the hardware generation of that time. Proposing this
> patch to make sure there are no known devices that need this delay.
>
> Signed-off-by: Tarun Sahu <tarunsahu@google.com>
> ---
> v2:
> Added linux-scsi mailing list
>
> drivers/md/md.c | 11 -----------
> 1 file changed, 11 deletions(-)
>
> diff --git a/drivers/md/md.c b/drivers/md/md.c
> index b086cbf24086..66c4d66b4b86 100644
> --- a/drivers/md/md.c
> +++ b/drivers/md/md.c
> @@ -9704,7 +9704,6 @@ static int md_notify_reboot(struct notifier_block *this,
> unsigned long code, void *x)
> {
> struct mddev *mddev;
> - int need_delay = 0;
>
> spin_lock(&all_mddevs_lock);
> list_for_each_entry(mddev, &all_mddevs, all_mddevs) {
> @@ -9718,21 +9717,11 @@ static int md_notify_reboot(struct notifier_block *this,
> mddev->safemode = 2;
> mddev_unlock(mddev);
> }
> - need_delay = 1;
> spin_lock(&all_mddevs_lock);
> mddev_put_locked(mddev);
> }
> spin_unlock(&all_mddevs_lock);
>
> - /*
> - * certain more exotic SCSI devices are known to be
> - * volatile wrt too early system reboots. While the
> - * right place to handle this issue is the given
> - * driver, we do want to have a safe RAID driver ...
> - */
> - if (need_delay)
> - msleep(1000);
> -
> return NOTIFY_DONE;
> }
>
Applied to md-6.19
--
Thanks,
Kuai
next prev parent reply other threads:[~2025-11-30 1:58 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-21 19:14 Tarun Sahu
2025-11-23 2:52 ` Yu Kuai
2025-11-30 1:58 ` Yu Kuai [this message]
2025-12-01 17:28 ` Pasha Tatashin
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=a5066e6e-40ec-4c58-a60d-55510191bf27@fnnas.com \
--to=yukuai@fnnas.com \
--cc=berrange@redhat.com \
--cc=hch@lst.de \
--cc=khazhy@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-raid@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=mclapinski@google.com \
--cc=neil@brown.name \
--cc=pasha.tatashin@soleen.com \
--cc=song@kernel.org \
--cc=tarunsahu@google.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
all inboxes | Powered by JetHome®