]> git.baikalelectronics.ru Git - kernel.git/commit
md: don't delay reboot by 1 second if no MD devices exist
authorDaniel P. Berrange <berrange@redhat.com>
Fri, 23 Sep 2011 09:40:45 +0000 (10:40 +0100)
committerNeilBrown <neilb@suse.de>
Fri, 23 Sep 2011 09:54:04 +0000 (19:54 +1000)
commitfd1eb3e1f60f64ea3e1718851f81c616fa476d31
tree8db93ad2131afd519b9d618f12841ec5d981c082
parentd0a717695fcd1688f41633cb1bb51acf805e29ad
md: don't delay reboot by 1 second if no MD devices exist

The md_notify_reboot() method includes a call to mdelay(1000),
to deal with "exotic SCSI devices" which are too volatile on
reboot. The delay is unconditional. Even if the machine does
not have any block devices, let alone MD devices, the kernel
shutdown sequence is slowed down.

1 second does not matter much with physical hardware, but with
certain virtualization use cases any wasted time in the bootup
& shutdown sequence counts for alot.

* drivers/md/md.c: md_notify_reboot() - only impose a delay if
  there was at least one MD device to be stopped during reboot

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
Signed-off-by: NeilBrown <neilb@suse.de>
drivers/md/md.c