summaryrefslogtreecommitdiff
path: root/sys/dev/raidframe/rf_netbsd.h
diff options
context:
space:
mode:
authorPeter Galbavy <peter@cvs.openbsd.org>2000-08-08 16:07:46 +0000
committerPeter Galbavy <peter@cvs.openbsd.org>2000-08-08 16:07:46 +0000
commit32fe17a663470bcff500ec1d022251eb5521ca1d (patch)
treea9d50274c1f5d004d13fa30644899af9b22328ee /sys/dev/raidframe/rf_netbsd.h
parentba14061bb6dd00dd21fcd589dca3d5be75d8f752 (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_netbsd.h')
-rw-r--r--sys/dev/raidframe/rf_netbsd.h58
1 files changed, 50 insertions, 8 deletions
diff --git a/sys/dev/raidframe/rf_netbsd.h b/sys/dev/raidframe/rf_netbsd.h
index b69f2f78c1e..0f3a18d3811 100644
--- a/sys/dev/raidframe/rf_netbsd.h
+++ b/sys/dev/raidframe/rf_netbsd.h
@@ -1,5 +1,5 @@
-/* $OpenBSD: rf_netbsd.h,v 1.4 1999/08/02 12:29:31 peter Exp $ */
-/* $NetBSD: rf_netbsd.h,v 1.6 1999/05/13 21:46:17 ad Exp $ */
+/* $OpenBSD: rf_netbsd.h,v 1.5 2000/08/08 16:07:42 peter Exp $ */
+/* $NetBSD: rf_netbsd.h,v 1.12 2000/05/28 22:53:49 oster Exp $ */
/*-
* Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc.
@@ -69,6 +69,33 @@ typedef struct RF_ComponentLabel_s {
int num_columns; /* number of columns in this RAID set */
int clean; /* 1 when clean, 0 when dirty */
int status; /* rf_ds_optimal, rf_ds_dist_spared, whatever. */
+ /* stuff that will be in version 2 of the label */
+ int sectPerSU; /* Sectors per Stripe Unit */
+ int SUsPerPU; /* Stripe Units per Parity Units */
+ int SUsPerRU; /* Stripe Units per Reconstruction Units */
+ int parityConfig; /* '0' == RAID0, '1' == RAID1, etc. */
+ int maxOutstanding; /* maxOutstanding disk requests */
+ int blockSize; /* size of component block.
+ (disklabel->d_secsize) */
+ int numBlocks; /* number of blocks on this component. May
+ be smaller than the partition size. */
+ int partitionSize; /* number of blocks on this *partition*.
+ Must exactly match the partition size
+ from the disklabel. */
+ int future_use[33]; /* Future expansion */
+ int autoconfigure; /* automatically configure this RAID set.
+ 0 == no, 1 == yes */
+ int root_partition; /* Use this set as /
+ 0 == no, 1 == yes*/
+ int last_unit; /* last unit number (e.g. 0 for /dev/raid0)
+ of this component. Used for autoconfigure
+ only. */
+ int config_order; /* 0 .. n. The order in which the component
+ should be auto-configured. E.g. 0 is will
+ done first, (and would become raid0).
+ This may be in conflict with last_unit!!?! */
+ /* Not currently used. */
+ int future_use2[44]; /* More future expansion */
} RF_ComponentLabel_t;
typedef struct RF_SingleComponent_s {
@@ -79,11 +106,6 @@ typedef struct RF_SingleComponent_s {
#ifdef _KERNEL
-/* XXX this is *not* the place for these... */
-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);
-
-
struct raidcinfo {
struct vnode *ci_vp; /* component device's vnode */
dev_t ci_dev; /* component device's dev_t */
@@ -93,6 +115,26 @@ int rf_remove_hot_spare(RF_Raid_t *raidPtr, RF_SingleComponent_t *sparePtr);
char *ci_path; /* path to component */
size_t ci_pathlen; /* length of component path */
#endif
-};
+ };
+
+
+/* XXX probably belongs in a different .h file. */
+typedef struct RF_AutoConfig_s {
+ char devname[56]; /* the name of this component */
+ int flag; /* a general-purpose flag */
+ dev_t dev; /* the device for this component */
+ struct vnode *vp; /* Mr. Vnode Pointer */
+ RF_ComponentLabel_t *clabel; /* the label */
+ struct RF_AutoConfig_s *next; /* the next autoconfig structure
+ in this set. */
+} RF_AutoConfig_t;
+
+typedef struct RF_ConfigSet_s {
+ struct RF_AutoConfig_s *ac; /* all of the autoconfig structures for
+ this config set. */
+ int rootable; /* Set to 1 if this set can be root */
+ struct RF_ConfigSet_s *next;
+} RF_ConfigSet_t;
+
#endif /* _KERNEL */
#endif /* _RF__RF_NETBSDSTUFF_H_ */