usr/src/uts/common/sys/stmf_sbd_ioctl.h
author John Forte <John.Forte@Sun.COM>
Tue, 06 Oct 2009 19:56:15 -0700
changeset 10725 cd144ed668c5
parent 10113 045148591643
child 10765 7ae75584baf6
permissions -rw-r--r--
PSARC/2009/465 COMSTAR ALUA active/standby support 6862774 Add support for ALUA to COMSTAR 6878583 mem leak in stmfGetLuResource() 6850890 stmfTargetProperties.protocol is not populated for stmfGetTargetProperties()
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
7836
4e95154b5b7a 6745433 Merge NWS consolidation into OS/Net consolidation
John Forte <John.Forte@Sun.COM>
parents:
diff changeset
     1
/*
4e95154b5b7a 6745433 Merge NWS consolidation into OS/Net consolidation
John Forte <John.Forte@Sun.COM>
parents:
diff changeset
     2
 * CDDL HEADER START
4e95154b5b7a 6745433 Merge NWS consolidation into OS/Net consolidation
John Forte <John.Forte@Sun.COM>
parents:
diff changeset
     3
 *
4e95154b5b7a 6745433 Merge NWS consolidation into OS/Net consolidation
John Forte <John.Forte@Sun.COM>
parents:
diff changeset
     4
 * The contents of this file are subject to the terms of the
4e95154b5b7a 6745433 Merge NWS consolidation into OS/Net consolidation
John Forte <John.Forte@Sun.COM>
parents:
diff changeset
     5
 * Common Development and Distribution License (the "License").
4e95154b5b7a 6745433 Merge NWS consolidation into OS/Net consolidation
John Forte <John.Forte@Sun.COM>
parents:
diff changeset
     6
 * You may not use this file except in compliance with the License.
4e95154b5b7a 6745433 Merge NWS consolidation into OS/Net consolidation
John Forte <John.Forte@Sun.COM>
parents:
diff changeset
     7
 *
4e95154b5b7a 6745433 Merge NWS consolidation into OS/Net consolidation
John Forte <John.Forte@Sun.COM>
parents:
diff changeset
     8
 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
4e95154b5b7a 6745433 Merge NWS consolidation into OS/Net consolidation
John Forte <John.Forte@Sun.COM>
parents:
diff changeset
     9
 * or http://www.opensolaris.org/os/licensing.
4e95154b5b7a 6745433 Merge NWS consolidation into OS/Net consolidation
John Forte <John.Forte@Sun.COM>
parents:
diff changeset
    10
 * See the License for the specific language governing permissions
4e95154b5b7a 6745433 Merge NWS consolidation into OS/Net consolidation
John Forte <John.Forte@Sun.COM>
parents:
diff changeset
    11
 * and limitations under the License.
4e95154b5b7a 6745433 Merge NWS consolidation into OS/Net consolidation
John Forte <John.Forte@Sun.COM>
parents:
diff changeset
    12
 *
4e95154b5b7a 6745433 Merge NWS consolidation into OS/Net consolidation
John Forte <John.Forte@Sun.COM>
parents:
diff changeset
    13
 * When distributing Covered Code, include this CDDL HEADER in each
4e95154b5b7a 6745433 Merge NWS consolidation into OS/Net consolidation
John Forte <John.Forte@Sun.COM>
parents:
diff changeset
    14
 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
4e95154b5b7a 6745433 Merge NWS consolidation into OS/Net consolidation
John Forte <John.Forte@Sun.COM>
parents:
diff changeset
    15
 * If applicable, add the following below this CDDL HEADER, with the
4e95154b5b7a 6745433 Merge NWS consolidation into OS/Net consolidation
John Forte <John.Forte@Sun.COM>
parents:
diff changeset
    16
 * fields enclosed by brackets "[]" replaced with your own identifying
4e95154b5b7a 6745433 Merge NWS consolidation into OS/Net consolidation
John Forte <John.Forte@Sun.COM>
parents:
diff changeset
    17
 * information: Portions Copyright [yyyy] [name of copyright owner]
4e95154b5b7a 6745433 Merge NWS consolidation into OS/Net consolidation
John Forte <John.Forte@Sun.COM>
parents:
diff changeset
    18
 *
4e95154b5b7a 6745433 Merge NWS consolidation into OS/Net consolidation
John Forte <John.Forte@Sun.COM>
parents:
diff changeset
    19
 * CDDL HEADER END
4e95154b5b7a 6745433 Merge NWS consolidation into OS/Net consolidation
John Forte <John.Forte@Sun.COM>
parents:
diff changeset
    20
 */
4e95154b5b7a 6745433 Merge NWS consolidation into OS/Net consolidation
John Forte <John.Forte@Sun.COM>
parents:
diff changeset
    21
/*
9585
bf09620212ab 6795089 COMSTAR sbd lun provider should support PGR
tim szeto <Tim.Szeto@Sun.COM>
parents: 7836
diff changeset
    22
 * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
7836
4e95154b5b7a 6745433 Merge NWS consolidation into OS/Net consolidation
John Forte <John.Forte@Sun.COM>
parents:
diff changeset
    23
 * Use is subject to license terms.
4e95154b5b7a 6745433 Merge NWS consolidation into OS/Net consolidation
John Forte <John.Forte@Sun.COM>
parents:
diff changeset
    24
 */
4e95154b5b7a 6745433 Merge NWS consolidation into OS/Net consolidation
John Forte <John.Forte@Sun.COM>
parents:
diff changeset
    25
4e95154b5b7a 6745433 Merge NWS consolidation into OS/Net consolidation
John Forte <John.Forte@Sun.COM>
parents:
diff changeset
    26
#ifndef	_STMF_SBD_IOCTL_H
4e95154b5b7a 6745433 Merge NWS consolidation into OS/Net consolidation
John Forte <John.Forte@Sun.COM>
parents:
diff changeset
    27
#define	_STMF_SBD_IOCTL_H
4e95154b5b7a 6745433 Merge NWS consolidation into OS/Net consolidation
John Forte <John.Forte@Sun.COM>
parents:
diff changeset
    28
4e95154b5b7a 6745433 Merge NWS consolidation into OS/Net consolidation
John Forte <John.Forte@Sun.COM>
parents:
diff changeset
    29
#ifdef	__cplusplus
4e95154b5b7a 6745433 Merge NWS consolidation into OS/Net consolidation
John Forte <John.Forte@Sun.COM>
parents:
diff changeset
    30
extern "C" {
4e95154b5b7a 6745433 Merge NWS consolidation into OS/Net consolidation
John Forte <John.Forte@Sun.COM>
parents:
diff changeset
    31
#endif
4e95154b5b7a 6745433 Merge NWS consolidation into OS/Net consolidation
John Forte <John.Forte@Sun.COM>
parents:
diff changeset
    32
4e95154b5b7a 6745433 Merge NWS consolidation into OS/Net consolidation
John Forte <John.Forte@Sun.COM>
parents:
diff changeset
    33
/*
9585
bf09620212ab 6795089 COMSTAR sbd lun provider should support PGR
tim szeto <Tim.Szeto@Sun.COM>
parents: 7836
diff changeset
    34
 * error codes from sbd.
7836
4e95154b5b7a 6745433 Merge NWS consolidation into OS/Net consolidation
John Forte <John.Forte@Sun.COM>
parents:
diff changeset
    35
 */
9585
bf09620212ab 6795089 COMSTAR sbd lun provider should support PGR
tim szeto <Tim.Szeto@Sun.COM>
parents: 7836
diff changeset
    36
typedef enum sbd_ret {
bf09620212ab 6795089 COMSTAR sbd lun provider should support PGR
tim szeto <Tim.Szeto@Sun.COM>
parents: 7836
diff changeset
    37
	SBD_RET_META_CREATION_FAILED = 0x01,
bf09620212ab 6795089 COMSTAR sbd lun provider should support PGR
tim szeto <Tim.Szeto@Sun.COM>
parents: 7836
diff changeset
    38
	SBD_RET_INVALID_BLKSIZE,
bf09620212ab 6795089 COMSTAR sbd lun provider should support PGR
tim szeto <Tim.Szeto@Sun.COM>
parents: 7836
diff changeset
    39
	SBD_RET_REQUIRES_SEPARATE_META,
bf09620212ab 6795089 COMSTAR sbd lun provider should support PGR
tim szeto <Tim.Szeto@Sun.COM>
parents: 7836
diff changeset
    40
	SBD_RET_FILE_ALREADY_REGISTERED,
bf09620212ab 6795089 COMSTAR sbd lun provider should support PGR
tim szeto <Tim.Szeto@Sun.COM>
parents: 7836
diff changeset
    41
	SBD_RET_GUID_ALREADY_REGISTERED,
bf09620212ab 6795089 COMSTAR sbd lun provider should support PGR
tim szeto <Tim.Szeto@Sun.COM>
parents: 7836
diff changeset
    42
	SBD_RET_DATA_PATH_NOT_ABSOLUTE,
bf09620212ab 6795089 COMSTAR sbd lun provider should support PGR
tim szeto <Tim.Szeto@Sun.COM>
parents: 7836
diff changeset
    43
	SBD_RET_META_PATH_NOT_ABSOLUTE,
bf09620212ab 6795089 COMSTAR sbd lun provider should support PGR
tim szeto <Tim.Szeto@Sun.COM>
parents: 7836
diff changeset
    44
	SBD_RET_META_FILE_LOOKUP_FAILED,
bf09620212ab 6795089 COMSTAR sbd lun provider should support PGR
tim szeto <Tim.Szeto@Sun.COM>
parents: 7836
diff changeset
    45
	SBD_RET_ZFS_META_CREATE_FAILED,
bf09620212ab 6795089 COMSTAR sbd lun provider should support PGR
tim szeto <Tim.Szeto@Sun.COM>
parents: 7836
diff changeset
    46
	SBD_ZVOL_META_NAME_MISMATCH,
bf09620212ab 6795089 COMSTAR sbd lun provider should support PGR
tim szeto <Tim.Szeto@Sun.COM>
parents: 7836
diff changeset
    47
	SBD_RET_DATA_FILE_LOOKUP_FAILED,
bf09620212ab 6795089 COMSTAR sbd lun provider should support PGR
tim szeto <Tim.Szeto@Sun.COM>
parents: 7836
diff changeset
    48
	SBD_RET_WRONG_META_FILE_TYPE,
bf09620212ab 6795089 COMSTAR sbd lun provider should support PGR
tim szeto <Tim.Szeto@Sun.COM>
parents: 7836
diff changeset
    49
	SBD_RET_WRONG_DATA_FILE_TYPE,
bf09620212ab 6795089 COMSTAR sbd lun provider should support PGR
tim szeto <Tim.Szeto@Sun.COM>
parents: 7836
diff changeset
    50
	SBD_RET_DATA_FILE_OPEN_FAILED,
bf09620212ab 6795089 COMSTAR sbd lun provider should support PGR
tim szeto <Tim.Szeto@Sun.COM>
parents: 7836
diff changeset
    51
	SBD_RET_META_FILE_OPEN_FAILED,
bf09620212ab 6795089 COMSTAR sbd lun provider should support PGR
tim szeto <Tim.Szeto@Sun.COM>
parents: 7836
diff changeset
    52
	SBD_RET_DATA_FILE_GETATTR_FAILED,
bf09620212ab 6795089 COMSTAR sbd lun provider should support PGR
tim szeto <Tim.Szeto@Sun.COM>
parents: 7836
diff changeset
    53
	SBD_RET_META_FILE_GETATTR_FAILED,
bf09620212ab 6795089 COMSTAR sbd lun provider should support PGR
tim szeto <Tim.Szeto@Sun.COM>
parents: 7836
diff changeset
    54
	SBD_RET_FILE_SIZE_ERROR,
bf09620212ab 6795089 COMSTAR sbd lun provider should support PGR
tim szeto <Tim.Szeto@Sun.COM>
parents: 7836
diff changeset
    55
	SBD_RET_FILE_ALIGN_ERROR,
bf09620212ab 6795089 COMSTAR sbd lun provider should support PGR
tim szeto <Tim.Szeto@Sun.COM>
parents: 7836
diff changeset
    56
	SBD_RET_SIZE_OUT_OF_RANGE,
bf09620212ab 6795089 COMSTAR sbd lun provider should support PGR
tim szeto <Tim.Szeto@Sun.COM>
parents: 7836
diff changeset
    57
	SBD_RET_SIZE_NOT_SUPPORTED_BY_FS,
bf09620212ab 6795089 COMSTAR sbd lun provider should support PGR
tim szeto <Tim.Szeto@Sun.COM>
parents: 7836
diff changeset
    58
	SBD_RET_NO_META,
bf09620212ab 6795089 COMSTAR sbd lun provider should support PGR
tim szeto <Tim.Szeto@Sun.COM>
parents: 7836
diff changeset
    59
	SBD_RET_VERSION_NOT_SUPPORTED,
bf09620212ab 6795089 COMSTAR sbd lun provider should support PGR
tim szeto <Tim.Szeto@Sun.COM>
parents: 7836
diff changeset
    60
	SBD_RET_LU_BUSY,
bf09620212ab 6795089 COMSTAR sbd lun provider should support PGR
tim szeto <Tim.Szeto@Sun.COM>
parents: 7836
diff changeset
    61
	SBD_RET_NOT_FOUND,
bf09620212ab 6795089 COMSTAR sbd lun provider should support PGR
tim szeto <Tim.Szeto@Sun.COM>
parents: 7836
diff changeset
    62
	SBD_RET_INSUFFICIENT_BUF_SPACE,
bf09620212ab 6795089 COMSTAR sbd lun provider should support PGR
tim szeto <Tim.Szeto@Sun.COM>
parents: 7836
diff changeset
    63
	SBD_RET_WRITE_CACHE_SET_FAILED,
10725
cd144ed668c5 PSARC/2009/465 COMSTAR ALUA active/standby support
John Forte <John.Forte@Sun.COM>
parents: 10113
diff changeset
    64
	SBD_RET_ACCESS_STATE_FAILED,
7836
4e95154b5b7a 6745433 Merge NWS consolidation into OS/Net consolidation
John Forte <John.Forte@Sun.COM>
parents:
diff changeset
    65
9585
bf09620212ab 6795089 COMSTAR sbd lun provider should support PGR
tim szeto <Tim.Szeto@Sun.COM>
parents: 7836
diff changeset
    66
	SBD_RET_MAX_VAL
bf09620212ab 6795089 COMSTAR sbd lun provider should support PGR
tim szeto <Tim.Szeto@Sun.COM>
parents: 7836
diff changeset
    67
} sbd_ret_t;
bf09620212ab 6795089 COMSTAR sbd lun provider should support PGR
tim szeto <Tim.Szeto@Sun.COM>
parents: 7836
diff changeset
    68
bf09620212ab 6795089 COMSTAR sbd lun provider should support PGR
tim szeto <Tim.Szeto@Sun.COM>
parents: 7836
diff changeset
    69
#define	SBD_IOCTL_DEF(n)	((((int)0x5B) << 16) | (n))
bf09620212ab 6795089 COMSTAR sbd lun provider should support PGR
tim szeto <Tim.Szeto@Sun.COM>
parents: 7836
diff changeset
    70
#define	SBD_IOCTL_CREATE_AND_REGISTER_LU		SBD_IOCTL_DEF(1)
bf09620212ab 6795089 COMSTAR sbd lun provider should support PGR
tim szeto <Tim.Szeto@Sun.COM>
parents: 7836
diff changeset
    71
#define	SBD_IOCTL_IMPORT_LU				SBD_IOCTL_DEF(2)
bf09620212ab 6795089 COMSTAR sbd lun provider should support PGR
tim szeto <Tim.Szeto@Sun.COM>
parents: 7836
diff changeset
    72
#define	SBD_IOCTL_DELETE_LU				SBD_IOCTL_DEF(3)
bf09620212ab 6795089 COMSTAR sbd lun provider should support PGR
tim szeto <Tim.Szeto@Sun.COM>
parents: 7836
diff changeset
    73
#define	SBD_IOCTL_MODIFY_LU				SBD_IOCTL_DEF(4)
bf09620212ab 6795089 COMSTAR sbd lun provider should support PGR
tim szeto <Tim.Szeto@Sun.COM>
parents: 7836
diff changeset
    74
#define	SBD_IOCTL_GET_LU_PROPS				SBD_IOCTL_DEF(5)
bf09620212ab 6795089 COMSTAR sbd lun provider should support PGR
tim szeto <Tim.Szeto@Sun.COM>
parents: 7836
diff changeset
    75
#define	SBD_IOCTL_GET_LU_LIST				SBD_IOCTL_DEF(6)
10725
cd144ed668c5 PSARC/2009/465 COMSTAR ALUA active/standby support
John Forte <John.Forte@Sun.COM>
parents: 10113
diff changeset
    76
#define	SBD_IOCTL_SET_LU_STANDBY			SBD_IOCTL_DEF(7)
7836
4e95154b5b7a 6745433 Merge NWS consolidation into OS/Net consolidation
John Forte <John.Forte@Sun.COM>
parents:
diff changeset
    77
9585
bf09620212ab 6795089 COMSTAR sbd lun provider should support PGR
tim szeto <Tim.Szeto@Sun.COM>
parents: 7836
diff changeset
    78
typedef struct sbd_create_and_reg_lu {
bf09620212ab 6795089 COMSTAR sbd lun provider should support PGR
tim szeto <Tim.Szeto@Sun.COM>
parents: 7836
diff changeset
    79
	uint32_t	slu_struct_size;
bf09620212ab 6795089 COMSTAR sbd lun provider should support PGR
tim szeto <Tim.Szeto@Sun.COM>
parents: 7836
diff changeset
    80
	uint16_t	slu_meta_fname_valid:1,
bf09620212ab 6795089 COMSTAR sbd lun provider should support PGR
tim szeto <Tim.Szeto@Sun.COM>
parents: 7836
diff changeset
    81
			slu_lu_size_valid:1,
bf09620212ab 6795089 COMSTAR sbd lun provider should support PGR
tim szeto <Tim.Szeto@Sun.COM>
parents: 7836
diff changeset
    82
			slu_blksize_valid:1,
bf09620212ab 6795089 COMSTAR sbd lun provider should support PGR
tim szeto <Tim.Szeto@Sun.COM>
parents: 7836
diff changeset
    83
			slu_vid_valid:1,
bf09620212ab 6795089 COMSTAR sbd lun provider should support PGR
tim szeto <Tim.Szeto@Sun.COM>
parents: 7836
diff changeset
    84
			slu_pid_valid:1,
bf09620212ab 6795089 COMSTAR sbd lun provider should support PGR
tim szeto <Tim.Szeto@Sun.COM>
parents: 7836
diff changeset
    85
			slu_rev_valid:1,
bf09620212ab 6795089 COMSTAR sbd lun provider should support PGR
tim szeto <Tim.Szeto@Sun.COM>
parents: 7836
diff changeset
    86
			slu_serial_valid:1,
bf09620212ab 6795089 COMSTAR sbd lun provider should support PGR
tim szeto <Tim.Szeto@Sun.COM>
parents: 7836
diff changeset
    87
			slu_alias_valid:1,
10113
045148591643 6812611 Add Management Network Address VPD (85h) support to sbd
Nattuvetty Bhavyan <Nattuvetty.Bhavyan@Sun.COM>
parents: 9585
diff changeset
    88
			slu_mgmt_url_valid:1,
9585
bf09620212ab 6795089 COMSTAR sbd lun provider should support PGR
tim szeto <Tim.Szeto@Sun.COM>
parents: 7836
diff changeset
    89
			slu_guid_valid:1,
bf09620212ab 6795089 COMSTAR sbd lun provider should support PGR
tim szeto <Tim.Szeto@Sun.COM>
parents: 7836
diff changeset
    90
			slu_company_id_valid:1,
bf09620212ab 6795089 COMSTAR sbd lun provider should support PGR
tim szeto <Tim.Szeto@Sun.COM>
parents: 7836
diff changeset
    91
			slu_writeback_cache_disable_valid:1,
bf09620212ab 6795089 COMSTAR sbd lun provider should support PGR
tim szeto <Tim.Szeto@Sun.COM>
parents: 7836
diff changeset
    92
			slu_writeback_cache_disable:1,
bf09620212ab 6795089 COMSTAR sbd lun provider should support PGR
tim szeto <Tim.Szeto@Sun.COM>
parents: 7836
diff changeset
    93
			slu_write_protected:1;
bf09620212ab 6795089 COMSTAR sbd lun provider should support PGR
tim szeto <Tim.Szeto@Sun.COM>
parents: 7836
diff changeset
    94
	uint16_t	slu_meta_fname_off;
bf09620212ab 6795089 COMSTAR sbd lun provider should support PGR
tim szeto <Tim.Szeto@Sun.COM>
parents: 7836
diff changeset
    95
	uint64_t	slu_lu_size;
bf09620212ab 6795089 COMSTAR sbd lun provider should support PGR
tim szeto <Tim.Szeto@Sun.COM>
parents: 7836
diff changeset
    96
	uint16_t	slu_data_fname_off;
bf09620212ab 6795089 COMSTAR sbd lun provider should support PGR
tim szeto <Tim.Szeto@Sun.COM>
parents: 7836
diff changeset
    97
	uint16_t	slu_serial_off;
bf09620212ab 6795089 COMSTAR sbd lun provider should support PGR
tim szeto <Tim.Szeto@Sun.COM>
parents: 7836
diff changeset
    98
	uint8_t		slu_serial_size;
bf09620212ab 6795089 COMSTAR sbd lun provider should support PGR
tim szeto <Tim.Szeto@Sun.COM>
parents: 7836
diff changeset
    99
	uint8_t		slu_ret_filesize_nbits;
bf09620212ab 6795089 COMSTAR sbd lun provider should support PGR
tim szeto <Tim.Szeto@Sun.COM>
parents: 7836
diff changeset
   100
	uint16_t	slu_blksize;
bf09620212ab 6795089 COMSTAR sbd lun provider should support PGR
tim szeto <Tim.Szeto@Sun.COM>
parents: 7836
diff changeset
   101
	uint32_t	slu_company_id;
bf09620212ab 6795089 COMSTAR sbd lun provider should support PGR
tim szeto <Tim.Szeto@Sun.COM>
parents: 7836
diff changeset
   102
	uint16_t	slu_alias_off;
10113
045148591643 6812611 Add Management Network Address VPD (85h) support to sbd
Nattuvetty Bhavyan <Nattuvetty.Bhavyan@Sun.COM>
parents: 9585
diff changeset
   103
	uint16_t	slu_mgmt_url_off;
9585
bf09620212ab 6795089 COMSTAR sbd lun provider should support PGR
tim szeto <Tim.Szeto@Sun.COM>
parents: 7836
diff changeset
   104
	uint32_t	slu_rsvd1;
bf09620212ab 6795089 COMSTAR sbd lun provider should support PGR
tim szeto <Tim.Szeto@Sun.COM>
parents: 7836
diff changeset
   105
	char		slu_rev[4];
bf09620212ab 6795089 COMSTAR sbd lun provider should support PGR
tim szeto <Tim.Szeto@Sun.COM>
parents: 7836
diff changeset
   106
	char		slu_vid[8];
bf09620212ab 6795089 COMSTAR sbd lun provider should support PGR
tim szeto <Tim.Szeto@Sun.COM>
parents: 7836
diff changeset
   107
	char		slu_pid[16];
bf09620212ab 6795089 COMSTAR sbd lun provider should support PGR
tim szeto <Tim.Szeto@Sun.COM>
parents: 7836
diff changeset
   108
	uint8_t		slu_guid[16];
bf09620212ab 6795089 COMSTAR sbd lun provider should support PGR
tim szeto <Tim.Szeto@Sun.COM>
parents: 7836
diff changeset
   109
	char		slu_buf[8];	/* likely more than 8 */
bf09620212ab 6795089 COMSTAR sbd lun provider should support PGR
tim szeto <Tim.Szeto@Sun.COM>
parents: 7836
diff changeset
   110
} sbd_create_and_reg_lu_t;
7836
4e95154b5b7a 6745433 Merge NWS consolidation into OS/Net consolidation
John Forte <John.Forte@Sun.COM>
parents:
diff changeset
   111
10725
cd144ed668c5 PSARC/2009/465 COMSTAR ALUA active/standby support
John Forte <John.Forte@Sun.COM>
parents: 10113
diff changeset
   112
typedef struct sbd_set_lu_standby {
cd144ed668c5 PSARC/2009/465 COMSTAR ALUA active/standby support
John Forte <John.Forte@Sun.COM>
parents: 10113
diff changeset
   113
	uint8_t		stlu_guid[16];
cd144ed668c5 PSARC/2009/465 COMSTAR ALUA active/standby support
John Forte <John.Forte@Sun.COM>
parents: 10113
diff changeset
   114
} sbd_set_lu_standby_t;
cd144ed668c5 PSARC/2009/465 COMSTAR ALUA active/standby support
John Forte <John.Forte@Sun.COM>
parents: 10113
diff changeset
   115
cd144ed668c5 PSARC/2009/465 COMSTAR ALUA active/standby support
John Forte <John.Forte@Sun.COM>
parents: 10113
diff changeset
   116
9585
bf09620212ab 6795089 COMSTAR sbd lun provider should support PGR
tim szeto <Tim.Szeto@Sun.COM>
parents: 7836
diff changeset
   117
typedef struct sbd_import_lu {
bf09620212ab 6795089 COMSTAR sbd lun provider should support PGR
tim szeto <Tim.Szeto@Sun.COM>
parents: 7836
diff changeset
   118
	uint32_t	ilu_struct_size;
bf09620212ab 6795089 COMSTAR sbd lun provider should support PGR
tim szeto <Tim.Szeto@Sun.COM>
parents: 7836
diff changeset
   119
	uint32_t	ilu_rsvd;
bf09620212ab 6795089 COMSTAR sbd lun provider should support PGR
tim szeto <Tim.Szeto@Sun.COM>
parents: 7836
diff changeset
   120
	uint8_t		ilu_ret_guid[16];
bf09620212ab 6795089 COMSTAR sbd lun provider should support PGR
tim szeto <Tim.Szeto@Sun.COM>
parents: 7836
diff changeset
   121
	char		ilu_meta_fname[8]; /* Can be more than 8 */
bf09620212ab 6795089 COMSTAR sbd lun provider should support PGR
tim szeto <Tim.Szeto@Sun.COM>
parents: 7836
diff changeset
   122
} sbd_import_lu_t;
7836
4e95154b5b7a 6745433 Merge NWS consolidation into OS/Net consolidation
John Forte <John.Forte@Sun.COM>
parents:
diff changeset
   123
9585
bf09620212ab 6795089 COMSTAR sbd lun provider should support PGR
tim szeto <Tim.Szeto@Sun.COM>
parents: 7836
diff changeset
   124
typedef struct sbd_modify_lu {
bf09620212ab 6795089 COMSTAR sbd lun provider should support PGR
tim szeto <Tim.Szeto@Sun.COM>
parents: 7836
diff changeset
   125
	uint32_t	mlu_struct_size;
bf09620212ab 6795089 COMSTAR sbd lun provider should support PGR
tim szeto <Tim.Szeto@Sun.COM>
parents: 7836
diff changeset
   126
	uint32_t	mlu_lu_size_valid:1,
bf09620212ab 6795089 COMSTAR sbd lun provider should support PGR
tim szeto <Tim.Szeto@Sun.COM>
parents: 7836
diff changeset
   127
			mlu_serial_valid:1,
bf09620212ab 6795089 COMSTAR sbd lun provider should support PGR
tim szeto <Tim.Szeto@Sun.COM>
parents: 7836
diff changeset
   128
			mlu_alias_valid:1,
10113
045148591643 6812611 Add Management Network Address VPD (85h) support to sbd
Nattuvetty Bhavyan <Nattuvetty.Bhavyan@Sun.COM>
parents: 9585
diff changeset
   129
			mlu_mgmt_url_valid:1,
9585
bf09620212ab 6795089 COMSTAR sbd lun provider should support PGR
tim szeto <Tim.Szeto@Sun.COM>
parents: 7836
diff changeset
   130
			mlu_writeback_cache_disable_valid:1,
bf09620212ab 6795089 COMSTAR sbd lun provider should support PGR
tim szeto <Tim.Szeto@Sun.COM>
parents: 7836
diff changeset
   131
			mlu_writeback_cache_disable:1,
bf09620212ab 6795089 COMSTAR sbd lun provider should support PGR
tim szeto <Tim.Szeto@Sun.COM>
parents: 7836
diff changeset
   132
			mlu_write_protected_valid:1,
bf09620212ab 6795089 COMSTAR sbd lun provider should support PGR
tim szeto <Tim.Szeto@Sun.COM>
parents: 7836
diff changeset
   133
			mlu_write_protected:1,
bf09620212ab 6795089 COMSTAR sbd lun provider should support PGR
tim szeto <Tim.Szeto@Sun.COM>
parents: 7836
diff changeset
   134
			mlu_by_guid:1,
10725
cd144ed668c5 PSARC/2009/465 COMSTAR ALUA active/standby support
John Forte <John.Forte@Sun.COM>
parents: 10113
diff changeset
   135
			mlu_by_fname:1,
cd144ed668c5 PSARC/2009/465 COMSTAR ALUA active/standby support
John Forte <John.Forte@Sun.COM>
parents: 10113
diff changeset
   136
			mlu_standby_valid:1,
cd144ed668c5 PSARC/2009/465 COMSTAR ALUA active/standby support
John Forte <John.Forte@Sun.COM>
parents: 10113
diff changeset
   137
			mlu_standby:1;
9585
bf09620212ab 6795089 COMSTAR sbd lun provider should support PGR
tim szeto <Tim.Szeto@Sun.COM>
parents: 7836
diff changeset
   138
	uint64_t	mlu_lu_size;
bf09620212ab 6795089 COMSTAR sbd lun provider should support PGR
tim szeto <Tim.Szeto@Sun.COM>
parents: 7836
diff changeset
   139
	uint16_t	mlu_alias_off;
10113
045148591643 6812611 Add Management Network Address VPD (85h) support to sbd
Nattuvetty Bhavyan <Nattuvetty.Bhavyan@Sun.COM>
parents: 9585
diff changeset
   140
	uint16_t	mlu_mgmt_url_off;
9585
bf09620212ab 6795089 COMSTAR sbd lun provider should support PGR
tim szeto <Tim.Szeto@Sun.COM>
parents: 7836
diff changeset
   141
	uint16_t	mlu_serial_off;
bf09620212ab 6795089 COMSTAR sbd lun provider should support PGR
tim szeto <Tim.Szeto@Sun.COM>
parents: 7836
diff changeset
   142
	uint16_t	mlu_serial_size;
bf09620212ab 6795089 COMSTAR sbd lun provider should support PGR
tim szeto <Tim.Szeto@Sun.COM>
parents: 7836
diff changeset
   143
	uint16_t	mlu_fname_off;
10113
045148591643 6812611 Add Management Network Address VPD (85h) support to sbd
Nattuvetty Bhavyan <Nattuvetty.Bhavyan@Sun.COM>
parents: 9585
diff changeset
   144
	uint16_t	mlu_rsvd1;
045148591643 6812611 Add Management Network Address VPD (85h) support to sbd
Nattuvetty Bhavyan <Nattuvetty.Bhavyan@Sun.COM>
parents: 9585
diff changeset
   145
	uint32_t	mlu_rsvd2;
9585
bf09620212ab 6795089 COMSTAR sbd lun provider should support PGR
tim szeto <Tim.Szeto@Sun.COM>
parents: 7836
diff changeset
   146
	uint8_t		mlu_input_guid[16];
bf09620212ab 6795089 COMSTAR sbd lun provider should support PGR
tim szeto <Tim.Szeto@Sun.COM>
parents: 7836
diff changeset
   147
	char		mlu_buf[8]; /* can be more than 8 */
bf09620212ab 6795089 COMSTAR sbd lun provider should support PGR
tim szeto <Tim.Szeto@Sun.COM>
parents: 7836
diff changeset
   148
} sbd_modify_lu_t;
bf09620212ab 6795089 COMSTAR sbd lun provider should support PGR
tim szeto <Tim.Szeto@Sun.COM>
parents: 7836
diff changeset
   149
bf09620212ab 6795089 COMSTAR sbd lun provider should support PGR
tim szeto <Tim.Szeto@Sun.COM>
parents: 7836
diff changeset
   150
typedef struct sbd_delete_lu {
bf09620212ab 6795089 COMSTAR sbd lun provider should support PGR
tim szeto <Tim.Szeto@Sun.COM>
parents: 7836
diff changeset
   151
	uint32_t	dlu_struct_size;
bf09620212ab 6795089 COMSTAR sbd lun provider should support PGR
tim szeto <Tim.Szeto@Sun.COM>
parents: 7836
diff changeset
   152
	uint16_t	dlu_by_guid:1,
bf09620212ab 6795089 COMSTAR sbd lun provider should support PGR
tim szeto <Tim.Szeto@Sun.COM>
parents: 7836
diff changeset
   153
			dlu_by_meta_name:1;
bf09620212ab 6795089 COMSTAR sbd lun provider should support PGR
tim szeto <Tim.Szeto@Sun.COM>
parents: 7836
diff changeset
   154
	uint16_t	dlu_rsvd;
bf09620212ab 6795089 COMSTAR sbd lun provider should support PGR
tim szeto <Tim.Szeto@Sun.COM>
parents: 7836
diff changeset
   155
	uint8_t		dlu_guid[16];
bf09620212ab 6795089 COMSTAR sbd lun provider should support PGR
tim szeto <Tim.Szeto@Sun.COM>
parents: 7836
diff changeset
   156
	uint8_t		dlu_meta_name[8];
bf09620212ab 6795089 COMSTAR sbd lun provider should support PGR
tim szeto <Tim.Szeto@Sun.COM>
parents: 7836
diff changeset
   157
} sbd_delete_lu_t;
7836
4e95154b5b7a 6745433 Merge NWS consolidation into OS/Net consolidation
John Forte <John.Forte@Sun.COM>
parents:
diff changeset
   158
10725
cd144ed668c5 PSARC/2009/465 COMSTAR ALUA active/standby support
John Forte <John.Forte@Sun.COM>
parents: 10113
diff changeset
   159
/*
cd144ed668c5 PSARC/2009/465 COMSTAR ALUA active/standby support
John Forte <John.Forte@Sun.COM>
parents: 10113
diff changeset
   160
 * sbd access states
cd144ed668c5 PSARC/2009/465 COMSTAR ALUA active/standby support
John Forte <John.Forte@Sun.COM>
parents: 10113
diff changeset
   161
 */
cd144ed668c5 PSARC/2009/465 COMSTAR ALUA active/standby support
John Forte <John.Forte@Sun.COM>
parents: 10113
diff changeset
   162
#define	SBD_LU_ACTIVE			1
cd144ed668c5 PSARC/2009/465 COMSTAR ALUA active/standby support
John Forte <John.Forte@Sun.COM>
parents: 10113
diff changeset
   163
#define	SBD_LU_TRANSITION_TO_ACTIVE	2
cd144ed668c5 PSARC/2009/465 COMSTAR ALUA active/standby support
John Forte <John.Forte@Sun.COM>
parents: 10113
diff changeset
   164
#define	SBD_LU_STANDBY			3
cd144ed668c5 PSARC/2009/465 COMSTAR ALUA active/standby support
John Forte <John.Forte@Sun.COM>
parents: 10113
diff changeset
   165
#define	SBD_LU_TRANSITION_TO_STANDBY	4
cd144ed668c5 PSARC/2009/465 COMSTAR ALUA active/standby support
John Forte <John.Forte@Sun.COM>
parents: 10113
diff changeset
   166
9585
bf09620212ab 6795089 COMSTAR sbd lun provider should support PGR
tim szeto <Tim.Szeto@Sun.COM>
parents: 7836
diff changeset
   167
typedef struct sbd_lu_props {
bf09620212ab 6795089 COMSTAR sbd lun provider should support PGR
tim szeto <Tim.Szeto@Sun.COM>
parents: 7836
diff changeset
   168
	uint32_t	slp_input_guid:1,	/* GUID or meta filename */
bf09620212ab 6795089 COMSTAR sbd lun provider should support PGR
tim szeto <Tim.Szeto@Sun.COM>
parents: 7836
diff changeset
   169
			slp_separate_meta:1,
bf09620212ab 6795089 COMSTAR sbd lun provider should support PGR
tim szeto <Tim.Szeto@Sun.COM>
parents: 7836
diff changeset
   170
			slp_meta_fname_valid:1,
bf09620212ab 6795089 COMSTAR sbd lun provider should support PGR
tim szeto <Tim.Szeto@Sun.COM>
parents: 7836
diff changeset
   171
			slp_data_fname_valid:1,
bf09620212ab 6795089 COMSTAR sbd lun provider should support PGR
tim szeto <Tim.Szeto@Sun.COM>
parents: 7836
diff changeset
   172
			slp_zfs_meta:1,
bf09620212ab 6795089 COMSTAR sbd lun provider should support PGR
tim szeto <Tim.Szeto@Sun.COM>
parents: 7836
diff changeset
   173
			slp_alias_valid:1,
10113
045148591643 6812611 Add Management Network Address VPD (85h) support to sbd
Nattuvetty Bhavyan <Nattuvetty.Bhavyan@Sun.COM>
parents: 9585
diff changeset
   174
			slp_mgmt_url_valid:1,
9585
bf09620212ab 6795089 COMSTAR sbd lun provider should support PGR
tim szeto <Tim.Szeto@Sun.COM>
parents: 7836
diff changeset
   175
			slp_lu_vid:1,
bf09620212ab 6795089 COMSTAR sbd lun provider should support PGR
tim szeto <Tim.Szeto@Sun.COM>
parents: 7836
diff changeset
   176
			slp_lu_pid:1,
bf09620212ab 6795089 COMSTAR sbd lun provider should support PGR
tim szeto <Tim.Szeto@Sun.COM>
parents: 7836
diff changeset
   177
			slp_lu_rev:1,
bf09620212ab 6795089 COMSTAR sbd lun provider should support PGR
tim szeto <Tim.Szeto@Sun.COM>
parents: 7836
diff changeset
   178
			slp_serial_valid:1,
bf09620212ab 6795089 COMSTAR sbd lun provider should support PGR
tim szeto <Tim.Szeto@Sun.COM>
parents: 7836
diff changeset
   179
			slp_writeback_cache_disable_cur:1,
bf09620212ab 6795089 COMSTAR sbd lun provider should support PGR
tim szeto <Tim.Szeto@Sun.COM>
parents: 7836
diff changeset
   180
			slp_writeback_cache_disable_saved:1,
bf09620212ab 6795089 COMSTAR sbd lun provider should support PGR
tim szeto <Tim.Szeto@Sun.COM>
parents: 7836
diff changeset
   181
			slp_write_protected:1;
bf09620212ab 6795089 COMSTAR sbd lun provider should support PGR
tim szeto <Tim.Szeto@Sun.COM>
parents: 7836
diff changeset
   182
	uint16_t	slp_meta_fname_off;
bf09620212ab 6795089 COMSTAR sbd lun provider should support PGR
tim szeto <Tim.Szeto@Sun.COM>
parents: 7836
diff changeset
   183
	uint16_t	slp_data_fname_off;
bf09620212ab 6795089 COMSTAR sbd lun provider should support PGR
tim szeto <Tim.Szeto@Sun.COM>
parents: 7836
diff changeset
   184
	uint64_t	slp_lu_size;
bf09620212ab 6795089 COMSTAR sbd lun provider should support PGR
tim szeto <Tim.Szeto@Sun.COM>
parents: 7836
diff changeset
   185
	uint16_t	slp_serial_off;
bf09620212ab 6795089 COMSTAR sbd lun provider should support PGR
tim szeto <Tim.Szeto@Sun.COM>
parents: 7836
diff changeset
   186
	uint16_t	slp_blksize;
bf09620212ab 6795089 COMSTAR sbd lun provider should support PGR
tim szeto <Tim.Szeto@Sun.COM>
parents: 7836
diff changeset
   187
	uint16_t	slp_alias_off;
10113
045148591643 6812611 Add Management Network Address VPD (85h) support to sbd
Nattuvetty Bhavyan <Nattuvetty.Bhavyan@Sun.COM>
parents: 9585
diff changeset
   188
	uint16_t	slp_mgmt_url_off;
9585
bf09620212ab 6795089 COMSTAR sbd lun provider should support PGR
tim szeto <Tim.Szeto@Sun.COM>
parents: 7836
diff changeset
   189
	uint32_t	slp_buf_size_needed;	/* Upon return */
bf09620212ab 6795089 COMSTAR sbd lun provider should support PGR
tim szeto <Tim.Szeto@Sun.COM>
parents: 7836
diff changeset
   190
	uint16_t	slp_serial_size;
10725
cd144ed668c5 PSARC/2009/465 COMSTAR ALUA active/standby support
John Forte <John.Forte@Sun.COM>
parents: 10113
diff changeset
   191
	uint16_t	slp_access_state;
9585
bf09620212ab 6795089 COMSTAR sbd lun provider should support PGR
tim szeto <Tim.Szeto@Sun.COM>
parents: 7836
diff changeset
   192
	char		slp_rev[4];
bf09620212ab 6795089 COMSTAR sbd lun provider should support PGR
tim szeto <Tim.Szeto@Sun.COM>
parents: 7836
diff changeset
   193
	char		slp_vid[8];
bf09620212ab 6795089 COMSTAR sbd lun provider should support PGR
tim szeto <Tim.Szeto@Sun.COM>
parents: 7836
diff changeset
   194
	char		slp_pid[16];
bf09620212ab 6795089 COMSTAR sbd lun provider should support PGR
tim szeto <Tim.Szeto@Sun.COM>
parents: 7836
diff changeset
   195
	uint8_t		slp_guid[16];
bf09620212ab 6795089 COMSTAR sbd lun provider should support PGR
tim szeto <Tim.Szeto@Sun.COM>
parents: 7836
diff changeset
   196
	uint8_t		slp_buf[8];	/* likely more than 8 */
bf09620212ab 6795089 COMSTAR sbd lun provider should support PGR
tim szeto <Tim.Szeto@Sun.COM>
parents: 7836
diff changeset
   197
} sbd_lu_props_t;
7836
4e95154b5b7a 6745433 Merge NWS consolidation into OS/Net consolidation
John Forte <John.Forte@Sun.COM>
parents:
diff changeset
   198
4e95154b5b7a 6745433 Merge NWS consolidation into OS/Net consolidation
John Forte <John.Forte@Sun.COM>
parents:
diff changeset
   199
#ifdef	__cplusplus
4e95154b5b7a 6745433 Merge NWS consolidation into OS/Net consolidation
John Forte <John.Forte@Sun.COM>
parents:
diff changeset
   200
}
4e95154b5b7a 6745433 Merge NWS consolidation into OS/Net consolidation
John Forte <John.Forte@Sun.COM>
parents:
diff changeset
   201
#endif
4e95154b5b7a 6745433 Merge NWS consolidation into OS/Net consolidation
John Forte <John.Forte@Sun.COM>
parents:
diff changeset
   202
4e95154b5b7a 6745433 Merge NWS consolidation into OS/Net consolidation
John Forte <John.Forte@Sun.COM>
parents:
diff changeset
   203
#endif /* _STMF_SBD_IOCTL_H */