Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 269246
b: refs/heads/master
c: 2dba6a9
h: refs/heads/master
v: v3
  • Loading branch information
Daniel P. Berrange authored and NeilBrown committed Sep 23, 2011
1 parent 943d369 commit 3eabe3e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 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: 7e841526263b3e0042a423513147dfd06c8e998d
refs/heads/master: 2dba6a911c284603d2085fec1e2d3c142f58a010
8 changes: 6 additions & 2 deletions trunk/drivers/md/md.c
Original file line number Diff line number Diff line change
Expand Up @@ -8075,12 +8075,13 @@ static int md_notify_reboot(struct notifier_block *this,
{
struct list_head *tmp;
mddev_t *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)
for_each_mddev(mddev, tmp) {
if (mddev_trylock(mddev)) {
/* Force a switch to readonly even array
* appears to still be in use. Hence
Expand All @@ -8089,13 +8090,16 @@ static int md_notify_reboot(struct notifier_block *this,
md_set_readonly(mddev, 100);
mddev_unlock(mddev);
}
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 ...
*/
mdelay(1000*1);
if (need_delay)
mdelay(1000*1);
}
return NOTIFY_DONE;
}
Expand Down

0 comments on commit 3eabe3e

Please sign in to comment.