The Design and Implementation of the FreeBSD Operating System, Second Edition
Now available: The Design and Implementation of the FreeBSD Operating System (Second Edition)


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]

FreeBSD/Linux Kernel Cross Reference
sys/dev/raidframe/rf_evenodd_dagfuncs.h

Version: -  FREEBSD  -  FREEBSD-13-STABLE  -  FREEBSD-13-0  -  FREEBSD-12-STABLE  -  FREEBSD-12-0  -  FREEBSD-11-STABLE  -  FREEBSD-11-0  -  FREEBSD-10-STABLE  -  FREEBSD-10-0  -  FREEBSD-9-STABLE  -  FREEBSD-9-0  -  FREEBSD-8-STABLE  -  FREEBSD-8-0  -  FREEBSD-7-STABLE  -  FREEBSD-7-0  -  FREEBSD-6-STABLE  -  FREEBSD-6-0  -  FREEBSD-5-STABLE  -  FREEBSD-5-0  -  FREEBSD-4-STABLE  -  FREEBSD-3-STABLE  -  FREEBSD22  -  l41  -  OPENBSD  -  linux-2.6  -  MK84  -  PLAN9  -  xnu-8792 
SearchContext: -  none  -  3  -  10 

    1 /*      $NetBSD: rf_evenodd_dagfuncs.h,v 1.3 2003/02/05 00:02:38 perry Exp $    */
    2 /*
    3  * rf_evenodd_dagfuncs.h
    4  */
    5 /*
    6  * Copyright (c) 1996 Carnegie-Mellon University.
    7  * All rights reserved.
    8  *
    9  * Author: Chang-Ming Wu
   10  *
   11  * Permission to use, copy, modify and distribute this software and
   12  * its documentation is hereby granted, provided that both the copyright
   13  * notice and this permission notice appear in all copies of the
   14  * software, derivative works or modified versions, and any portions
   15  * thereof, and that both notices appear in supporting documentation.
   16  *
   17  * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
   18  * CONDITION.  CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND
   19  * FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
   20  *
   21  * Carnegie Mellon requests users of this software to return to
   22  *
   23  *  Software Distribution Coordinator  or  Software.Distribution@CS.CMU.EDU
   24  *  School of Computer Science
   25  *  Carnegie Mellon University
   26  *  Pittsburgh PA 15213-3890
   27  *
   28  * any improvements or extensions that they make and grant Carnegie the
   29  * rights to redistribute these changes.
   30  */
   31 
   32 #ifndef _RF__RF_EVENODD_DAGFUNCS_H_
   33 #define _RF__RF_EVENODD_DAGFUNCS_H_
   34 
   35 extern RF_RedFuncs_t rf_EOSmallWriteEFuncs;
   36 extern RF_RedFuncs_t rf_EOSmallWritePFuncs;
   37 extern RF_RedFuncs_t rf_eoERecoveryFuncs;
   38 extern RF_RedFuncs_t rf_eoPRecoveryFuncs;
   39 extern RF_RedFuncs_t rf_eoERecoveryFuncs;
   40 
   41 int     rf_RegularPEFunc(RF_DagNode_t * node);
   42 int     rf_RegularONEFunc(RF_DagNode_t * node);
   43 int     rf_SimpleONEFunc(RF_DagNode_t * node);
   44 void    rf_RegularESubroutine(RF_DagNode_t * node, char *ebuf);
   45 int     rf_RegularEFunc(RF_DagNode_t * node);
   46 void    rf_DegrESubroutine(RF_DagNode_t * node, char *ebuf);
   47 int     rf_Degraded_100_EOFunc(RF_DagNode_t * node);
   48 void 
   49 rf_e_EncOneSect(RF_RowCol_t srcLogicCol, char *srcSecbuf,
   50     RF_RowCol_t destLogicCol, char *destSecbuf, int bytesPerSector);
   51 void 
   52 rf_e_encToBuf(RF_Raid_t * raidPtr, RF_RowCol_t srcLogicCol,
   53     char *srcbuf, RF_RowCol_t destLogicCol, char *destbuf, int numSector);
   54 int     rf_RecoveryEFunc(RF_DagNode_t * node);
   55 int     rf_EO_DegradedWriteEFunc(RF_DagNode_t * node);
   56 void 
   57 rf_doubleEOdecode(RF_Raid_t * raidPtr, char **rrdbuf, char **dest,
   58     RF_RowCol_t * fcol, char *pbuf, char *ebuf);
   59 int     rf_EvenOddDoubleRecoveryFunc(RF_DagNode_t * node);
   60 int     rf_EOWriteDoubleRecoveryFunc(RF_DagNode_t * node);
   61 
   62 #define rf_EUCol(_layoutPtr_, _addr_ ) \
   63 ( (_addr_)%( (_layoutPtr_)->dataSectorsPerStripe ) )/((_layoutPtr_)->sectorsPerStripeUnit)
   64 
   65 #define rf_EO_Mod( _int1_, _int2_ ) \
   66 ( ((_int1_) < 0)? (((_int1_)+(_int2_))%(_int2_)) : (_int1_)%(_int2_) )
   67 
   68 #define rf_OffsetOfNextEUBoundary(_offset_, sec_per_eu) ((_offset_)/(sec_per_eu) + 1)*(sec_per_eu)
   69 
   70 #define RF_EO_MATRIX_DIM 17
   71 
   72 /*
   73  * RF_EO_MATRIX_DIM should be a prime number: and "bytesPerSector" should be
   74  * dividable by ( RF_EO_MATRIX_DIM - 1) to fully encode and use the space
   75  * in a sector, this number could also be 17. Tha later case doesn't apply
   76  * for disk array larger than 17 columns totally.
   77  */
   78 
   79 #endif                          /* !_RF__RF_EVENODD_DAGFUNCS_H_ */

Cache object: d5b19f4f1538f1cb32bb65c141c47451


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]


This page is part of the FreeBSD/Linux Linux Kernel Cross-Reference, and was automatically generated using a modified version of the LXR engine.