Skip to content

Commit fdd0c6a

Browse files
tar-unixhailan94
authored andcommitted
md: remove legacy 1s delay in md_notify_reboot
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. Link: https://lore.kernel.org/linux-raid/20251121191422.2758555-1-tarunsahu@google.com Signed-off-by: Tarun Sahu <tarunsahu@google.com> Reviewed-by: Yu Kuai<yukuai@fnnas.com> Signed-off-by: Yu Kuai <yukuai@fnnas.com>
1 parent a913d1f commit fdd0c6a

1 file changed

Lines changed: 0 additions & 11 deletions

File tree

drivers/md/md.c

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10408,7 +10408,6 @@ static int md_notify_reboot(struct notifier_block *this,
1040810408
unsigned long code, void *x)
1040910409
{
1041010410
struct mddev *mddev;
10411-
int need_delay = 0;
1041210411

1041310412
spin_lock(&all_mddevs_lock);
1041410413
list_for_each_entry(mddev, &all_mddevs, all_mddevs) {
@@ -10422,21 +10421,11 @@ static int md_notify_reboot(struct notifier_block *this,
1042210421
mddev->safemode = 2;
1042310422
mddev_unlock(mddev);
1042410423
}
10425-
need_delay = 1;
1042610424
spin_lock(&all_mddevs_lock);
1042710425
mddev_put_locked(mddev);
1042810426
}
1042910427
spin_unlock(&all_mddevs_lock);
1043010428

10431-
/*
10432-
* certain more exotic SCSI devices are known to be
10433-
* volatile wrt too early system reboots. While the
10434-
* right place to handle this issue is the given
10435-
* driver, we do want to have a safe RAID driver ...
10436-
*/
10437-
if (need_delay)
10438-
msleep(1000);
10439-
1044010429
return NOTIFY_DONE;
1044110430
}
1044210431

0 commit comments

Comments
 (0)