1 /* $NetBSD: rf_map.h,v 1.12 2005/12/11 12:23:37 christos Exp $ */
3 * Copyright (c) 1995 Carnegie-Mellon University.
8 * Permission to use, copy, modify and distribute this software and
9 * its documentation is hereby granted, provided that both the copyright
10 * notice and this permission notice appear in all copies of the
11 * software, derivative works or modified versions, and any portions
12 * thereof, and that both notices appear in supporting documentation.
14 * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
15 * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND
16 * FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
18 * Carnegie Mellon requests users of this software to return to
20 * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
21 * School of Computer Science
22 * Carnegie Mellon University
23 * Pittsburgh PA 15213-3890
25 * any improvements or extensions that they make and grant Carnegie the
26 * rights to redistribute these changes.
31 #ifndef _RF__RF_MAP_H_
32 #define _RF__RF_MAP_H_
34 #include <dev/raidframe/raidframevar.h>
36 #include "rf_alloclist.h"
39 /* mapping structure allocation and free routines */
40 RF_AccessStripeMapHeader_t
*rf_MapAccess(RF_Raid_t
*, RF_RaidAddr_t
,
41 RF_SectorCount_t
, void *, int);
42 void rf_MarkFailuresInASMList(RF_Raid_t
*, RF_AccessStripeMapHeader_t
*);
43 int rf_ConfigureMapModule(RF_ShutdownList_t
**);
44 RF_AccessStripeMapHeader_t
*rf_AllocAccessStripeMapHeader(void);
45 void rf_FreeAccessStripeMapHeader(RF_AccessStripeMapHeader_t
*);
46 RF_PhysDiskAddr_t
*rf_AllocPhysDiskAddr(void);
47 RF_PhysDiskAddr_t
*rf_AllocPDAList(int);
48 void rf_FreePhysDiskAddr(RF_PhysDiskAddr_t
*);
49 RF_AccessStripeMap_t
*rf_AllocASMList(int);
50 void rf_FreeAccessStripeMap(RF_AccessStripeMapHeader_t
*);
51 int rf_CheckStripeForFailures(RF_Raid_t
*, RF_AccessStripeMap_t
*);
52 int rf_NumFailedDataUnitsInStripe(RF_Raid_t
*, RF_AccessStripeMap_t
*);
53 void rf_PrintAccessStripeMap(RF_AccessStripeMapHeader_t
*);
54 void rf_PrintFullAccessStripeMap(RF_AccessStripeMapHeader_t
*, int);
55 void rf_PrintRaidAddressInfo(RF_Raid_t
*, RF_RaidAddr_t
, RF_SectorCount_t
);
56 void rf_ASMParityAdjust(RF_PhysDiskAddr_t
*, RF_StripeNum_t
, RF_SectorNum_t
,
57 RF_RaidLayout_t
*, RF_AccessStripeMap_t
*);
58 void rf_ASMCheckStatus(RF_Raid_t
*, RF_PhysDiskAddr_t
*, RF_AccessStripeMap_t
*,
59 RF_RaidDisk_t
*, int);
61 RF_VoidFunctionPointerListElem_t
*rf_AllocVFPListElem(void);
62 void rf_FreeVFPListElem(RF_VoidFunctionPointerListElem_t
*);
63 RF_VoidPointerListElem_t
*rf_AllocVPListElem(void);
64 void rf_FreeVPListElem(RF_VoidPointerListElem_t
*);
65 RF_ASMHeaderListElem_t
*rf_AllocASMHeaderListElem(void);
66 void rf_FreeASMHeaderListElem(RF_ASMHeaderListElem_t
*);
67 RF_FailedStripe_t
*rf_AllocFailedStripeStruct(void);
68 void rf_FreeFailedStripeStruct(RF_FailedStripe_t
*);
70 #endif /* !_RF__RF_MAP_H_ */