diff options
author | Joel Sing <jsing@cvs.openbsd.org> | 2009-07-12 16:33:03 +0000 |
---|---|---|
committer | Joel Sing <jsing@cvs.openbsd.org> | 2009-07-12 16:33:03 +0000 |
commit | b4182da2876368cc5b49a2de90050d42eec9e4d0 (patch) | |
tree | 5f28b7698492e580c434217b37d9386c55619531 /sys/dev/softraid_raid1.c | |
parent | ea7d21641acb9c641831d585abc52e9d8cccaf5f (diff) |
Enable hotspare rebuilds for softraid RAID1.
ok marco@
Diffstat (limited to 'sys/dev/softraid_raid1.c')
-rw-r--r-- | sys/dev/softraid_raid1.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/dev/softraid_raid1.c b/sys/dev/softraid_raid1.c index 57227846341..bff4ba141b8 100644 --- a/sys/dev/softraid_raid1.c +++ b/sys/dev/softraid_raid1.c @@ -1,4 +1,4 @@ -/* $OpenBSD: softraid_raid1.c,v 1.16 2009/06/24 12:06:00 jsing Exp $ */ +/* $OpenBSD: softraid_raid1.c,v 1.17 2009/07/12 16:33:02 jsing Exp $ */ /* * Copyright (c) 2007 Marco Peereboom <marco@peereboom.us> * @@ -323,6 +323,10 @@ die: } sd->sd_vol_status = new_state; + + /* If we have just become degraded, look for a hotspare. */ + if (new_state == BIOC_SVDEGRADED) + workq_add_task(NULL, 0, sr_hotspare_rebuild_callback, sd, NULL); } int |