lun_map.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 _LUN_MAP_H
#define _LUN_MAP_H
#include <sys/stmf_defines.h>
#ifdef __cplusplus
extern "C" {
#endif
typedef struct stmf_lun_map {
void **lm_plus; /* this can be lun or view entry */
struct stmf_itl_data;
typedef struct stmf_lun_map_ent {
struct stmf_itl_data *ent_itl_datap;
void stmf_view_init();
void stmf_view_clear_config();
/*
* Common struct used to maintain an Identifer's data. That Identifier
* can be a Host group, Target group or LU GUID data. Note that a LU is
* different from LU GUID data because either can be there without
* its counterpart being present in the system.
* id_impl_specific pointer to:
* case LUID, a list of stmf_view_entry
* case initiator group, a list of initiators
* case target group, a list of targets
* id_pt_to_object pointer to stmf_i_lu_t instance for LU.
*/
typedef struct stmf_id_data {
struct stmf_id_data *id_next;
struct stmf_id_data *id_prev;
void *id_pt_to_object;
void *id_impl_specific;
typedef enum {
typedef struct stmf_id_list {
typedef struct stmf_view_entry {
struct stmf_view_entry *ve_next;
struct stmf_view_entry *ve_prev;
/*
* Following structs are used as an alternate representation of view entries
* in a LU ID.
* ver_tg_root--->ver_tg_t +-> ver_tg_t ....
* | |
* vert_next-+
* |
* vert_verh_list --> ver_hg_t +-> ver_hg_t ....
* | |
* verh_next-+
* |
* verh_ve_map (view entry map for this
* target group + host group )
*/
typedef struct ver_hg {
typedef struct ver_tg {
/*
* flag which define how the merging of maps is to be done.
*/
typedef enum {
MERGE_FLAG_NONE = 0
#ifdef __cplusplus
}
#endif
#endif /* _LUN_MAP_H */