diff options
author | Peter Galbavy <peter@cvs.openbsd.org> | 2000-08-08 16:07:46 +0000 |
---|---|---|
committer | Peter Galbavy <peter@cvs.openbsd.org> | 2000-08-08 16:07:46 +0000 |
commit | 32fe17a663470bcff500ec1d022251eb5521ca1d (patch) | |
tree | a9d50274c1f5d004d13fa30644899af9b22328ee /sys/dev/raidframe/rf_disks.h | |
parent | ba14061bb6dd00dd21fcd589dca3d5be75d8f752 (diff) |
sync RAIDframe with Gre Oster's work for NetBSD.
This update incorporates changes since January 2000.
RAID1 and RAID5 tested for functionality matching the 2.7 code. A
number of bug fixes (including stopping a parity rebuild when
unconfiguring) have been included. See Greg's RAIDframe info page:
http://www.cs.usask.ca/staff/oster/raid.html
The RAID_AUTOCONFIG feature set does *NOT* yet work. These features
require more work throughout the boot system and as such are a big
task.
IMPORTANT: As with anything that is this near live data on your
systems, please test carefully with existing configurations before
deploying in a live system. Feedback via sendbug or mail direct
to peter@wonderland.org is appreciated.
Diffstat (limited to 'sys/dev/raidframe/rf_disks.h')
-rw-r--r-- | sys/dev/raidframe/rf_disks.h | 55 |
1 files changed, 34 insertions, 21 deletions
diff --git a/sys/dev/raidframe/rf_disks.h b/sys/dev/raidframe/rf_disks.h index bb3e551396d..bb15d365b5e 100644 --- a/sys/dev/raidframe/rf_disks.h +++ b/sys/dev/raidframe/rf_disks.h @@ -1,5 +1,5 @@ -/* $OpenBSD: rf_disks.h,v 1.3 1999/07/30 14:45:32 peter Exp $ */ -/* $NetBSD: rf_disks.h,v 1.4 1999/02/24 00:00:03 oster Exp $ */ +/* $OpenBSD: rf_disks.h,v 1.4 2000/08/08 16:07:40 peter Exp $ */ +/* $NetBSD: rf_disks.h,v 1.8 2000/03/27 03:25:17 oster Exp $ */ /* * Copyright (c) 1995 Carnegie-Mellon University. * All rights reserved. @@ -39,6 +39,12 @@ #include "rf_archs.h" #include "rf_types.h" +#if defined(__NetBSD__) +#include "rf_netbsd.h" +#elif defined(__OpenBSD__) +#include "rf_openbsd.h" +#endif + /* * A physical disk can be in one of several states: * IF YOU ADD A STATE, CHECK TO SEE IF YOU NEED TO MODIFY RF_DEAD_DISK() BELOW. @@ -68,16 +74,10 @@ struct RF_RaidDisk_s { RF_SectorCount_t numBlocks; /* number of blocks, obtained via READ * CAPACITY */ int blockSize; - /* XXX the following is needed since we seem to need SIMULATE defined - * in order to get user-land stuff to compile, but we *don't* want this - * in the structure for the user-land utilities, as the kernel doesn't - * know about it!! (and it messes up the size of the structure, so - * there is a communication problem between the kernel and the - * userland utils :-( GO */ -#if RF_KEEP_DISKSTATS > 0 - RF_uint64 nreads; - RF_uint64 nwrites; -#endif /* RF_KEEP_DISKSTATS > 0 */ + RF_SectorCount_t partitionSize; /* The *actual* and *full* size of + the partition, from the disklabel */ + int auto_configured;/* 1 if this component was autoconfigured. + 0 otherwise. */ dev_t dev; }; /* @@ -92,14 +92,27 @@ typedef void RF_DiskOp_t; ((_dstat_) == rf_ds_reconstructing) || ((_dstat_) == rf_ds_failed) || \ ((_dstat_) == rf_ds_dist_spared)) -int -rf_ConfigureDisks(RF_ShutdownList_t ** listp, RF_Raid_t * raidPtr, - RF_Config_t * cfgPtr); -int -rf_ConfigureSpareDisks(RF_ShutdownList_t ** listp, RF_Raid_t * raidPtr, - RF_Config_t * cfgPtr); -int -rf_ConfigureDisk(RF_Raid_t * raidPtr, char *buf, RF_RaidDisk_t * diskPtr, - RF_RowCol_t row, RF_RowCol_t col); +#ifdef _KERNEL +#if defined(__NetBSD__) +#include "rf_netbsd.h" +#elif defined(__OpenBSD__) +#include "rf_openbsd.h" +#endif + +int rf_ConfigureDisks(RF_ShutdownList_t ** listp, RF_Raid_t * raidPtr, + RF_Config_t * cfgPtr); +int rf_ConfigureSpareDisks(RF_ShutdownList_t ** listp, RF_Raid_t * raidPtr, + RF_Config_t * cfgPtr); +int rf_ConfigureDisk(RF_Raid_t * raidPtr, char *buf, RF_RaidDisk_t * diskPtr, + RF_RowCol_t row, RF_RowCol_t col); +int rf_AutoConfigureDisks(RF_Raid_t *raidPtr, RF_Config_t *cfgPtr, + RF_AutoConfig_t *auto_config); +int rf_CheckLabels( RF_Raid_t *, RF_Config_t *); +int rf_add_hot_spare(RF_Raid_t *raidPtr, RF_SingleComponent_t *sparePtr); +int rf_remove_hot_spare(RF_Raid_t *raidPtr, RF_SingleComponent_t *sparePtr); +int rf_delete_component(RF_Raid_t *raidPtr, RF_SingleComponent_t *component); +int rf_incorporate_hot_spare(RF_Raid_t *raidPtr, + RF_SingleComponent_t *component); +#endif /* _KERNEL */ #endif /* !_RF__RF_DISKS_H_ */ |