/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (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 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#ifndef _SYS__MD_SP_H
#define _SYS__MD_SP_H
#ifdef __cplusplus
extern "C" {
#endif
/* on-disk structures */
/* number of sectors to reserve at the beginning of the volume */
#define MD_SP_START (0)
/* current watermark version number */
/* size of a watermark in sectors */
/* free watermark name */
/* local set name */
/* maximum length of a soft partition metadevice name. eg. dXXXX\0 */
/*
* The size of this structure is forced to be 512 bytes (ie a sector) by
* using a union. Note the MD_MAX_SETNAME_PLUS_1 is set in meta_basic.h
*/
#pragma pack(4)
#endif
typedef union mp_watermark {
struct {
MD_SP_MAX_DEVNAME_PLUS_1]; /* SP name */
} wm;
#pragma pack()
#endif
/* Watermark types */
typedef enum sp_ext_type {
/* ioctls */
#ifdef _KERNEL
/*
* parent and child save areas provide the mechanism for tracking
* I/O operations in the metadevice stack.
*/
/* soft partitioning parent save area */
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_spps_t;
/* parent save flags. */
/* soft partitioning child save area */
typedef struct md_spcs {
/* Add new structure members HERE!! */
/* DO NOT add struture members here; cs_buf is dynamically sized */
} md_spcs_t;
{ \
else \
}
/* externals from sp.c */
extern int sp_build_incore(void *, int);
/* externals from sp_ioctl.c */
#endif /* _KERNEL */
#ifdef __cplusplus
}
#endif
#endif /* _SYS__MD_SP_H */