rf_map.h revision 1.9
1/* $NetBSD: rf_map.h,v 1.9 2004/03/07 05:01:15 oster Exp $ */ 2/* 3 * Copyright (c) 1995 Carnegie-Mellon University. 4 * All rights reserved. 5 * 6 * Author: Mark Holland 7 * 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. 13 * 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. 17 * 18 * Carnegie Mellon requests users of this software to return to 19 * 20 * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU 21 * School of Computer Science 22 * Carnegie Mellon University 23 * Pittsburgh PA 15213-3890 24 * 25 * any improvements or extensions that they make and grant Carnegie the 26 * rights to redistribute these changes. 27 */ 28 29/* rf_map.h */ 30 31#ifndef _RF__RF_MAP_H_ 32#define _RF__RF_MAP_H_ 33 34#include <dev/raidframe/raidframevar.h> 35 36#include "rf_alloclist.h" 37#include "rf_raid.h" 38 39/* mapping structure allocation and free routines */ 40RF_AccessStripeMapHeader_t *rf_MapAccess(RF_Raid_t *, RF_RaidAddr_t, 41 RF_SectorCount_t, caddr_t, int); 42void rf_MarkFailuresInASMList(RF_Raid_t *, RF_AccessStripeMapHeader_t *); 43int rf_ConfigureMapModule(RF_ShutdownList_t **); 44RF_AccessStripeMapHeader_t *rf_AllocAccessStripeMapHeader(void); 45void rf_FreeAccessStripeMapHeader(RF_AccessStripeMapHeader_t *); 46RF_PhysDiskAddr_t *rf_AllocPhysDiskAddr(void); 47RF_PhysDiskAddr_t *rf_AllocPDAList(int); 48void rf_FreePhysDiskAddr(RF_PhysDiskAddr_t *); 49RF_AccessStripeMap_t *rf_AllocASMList(int); 50void rf_FreeAccessStripeMap(RF_AccessStripeMapHeader_t *); 51int rf_CheckStripeForFailures(RF_Raid_t *, RF_AccessStripeMap_t *); 52int rf_NumFailedDataUnitsInStripe(RF_Raid_t *, RF_AccessStripeMap_t *); 53void rf_PrintAccessStripeMap(RF_AccessStripeMapHeader_t *); 54void rf_PrintFullAccessStripeMap(RF_AccessStripeMapHeader_t *, int); 55void rf_PrintRaidAddressInfo(RF_Raid_t *, RF_RaidAddr_t, RF_SectorCount_t); 56void rf_ASMParityAdjust(RF_PhysDiskAddr_t *, RF_StripeNum_t, RF_SectorNum_t, 57 RF_RaidLayout_t *, RF_AccessStripeMap_t *); 58void rf_ASMCheckStatus(RF_Raid_t *, RF_PhysDiskAddr_t *, RF_AccessStripeMap_t *, 59 RF_RaidDisk_t *, int); 60 61#endif /* !_RF__RF_MAP_H_ */ 62