Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/raidframe Need to splbio()/splx() protect some of th...



details:   https://anonhg.NetBSD.org/src/rev/c30a8b727506
branches:  trunk
changeset: 474794:c30a8b727506
user:      oster <oster%NetBSD.org@localhost>
date:      Wed Jul 21 03:15:26 1999 +0000

description:
Need to splbio()/splx() protect some of the reconstruction stuff.
Without this, we have potentially bad interatctions with the pool
code.

diffstat:

 sys/dev/raidframe/rf_netbsdkintf.c |  7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diffs (38 lines):

diff -r 8ee819e9932e -r c30a8b727506 sys/dev/raidframe/rf_netbsdkintf.c
--- a/sys/dev/raidframe/rf_netbsdkintf.c        Wed Jul 21 02:02:27 1999 +0000
+++ b/sys/dev/raidframe/rf_netbsdkintf.c        Wed Jul 21 03:15:26 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: rf_netbsdkintf.c,v 1.20 1999/07/08 00:45:23 oster Exp $        */
+/*     $NetBSD: rf_netbsdkintf.c,v 1.21 1999/07/21 03:15:26 oster Exp $        */
 /*-
  * Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -683,6 +683,7 @@
        int retcode = 0;
        int row;
        int column;
+       int s;
        struct rf_recon_req *rrcopy, *rr;
        RF_ComponentLabel_t *component_label;
        RF_ComponentLabel_t ci_label;
@@ -1024,8 +1025,10 @@
                        return(EINVAL);
                }
                printf("Attempting a rebuild in place\n");
+               s = splbio();
                raidPtrs[unit]->proc = p;       /* Blah... :-p GO */
                retcode = rf_ReconstructInPlace(raidPtrs[unit], row, column);
+               splx(s);
                return(retcode);
 
                /* issue a test-unit-ready through raidframe to the indicated
@@ -1148,7 +1151,9 @@
        case RAIDFRAME_COPYBACK:
                /* borrow the current thread to get this done */
                raidPtrs[unit]->proc = p;       /* ICK.. but needed :-p  GO */
+               s = splbio();
                rf_CopybackReconstructedData(raidPtrs[unit]);
+               splx(s);
                return (0);
 
                /* return the percentage completion of reconstruction */



Home | Main Index | Thread Index | Old Index