Home | History | Annotate | Line # | Download | only in raidframe
      1  1.9  christos /*	$NetBSD: rf_parityscan.h,v 1.9 2019/10/10 03:43:59 christos Exp $	*/
      2  1.1     oster /*
      3  1.1     oster  * Copyright (c) 1995 Carnegie-Mellon University.
      4  1.1     oster  * All rights reserved.
      5  1.1     oster  *
      6  1.1     oster  * Author: Mark Holland
      7  1.1     oster  *
      8  1.1     oster  * Permission to use, copy, modify and distribute this software and
      9  1.1     oster  * its documentation is hereby granted, provided that both the copyright
     10  1.1     oster  * notice and this permission notice appear in all copies of the
     11  1.1     oster  * software, derivative works or modified versions, and any portions
     12  1.1     oster  * thereof, and that both notices appear in supporting documentation.
     13  1.1     oster  *
     14  1.1     oster  * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
     15  1.1     oster  * CONDITION.  CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND
     16  1.1     oster  * FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
     17  1.1     oster  *
     18  1.1     oster  * Carnegie Mellon requests users of this software to return to
     19  1.1     oster  *
     20  1.1     oster  *  Software Distribution Coordinator  or  Software.Distribution (at) CS.CMU.EDU
     21  1.1     oster  *  School of Computer Science
     22  1.1     oster  *  Carnegie Mellon University
     23  1.1     oster  *  Pittsburgh PA 15213-3890
     24  1.1     oster  *
     25  1.1     oster  * any improvements or extensions that they make and grant Carnegie the
     26  1.1     oster  * rights to redistribute these changes.
     27  1.1     oster  */
     28  1.1     oster 
     29  1.1     oster #ifndef _RF__RF_PARITYSCAN_H_
     30  1.1     oster #define _RF__RF_PARITYSCAN_H_
     31  1.1     oster 
     32  1.4     oster #include <dev/raidframe/raidframevar.h>
     33  1.4     oster 
     34  1.1     oster #include "rf_alloclist.h"
     35  1.1     oster 
     36  1.6  christos int     rf_RewriteParity(RF_Raid_t *);
     37  1.8       jld int	rf_RewriteParityRange(RF_Raid_t *, RF_SectorNum_t, RF_SectorNum_t);
     38  1.6  christos int 	rf_VerifyParityBasic(RF_Raid_t *, RF_RaidAddr_t, RF_PhysDiskAddr_t *,
     39  1.6  christos     int, RF_RaidAccessFlags_t);
     40  1.6  christos int	rf_VerifyParity(RF_Raid_t *, RF_AccessStripeMap_t *, int,
     41  1.6  christos     RF_RaidAccessFlags_t);
     42  1.6  christos int     rf_TryToRedirectPDA(RF_Raid_t *, RF_PhysDiskAddr_t *, int);
     43  1.6  christos int     rf_VerifyDegrModeWrite(RF_Raid_t *, RF_AccessStripeMapHeader_t *);
     44  1.6  christos RF_DagHeader_t *rf_MakeSimpleDAG(RF_Raid_t *, int, int, char *,
     45  1.9  christos     void (*)(RF_DagNode_t *), void (*) (RF_DagNode_t *), const char *,
     46  1.6  christos     RF_AllocListElem_t *, RF_RaidAccessFlags_t, int);
     47  1.1     oster 
     48  1.1     oster #define RF_DO_CORRECT_PARITY   1
     49  1.1     oster #define RF_DONT_CORRECT_PARITY 0
     50  1.1     oster 
     51  1.1     oster /*
     52  1.1     oster  * Return vals for VerifyParity operation
     53  1.1     oster  *
     54  1.1     oster  * Ordering is important here.
     55  1.1     oster  */
     56  1.3     oster #define RF_PARITY_OKAY               0	/* or no parity information */
     57  1.1     oster #define RF_PARITY_CORRECTED          1
     58  1.1     oster #define RF_PARITY_BAD                2
     59  1.1     oster #define RF_PARITY_COULD_NOT_CORRECT  3
     60  1.1     oster #define RF_PARITY_COULD_NOT_VERIFY   4
     61  1.1     oster 
     62  1.3     oster #endif				/* !_RF__RF_PARITYSCAN_H_ */
     63