Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/raidframe more faithful to the original (from coypu)



details:   https://anonhg.NetBSD.org/src/rev/2d9b8feefe55
branches:  trunk
changeset: 820673:2d9b8feefe55
user:      christos <christos%NetBSD.org@localhost>
date:      Fri Jan 13 13:01:13 2017 +0000

description:
more faithful to the original (from coypu)

diffstat:

 sys/dev/raidframe/rf_disks.c |  17 ++++++++++-------
 1 files changed, 10 insertions(+), 7 deletions(-)

diffs (59 lines):

diff -r db0b3515eb09 -r 2d9b8feefe55 sys/dev/raidframe/rf_disks.c
--- a/sys/dev/raidframe/rf_disks.c      Fri Jan 13 11:21:47 2017 +0000
+++ b/sys/dev/raidframe/rf_disks.c      Fri Jan 13 13:01:13 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: rf_disks.c,v 1.88 2017/01/13 04:22:16 christos Exp $   */
+/*     $NetBSD: rf_disks.c,v 1.89 2017/01/13 13:01:13 christos Exp $   */
 /*-
  * Copyright (c) 1999 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -60,7 +60,7 @@
  ***************************************************************/
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rf_disks.c,v 1.88 2017/01/13 04:22:16 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rf_disks.c,v 1.89 2017/01/13 13:01:13 christos Exp $");
 
 #include <dev/raidframe/raidframevar.h>
 
@@ -701,16 +701,17 @@
 
 
 static void
-rf_handle_hosed(RF_Raid_t *raidPtr, RF_Config_t *cfgPtr, int hosed_column)
+rf_handle_hosed(RF_Raid_t *raidPtr, RF_Config_t *cfgPtr, int hosed_column,
+    int again)
 {
        printf("Hosed component: %s\n", &cfgPtr->devnames[0][hosed_column][0]);
        if (!cfgPtr->force)
                return;
 
        /* we'll fail this component, as if there are
-          other major errors, we arn't forcing things
+          other major errors, we aren't forcing things
           and we'll abort the config anyways */
-       if (raidPtr->Disks[hosed_column].status == rf_ds_failed)
+       if (again && raidPtr->Disks[hosed_column].status == rf_ds_failed)
                return;
 
        raidPtr->Disks[hosed_column].status = rf_ds_failed;
@@ -840,7 +841,8 @@
                                }
                        }
                        if (hosed_column != -1)
-                               rf_handle_hosed(raidPtr, cfgPtr, hosed_column);
+                               rf_handle_hosed(raidPtr, cfgPtr, hosed_column,
+                                   0);
                } else {
                        too_fatal = 1;
                }
@@ -897,7 +899,8 @@
                                }
                        }
                        if (hosed_column != -1)
-                               rf_handle_hosed(raidPtr, cfgPtr, hosed_column);
+                               rf_handle_hosed(raidPtr, cfgPtr, hosed_column,
+                                   1);
                } else {
                        too_fatal = 1;
                }



Home | Main Index | Thread Index | Old Index