diff options
Diffstat (limited to 'sys/dev/softraid.c')
-rw-r--r-- | sys/dev/softraid.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/sys/dev/softraid.c b/sys/dev/softraid.c index 2f9033ea33d..06ae66287f2 100644 --- a/sys/dev/softraid.c +++ b/sys/dev/softraid.c @@ -1,4 +1,4 @@ -/* $OpenBSD: softraid.c,v 1.60 2007/05/30 16:54:07 marco Exp $ */ +/* $OpenBSD: softraid.c,v 1.61 2007/05/30 17:56:37 marco Exp $ */ /* * Copyright (c) 2007 Marco Peereboom <marco@peereboom.us> * @@ -1340,6 +1340,12 @@ sr_shutdown_discipline(struct sr_discipline *sd) DNPRINTF(SR_D_DIS, "%s: sr_shutdown_discipline %s\n", DEVNAME(sc), sd->sd_vol.sv_meta.svm_devname); + /* make sure there isn't a sync pending and yield */ + wakeup(sd); + while (tsleep(sr_shutdown_discipline, MAXPRI, "sr_down", 1 * hz) != + EWOULDBLOCK) + ; + #ifndef SMALL_KERNEL sr_delete_sensors(sd); #endif /* SMALL_KERNEL */ |