md_stripe.h revision 7c478bd95313f5f23a4c958a745db2134aa03244
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (the "License"). You may not use this file except in compliance
* with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2004 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#ifndef _SYS__MD_STRIPE_H
#define _SYS__MD_STRIPE_H
#pragma ident "%Z%%M% %I% %E% SMI"
#ifdef __cplusplus
extern "C" {
#endif
/*
* ms_comp32_od is for old 32 bit format only
*/
#pragma pack(4)
#endif
typedef struct ms_comp32_od {
typedef struct ms_comp { /* components */
} ms_comp_t;
#pragma pack()
#endif
/*
* ms_unit32_od is for old 32 bit format only
*/
#pragma pack(4)
#endif
typedef struct ms_unit32_od {
int un_hsp_id; /* hot spare pool db record id */
struct ms_row32_od {
int un_icomp; /* ms_comp array index of first comp */
int un_blocks; /* total blocks in this row */
int un_cum_blocks; /* cum. blks in this and prev. rows */
int un_interlace; /* # blks from each disk in a stripe */
}un_row[1];
typedef struct ms_unit {
mdc_unit_t c;
int un_hsp_id; /* hot spare pool db record id */
struct ms_row {
int un_icomp; /* ms_comp array index of first comp */
}un_row[1];
} ms_unit_t;
#pragma pack()
#endif
#ifdef _KERNEL
typedef struct md_sps { /* stripe parent save */
int ps_frags;
int ps_flags;
/*
* New structure members should be added here; fields added
* after ps_mx will not be zeroed during initialization.
*/
} md_sps_t;
#define MD_SPS_ERROR 0x0001
#define MD_SPS_DONTFREE 0x0002
#define MD_SPS_DONE 0x0004
{ \
else \
}
typedef struct md_scs {
/* Add new structure members HERE!! */
/* DO NOT add struture members here; cs_buf is dynamically sized */
} md_scs_t;
/* Externals from stripe.c */
extern int stripe_build_incore(void *, int);
mddb_recid_t *, int, void (**)(), void **);
/* Externals from stripe_ioctl.c */
/* rename named service functions (stripe_ioctl.c) */
#endif /* _KERNEL */
#ifdef __cplusplus
}
#endif
#endif /* _SYS__MD_STRIPE_H */