Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/raidframe Make sure we close auto-configured compone...
details: https://anonhg.NetBSD.org/src/rev/0e387f953f54
branches: trunk
changeset: 482867:0e387f953f54
user: oster <oster%NetBSD.org@localhost>
date: Thu Feb 24 04:39:41 2000 +0000
description:
Make sure we close auto-configured components appropriately when
attempting a rebuild-in-place.
diffstat:
sys/dev/raidframe/rf_reconstruct.c | 13 ++++++++++---
1 files changed, 10 insertions(+), 3 deletions(-)
diffs (28 lines):
diff -r a9bf86ba62f2 -r 0e387f953f54 sys/dev/raidframe/rf_reconstruct.c
--- a/sys/dev/raidframe/rf_reconstruct.c Thu Feb 24 03:52:15 2000 +0000
+++ b/sys/dev/raidframe/rf_reconstruct.c Thu Feb 24 04:39:41 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: rf_reconstruct.c,v 1.17 2000/02/23 03:44:03 oster Exp $ */
+/* $NetBSD: rf_reconstruct.c,v 1.18 2000/02/24 04:39:41 oster Exp $ */
/*
* Copyright (c) 1995 Carnegie-Mellon University.
* All rights reserved.
@@ -477,9 +477,16 @@
if (raidPtr->raid_cinfo[row][col].ci_vp != NULL) {
printf("Closed the open device: %s\n",
raidPtr->Disks[row][col].devname);
- VOP_UNLOCK(raidPtr->raid_cinfo[row][col].ci_vp, 0);
- (void) vn_close(raidPtr->raid_cinfo[row][col].ci_vp,
+ if (raidPtr->Disks[row][col].auto_configured == 1) {
+ VOP_CLOSE(raidPtr->raid_cinfo[row][col].ci_vp,
+ FREAD, NOCRED, 0);
+ vput(raidPtr->raid_cinfo[row][col].ci_vp);
+
+ } else {
+ VOP_UNLOCK(raidPtr->raid_cinfo[row][col].ci_vp, 0);
+ (void) vn_close(raidPtr->raid_cinfo[row][col].ci_vp,
FREAD | FWRITE, proc->p_ucred, proc);
+ }
raidPtr->raid_cinfo[row][col].ci_vp = NULL;
}
printf("About to (re-)open the device for rebuilding: %s\n",
Home |
Main Index |
Thread Index |
Old Index