Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/raidframe Disallow 'reconstruct-in-place' on a compo...
details: https://anonhg.NetBSD.org/src/rev/2e8df1445093
branches: trunk
changeset: 536137:2e8df1445093
user: oster <oster%NetBSD.org@localhost>
date: Mon Sep 09 02:44:17 2002 +0000
description:
Disallow 'reconstruct-in-place' on a component that has failed
and has already been reconstructed to a hot spare.
diffstat:
sys/dev/raidframe/rf_reconstruct.c | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
diffs (29 lines):
diff -r 633555710b4b -r 2e8df1445093 sys/dev/raidframe/rf_reconstruct.c
--- a/sys/dev/raidframe/rf_reconstruct.c Mon Sep 09 02:36:11 2002 +0000
+++ b/sys/dev/raidframe/rf_reconstruct.c Mon Sep 09 02:44:17 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: rf_reconstruct.c,v 1.34 2002/07/13 20:54:57 oster Exp $ */
+/* $NetBSD: rf_reconstruct.c,v 1.35 2002/09/09 02:44:17 oster Exp $ */
/*
* Copyright (c) 1995 Carnegie-Mellon University.
* All rights reserved.
@@ -33,7 +33,7 @@
************************************************************/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rf_reconstruct.c,v 1.34 2002/07/13 20:54:57 oster Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rf_reconstruct.c,v 1.35 2002/09/09 02:44:17 oster Exp $");
#include <sys/time.h>
#include <sys/buf.h>
@@ -454,7 +454,9 @@
RF_UNLOCK_MUTEX(raidPtr->mutex);
return (EINVAL);
}
-
+ if (raidPtr->Disks[row][col].status == rf_ds_spared) {
+ return (EINVAL);
+ }
if (raidPtr->Disks[row][col].status != rf_ds_failed) {
/* "It's gone..." */
Home |
Main Index |
Thread Index |
Old Index