diff options
Diffstat (limited to 'sys/dev/raidframe')
| -rw-r--r-- | sys/dev/raidframe/rf_netbsdkintf.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/sys/dev/raidframe/rf_netbsdkintf.c b/sys/dev/raidframe/rf_netbsdkintf.c index a33a6f17bf7..5490b8a6ec5 100644 --- a/sys/dev/raidframe/rf_netbsdkintf.c +++ b/sys/dev/raidframe/rf_netbsdkintf.c @@ -1,4 +1,4 @@ -/* $NetBSD: rf_netbsdkintf.c,v 1.184 2004/11/16 16:52:30 oster Exp $ */ +/* $NetBSD: rf_netbsdkintf.c,v 1.185 2004/11/17 01:34:10 oster Exp $ */ /*- * Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc. * All rights reserved. @@ -146,7 +146,7 @@ ***********************************************************/ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: rf_netbsdkintf.c,v 1.184 2004/11/16 16:52:30 oster Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rf_netbsdkintf.c,v 1.185 2004/11/17 01:34:10 oster Exp $"); #include <sys/param.h> #include <sys/errno.h> @@ -1285,6 +1285,12 @@ raidioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct proc *p) RF_LOCK_MUTEX(raidPtr->mutex); + if (raidPtr->status == rf_rs_reconstructing) { + /* you can't fail a disk while we're reconstructing! */ + /* XXX wrong for RAID6 */ + RF_UNLOCK_MUTEX(raidPtr->mutex); + return (EINVAL); + } if ((raidPtr->Disks[rr->col].status == rf_ds_optimal) && (raidPtr->numFailures > 0)) { /* some other component has failed. Let's not make |
