Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 292791
b: refs/heads/master
c: c744a65
h: refs/heads/master
i:
  292789: 6937762
  292787: c237f29
  292783: 9b0a029
v: v3
  • Loading branch information
NeilBrown committed Mar 19, 2012
1 parent da53d1c commit 94bf4e0
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 23 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: dc10c643e8a8d008fd16dd6706e9e0018eadf8d2
refs/heads/master: c744a65c1e2d59acc54333ce80a5b0702a98010b
37 changes: 15 additions & 22 deletions trunk/drivers/md/md.c
Original file line number Diff line number Diff line change
Expand Up @@ -8157,30 +8157,23 @@ static int md_notify_reboot(struct notifier_block *this,
struct mddev *mddev;
int need_delay = 0;

if ((code == SYS_DOWN) || (code == SYS_HALT) || (code == SYS_POWER_OFF)) {

printk(KERN_INFO "md: stopping all md devices.\n");

for_each_mddev(mddev, tmp) {
if (mddev_trylock(mddev)) {
/* Force a switch to readonly even array
* appears to still be in use. Hence
* the '100'.
*/
md_set_readonly(mddev, 100);
mddev_unlock(mddev);
}
need_delay = 1;
for_each_mddev(mddev, tmp) {
if (mddev_trylock(mddev)) {
__md_stop_writes(mddev);
mddev->safemode = 2;
mddev_unlock(mddev);
}
/*
* 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)
mdelay(1000*1);
need_delay = 1;
}
/*
* 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)
mdelay(1000*1);

return NOTIFY_DONE;
}

Expand Down

0 comments on commit 94bf4e0

Please sign in to comment.