sd_ft.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_FT_H
#define _SD_FT_H
#ifdef __cplusplus
extern "C" {
#endif
typedef struct _sd_ft_info {
char fi_crashed; /* mirror cache state */
char fi_host_state; /* mirror node state */
volatile int fi_numio;
/* waiting for node down or re-enable */
/*
* mirror node has paniced with cache enabled,
* or mirror cache has been deconfigured.
*/
/*
* mirror node has shutdown having previously
* deconfigured its cache.
*/
#define _sd_is_mirror_node_down() \
(!_INFSD_NODE_UP(_SD_MIRROR_HOST) &&\
#ifdef _KERNEL
extern _sd_ft_info_t _sd_ft_data;
extern int _sd_node_recovery;
extern void _sdbc_ft_unload(void);
extern int _sdbc_ft_load(void);
extern int _sdbc_ft_configure(void);
extern void _sdbc_ft_deconfigure(void);
extern int _sd_recovery_wait(void);
extern int _sd_recovery_wblk_wait(int cd);
extern void _sd_mirror_iodone(void);
extern int _sd_repin_cd(int);
extern void _sd_remote_disable(int);
extern void r_sd_ifs_cache_enable(ncall_t *, int *);
extern void r_sd_ifs_cache_disable(ncall_t *, int *);
extern void _sd_hash_invalidate_cd(int);
extern void r_cd_discard(ncall_t *, int *);
extern int _sd_uncommit_refresh(_sd_cctl_t *, int);
extern void r_sd_uncommit_refresh(ncall_t *, int *);
extern int _sd_wait_for_flush(int);
extern int _sdbc_warm_start(void);
extern void _sdbc_set_warm_start(void);
#endif /* _KERNEL */
#ifdef __cplusplus
}
#endif
#endif /* _SD_FT_H */