sd_pcu.h revision fcf3ce441efd61da9bb2884968af01cb7c1452cc
/*
* 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 _SD_PCU_H
#define _SD_PCU_H
/*
* All structures here are on-disk, unless specified otherwise.
* In-core stuff is hidden inside implementation modules.
*/
#ifdef __cplusplus
extern "C" {
#endif
/*
* Header.
*/
#define SDBC_PWF_MAGIC 0xbcbcbc01
typedef struct sdbc_pwf_hdr_s {
/* a cache block is this identical size */
/*
* File description
*/
typedef struct sdbc_pwf_desc_s {
/* the name given to nsc_open */
/* (i.e. nothing to do with rdc bitmaps */
/* long rdc_data; */ /* offset to rdc data (NYI) */
/*
* record status section - describes the state of each cache block in the file
*
* zaitcev - XXX errs is per block, not per fba?
*/
typedef struct sdbc_pwf_rec_s {
/* from errors to a raidset where we must recover */
/* from a stripe write error */
/* (i.e. parity is bad or suspect ) */
typedef struct sdbc_pwf_bitmap_s {
/*
* Prototypes
*/
#ifdef _KERNEL /* XXX Split into sd_pcu_ondisk.h, sd_pcu_iface.h */
extern char _sdbc_shutdown_in_progress;
extern int _sdbc_pcu_config(int c, char **v);
extern void _sdbc_pcu_unload(void);
extern void _sdbc_power_lost(int rideout);
extern void _sdbc_power_ok(void);
extern void _sdbc_power_down(void);
#endif
#ifdef __cplusplus
}
#endif
#endif /* _SD_PCU_H */