1 1.14 oster /* $NetBSD: rf_map.h,v 1.14 2021/07/23 00:54:45 oster 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 /* rf_map.h */ 30 1.1 oster 31 1.1 oster #ifndef _RF__RF_MAP_H_ 32 1.1 oster #define _RF__RF_MAP_H_ 33 1.1 oster 34 1.4 oster #include <dev/raidframe/raidframevar.h> 35 1.4 oster 36 1.1 oster #include "rf_alloclist.h" 37 1.1 oster #include "rf_raid.h" 38 1.1 oster 39 1.1 oster /* mapping structure allocation and free routines */ 40 1.9 oster RF_AccessStripeMapHeader_t *rf_MapAccess(RF_Raid_t *, RF_RaidAddr_t, 41 1.13 christos RF_SectorCount_t, void *, int); 42 1.9 oster void rf_MarkFailuresInASMList(RF_Raid_t *, RF_AccessStripeMapHeader_t *); 43 1.14 oster int rf_ConfigureMapModule(RF_ShutdownList_t **, RF_Raid_t *, RF_Config_t *); 44 1.14 oster RF_AccessStripeMapHeader_t *rf_AllocAccessStripeMapHeader(RF_Raid_t *); 45 1.14 oster void rf_FreeAccessStripeMapHeader(RF_Raid_t *, RF_AccessStripeMapHeader_t *); 46 1.14 oster RF_PhysDiskAddr_t *rf_AllocPhysDiskAddr(RF_Raid_t *); 47 1.14 oster RF_PhysDiskAddr_t *rf_AllocPDAList(RF_Raid_t *, int); 48 1.14 oster void rf_FreePhysDiskAddr(RF_Raid_t *, RF_PhysDiskAddr_t *); 49 1.14 oster RF_AccessStripeMap_t *rf_AllocASMList(RF_Raid_t *, int); 50 1.14 oster void rf_FreeAccessStripeMap(RF_Raid_t *, RF_AccessStripeMapHeader_t *); 51 1.9 oster int rf_CheckStripeForFailures(RF_Raid_t *, RF_AccessStripeMap_t *); 52 1.9 oster int rf_NumFailedDataUnitsInStripe(RF_Raid_t *, RF_AccessStripeMap_t *); 53 1.9 oster void rf_PrintAccessStripeMap(RF_AccessStripeMapHeader_t *); 54 1.9 oster void rf_PrintFullAccessStripeMap(RF_AccessStripeMapHeader_t *, int); 55 1.9 oster void rf_PrintRaidAddressInfo(RF_Raid_t *, RF_RaidAddr_t, RF_SectorCount_t); 56 1.14 oster void rf_ASMParityAdjust(RF_Raid_t *, RF_PhysDiskAddr_t *, RF_StripeNum_t, RF_SectorNum_t, 57 1.9 oster RF_RaidLayout_t *, RF_AccessStripeMap_t *); 58 1.9 oster void rf_ASMCheckStatus(RF_Raid_t *, RF_PhysDiskAddr_t *, RF_AccessStripeMap_t *, 59 1.9 oster RF_RaidDisk_t *, int); 60 1.1 oster 61 1.14 oster RF_VoidFunctionPointerListElem_t *rf_AllocVFPListElem(RF_Raid_t *); 62 1.14 oster void rf_FreeVFPListElem(RF_Raid_t *, RF_VoidFunctionPointerListElem_t *); 63 1.14 oster RF_VoidPointerListElem_t *rf_AllocVPListElem(RF_Raid_t *); 64 1.14 oster void rf_FreeVPListElem(RF_Raid_t *, RF_VoidPointerListElem_t *); 65 1.14 oster RF_ASMHeaderListElem_t *rf_AllocASMHeaderListElem(RF_Raid_t *); 66 1.14 oster void rf_FreeASMHeaderListElem(RF_Raid_t *, RF_ASMHeaderListElem_t *); 67 1.14 oster RF_FailedStripe_t *rf_AllocFailedStripeStruct(RF_Raid_t *); 68 1.14 oster void rf_FreeFailedStripeStruct(RF_Raid_t *, RF_FailedStripe_t *); 69 1.10 oster 70 1.3 oster #endif /* !_RF__RF_MAP_H_ */ 71