Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/raidframe In RAIDFRAME_CONFIGURE, don't set values i...



details:   https://anonhg.NetBSD.org/src/rev/54bb3d882725
branches:  trunk
changeset: 480246:54bb3d882725
user:      oster <oster%NetBSD.org@localhost>
date:      Fri Jan 07 13:57:20 2000 +0000

description:
In RAIDFRAME_CONFIGURE, don't set values in raidPtrs[unit] unless
the configuration was successful.  Noted by Peter Galbavy of OpenBSD.

diffstat:

 sys/dev/raidframe/rf_netbsdkintf.c |  20 +++++++++++---------
 1 files changed, 11 insertions(+), 9 deletions(-)

diffs (36 lines):

diff -r 0834f943c199 -r 54bb3d882725 sys/dev/raidframe/rf_netbsdkintf.c
--- a/sys/dev/raidframe/rf_netbsdkintf.c        Fri Jan 07 13:43:02 2000 +0000
+++ b/sys/dev/raidframe/rf_netbsdkintf.c        Fri Jan 07 13:57:20 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: rf_netbsdkintf.c,v 1.39 2000/01/06 02:06:41 oster Exp $        */
+/*     $NetBSD: rf_netbsdkintf.c,v 1.40 2000/01/07 13:57:20 oster Exp $        */
 /*-
  * Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -783,16 +783,18 @@
 
                retcode = rf_Configure(raidPtrs[unit], k_cfg);
 
-               /* allow this many simultaneous IO's to this RAID device */
-               raidPtrs[unit]->openings = RAIDOUTSTANDING;
-
-               /* XXX should be moved to rf_Configure() */
+               if (retcode == 0) {
 
-               raidPtrs[unit]->copyback_in_progress = 0;
-               raidPtrs[unit]->parity_rewrite_in_progress = 0;
-               raidPtrs[unit]->recon_in_progress = 0;
+                       /* allow this many simultaneous IO's to 
+                          this RAID device */
+                       raidPtrs[unit]->openings = RAIDOUTSTANDING;
+                       
+                       /* XXX should be moved to rf_Configure() */
+
+                       raidPtrs[unit]->copyback_in_progress = 0;
+                       raidPtrs[unit]->parity_rewrite_in_progress = 0;
+                       raidPtrs[unit]->recon_in_progress = 0;
                
-               if (retcode == 0) {
                        retcode = raidinit(dev, raidPtrs[unit], unit);
                        rf_markalldirty( raidPtrs[unit] );
                }



Home | Main Index | Thread Index | Old Index