usr/src/uts/common/sys/stmf_sbd_ioctl.h
author John Forte <John.Forte@Sun.COM>
Thu, 19 Nov 2009 05:07:17 -0800
changeset 11103 3b3f33a37cab
parent 10765 7ae75584baf6
child 13297 4b9dc4ca8e9f
permissions -rw-r--r--
6894418 set interface for global logical unit property 6895461 'stmf: WARNING: proxy port not registered' appears occasionally on COMSTAR target
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)
11103
3b3f33a37cab 6894418 set interface for global logical unit property
John Forte <John.Forte@Sun.COM>
parents: 10765
diff changeset
    77
#define	SBD_IOCTL_SET_GLOBAL_LU				SBD_IOCTL_DEF(8)
3b3f33a37cab 6894418 set interface for global logical unit property
John Forte <John.Forte@Sun.COM>
parents: 10765
diff changeset
    78
#define	SBD_IOCTL_GET_GLOBAL_LU				SBD_IOCTL_DEF(9)
7836
4e95154b5b7a 6745433 Merge NWS consolidation into OS/Net consolidation
John Forte <John.Forte@Sun.COM>
parents:
diff changeset
    79
9585
bf09620212ab 6795089 COMSTAR sbd lun provider should support PGR
tim szeto <Tim.Szeto@Sun.COM>
parents: 7836
diff changeset
    80
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
    81
	uint32_t	slu_struct_size;
bf09620212ab 6795089 COMSTAR sbd lun provider should support PGR
tim szeto <Tim.Szeto@Sun.COM>
parents: 7836
diff changeset
    82
	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
    83
			slu_lu_size_valid:1,
bf09620212ab 6795089 COMSTAR sbd lun provider should support PGR
tim szeto <Tim.Szeto@Sun.COM>
parents: 7836
diff changeset
    84
			slu_blksize_valid:1,
bf09620212ab 6795089 COMSTAR sbd lun provider should support PGR
tim szeto <Tim.Szeto@Sun.COM>
parents: 7836
diff changeset
    85
			slu_vid_valid:1,
bf09620212ab 6795089 COMSTAR sbd lun provider should support PGR
tim szeto <Tim.Szeto@Sun.COM>
parents: 7836
diff changeset
    86
			slu_pid_valid:1,
bf09620212ab 6795089 COMSTAR sbd lun provider should support PGR
tim szeto <Tim.Szeto@Sun.COM>
parents: 7836
diff changeset
    87
			slu_rev_valid:1,
bf09620212ab 6795089 COMSTAR sbd lun provider should support PGR
tim szeto <Tim.Szeto@Sun.COM>
parents: 7836
diff changeset
    88
			slu_serial_valid:1,
bf09620212ab 6795089 COMSTAR sbd lun provider should support PGR
tim szeto <Tim.Szeto@Sun.COM>
parents: 7836
diff changeset
    89
			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
    90
			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
    91
			slu_guid_valid:1,
bf09620212ab 6795089 COMSTAR sbd lun provider should support PGR
tim szeto <Tim.Szeto@Sun.COM>
parents: 7836
diff changeset
    92
			slu_company_id_valid:1,
10765
7ae75584baf6 6861519 stmfCreateLu() should allow caller to specify host id
John Forte <John.Forte@Sun.COM>
parents: 10725
diff changeset
    93
			slu_host_id_valid:1,
9585
bf09620212ab 6795089 COMSTAR sbd lun provider should support PGR
tim szeto <Tim.Szeto@Sun.COM>
parents: 7836
diff changeset
    94
			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
    95
			slu_writeback_cache_disable:1,
bf09620212ab 6795089 COMSTAR sbd lun provider should support PGR
tim szeto <Tim.Szeto@Sun.COM>
parents: 7836
diff changeset
    96
			slu_write_protected:1;
bf09620212ab 6795089 COMSTAR sbd lun provider should support PGR
tim szeto <Tim.Szeto@Sun.COM>
parents: 7836
diff changeset
    97
	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
    98
	uint64_t	slu_lu_size;
bf09620212ab 6795089 COMSTAR sbd lun provider should support PGR
tim szeto <Tim.Szeto@Sun.COM>
parents: 7836
diff changeset
    99
	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
   100
	uint16_t	slu_serial_off;
bf09620212ab 6795089 COMSTAR sbd lun provider should support PGR
tim szeto <Tim.Szeto@Sun.COM>
parents: 7836
diff changeset
   101
	uint8_t		slu_serial_size;
bf09620212ab 6795089 COMSTAR sbd lun provider should support PGR
tim szeto <Tim.Szeto@Sun.COM>
parents: 7836
diff changeset
   102
	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
   103
	uint16_t	slu_blksize;
bf09620212ab 6795089 COMSTAR sbd lun provider should support PGR
tim szeto <Tim.Szeto@Sun.COM>
parents: 7836
diff changeset
   104
	uint32_t	slu_company_id;
bf09620212ab 6795089 COMSTAR sbd lun provider should support PGR
tim szeto <Tim.Szeto@Sun.COM>
parents: 7836
diff changeset
   105
	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
   106
	uint16_t	slu_mgmt_url_off;
10765
7ae75584baf6 6861519 stmfCreateLu() should allow caller to specify host id
John Forte <John.Forte@Sun.COM>
parents: 10725
diff changeset
   107
	uint32_t	slu_host_id;
9585
bf09620212ab 6795089 COMSTAR sbd lun provider should support PGR
tim szeto <Tim.Szeto@Sun.COM>
parents: 7836
diff changeset
   108
	char		slu_rev[4];
bf09620212ab 6795089 COMSTAR sbd lun provider should support PGR
tim szeto <Tim.Szeto@Sun.COM>
parents: 7836
diff changeset
   109
	char		slu_vid[8];
bf09620212ab 6795089 COMSTAR sbd lun provider should support PGR
tim szeto <Tim.Szeto@Sun.COM>
parents: 7836
diff changeset
   110
	char		slu_pid[16];
bf09620212ab 6795089 COMSTAR sbd lun provider should support PGR
tim szeto <Tim.Szeto@Sun.COM>
parents: 7836
diff changeset
   111
	uint8_t		slu_guid[16];
bf09620212ab 6795089 COMSTAR sbd lun provider should support PGR
tim szeto <Tim.Szeto@Sun.COM>
parents: 7836
diff changeset
   112
	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
   113
} 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
   114
11103
3b3f33a37cab 6894418 set interface for global logical unit property
John Forte <John.Forte@Sun.COM>
parents: 10765
diff changeset
   115
typedef struct sbd_global_props {
3b3f33a37cab 6894418 set interface for global logical unit property
John Forte <John.Forte@Sun.COM>
parents: 10765
diff changeset
   116
	uint32_t	mlu_struct_size;
3b3f33a37cab 6894418 set interface for global logical unit property
John Forte <John.Forte@Sun.COM>
parents: 10765
diff changeset
   117
	uint32_t	mlu_vid_valid:1,
3b3f33a37cab 6894418 set interface for global logical unit property
John Forte <John.Forte@Sun.COM>
parents: 10765
diff changeset
   118
			mlu_pid_valid:1,
3b3f33a37cab 6894418 set interface for global logical unit property
John Forte <John.Forte@Sun.COM>
parents: 10765
diff changeset
   119
			mlu_rev_valid:1,
3b3f33a37cab 6894418 set interface for global logical unit property
John Forte <John.Forte@Sun.COM>
parents: 10765
diff changeset
   120
			mlu_serial_valid:1,
3b3f33a37cab 6894418 set interface for global logical unit property
John Forte <John.Forte@Sun.COM>
parents: 10765
diff changeset
   121
			mlu_mgmt_url_valid:1,
3b3f33a37cab 6894418 set interface for global logical unit property
John Forte <John.Forte@Sun.COM>
parents: 10765
diff changeset
   122
			mlu_company_id_valid:1,
3b3f33a37cab 6894418 set interface for global logical unit property
John Forte <John.Forte@Sun.COM>
parents: 10765
diff changeset
   123
			mlu_host_id_valid:1;
3b3f33a37cab 6894418 set interface for global logical unit property
John Forte <John.Forte@Sun.COM>
parents: 10765
diff changeset
   124
	uint16_t	mlu_serial_off;
3b3f33a37cab 6894418 set interface for global logical unit property
John Forte <John.Forte@Sun.COM>
parents: 10765
diff changeset
   125
	uint8_t		mlu_serial_size;
3b3f33a37cab 6894418 set interface for global logical unit property
John Forte <John.Forte@Sun.COM>
parents: 10765
diff changeset
   126
	uint8_t		mlu_rsvd1;
3b3f33a37cab 6894418 set interface for global logical unit property
John Forte <John.Forte@Sun.COM>
parents: 10765
diff changeset
   127
	uint32_t	mlu_company_id;
3b3f33a37cab 6894418 set interface for global logical unit property
John Forte <John.Forte@Sun.COM>
parents: 10765
diff changeset
   128
	uint16_t	mlu_mgmt_url_off;
3b3f33a37cab 6894418 set interface for global logical unit property
John Forte <John.Forte@Sun.COM>
parents: 10765
diff changeset
   129
	uint16_t	rsvd1;
3b3f33a37cab 6894418 set interface for global logical unit property
John Forte <John.Forte@Sun.COM>
parents: 10765
diff changeset
   130
	uint32_t	mlu_host_id;
3b3f33a37cab 6894418 set interface for global logical unit property
John Forte <John.Forte@Sun.COM>
parents: 10765
diff changeset
   131
	uint32_t	mlu_buf_size_needed;
3b3f33a37cab 6894418 set interface for global logical unit property
John Forte <John.Forte@Sun.COM>
parents: 10765
diff changeset
   132
	char		mlu_rev[4];
3b3f33a37cab 6894418 set interface for global logical unit property
John Forte <John.Forte@Sun.COM>
parents: 10765
diff changeset
   133
	char		mlu_vid[8];
3b3f33a37cab 6894418 set interface for global logical unit property
John Forte <John.Forte@Sun.COM>
parents: 10765
diff changeset
   134
	char		mlu_pid[16];
3b3f33a37cab 6894418 set interface for global logical unit property
John Forte <John.Forte@Sun.COM>
parents: 10765
diff changeset
   135
	char		mlu_buf[8];	/* likely more than 8 */
3b3f33a37cab 6894418 set interface for global logical unit property
John Forte <John.Forte@Sun.COM>
parents: 10765
diff changeset
   136
} sbd_global_props_t;
3b3f33a37cab 6894418 set interface for global logical unit property
John Forte <John.Forte@Sun.COM>
parents: 10765
diff changeset
   137
10725
cd144ed668c5 PSARC/2009/465 COMSTAR ALUA active/standby support
John Forte <John.Forte@Sun.COM>
parents: 10113
diff changeset
   138
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
   139
	uint8_t		stlu_guid[16];
cd144ed668c5 PSARC/2009/465 COMSTAR ALUA active/standby support
John Forte <John.Forte@Sun.COM>
parents: 10113
diff changeset
   140
} sbd_set_lu_standby_t;
cd144ed668c5 PSARC/2009/465 COMSTAR ALUA active/standby support
John Forte <John.Forte@Sun.COM>
parents: 10113
diff changeset
   141
cd144ed668c5 PSARC/2009/465 COMSTAR ALUA active/standby support
John Forte <John.Forte@Sun.COM>
parents: 10113
diff changeset
   142
9585
bf09620212ab 6795089 COMSTAR sbd lun provider should support PGR
tim szeto <Tim.Szeto@Sun.COM>
parents: 7836
diff changeset
   143
typedef struct sbd_import_lu {
bf09620212ab 6795089 COMSTAR sbd lun provider should support PGR
tim szeto <Tim.Szeto@Sun.COM>
parents: 7836
diff changeset
   144
	uint32_t	ilu_struct_size;
bf09620212ab 6795089 COMSTAR sbd lun provider should support PGR
tim szeto <Tim.Szeto@Sun.COM>
parents: 7836
diff changeset
   145
	uint32_t	ilu_rsvd;
bf09620212ab 6795089 COMSTAR sbd lun provider should support PGR
tim szeto <Tim.Szeto@Sun.COM>
parents: 7836
diff changeset
   146
	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
   147
	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
   148
} sbd_import_lu_t;
7836
4e95154b5b7a 6745433 Merge NWS consolidation into OS/Net consolidation
John Forte <John.Forte@Sun.COM>
parents:
diff changeset
   149
9585
bf09620212ab 6795089 COMSTAR sbd lun provider should support PGR
tim szeto <Tim.Szeto@Sun.COM>
parents: 7836
diff changeset
   150
typedef struct sbd_modify_lu {
bf09620212ab 6795089 COMSTAR sbd lun provider should support PGR
tim szeto <Tim.Szeto@Sun.COM>
parents: 7836
diff changeset
   151
	uint32_t	mlu_struct_size;
bf09620212ab 6795089 COMSTAR sbd lun provider should support PGR
tim szeto <Tim.Szeto@Sun.COM>
parents: 7836
diff changeset
   152
	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
   153
			mlu_serial_valid:1,
bf09620212ab 6795089 COMSTAR sbd lun provider should support PGR
tim szeto <Tim.Szeto@Sun.COM>
parents: 7836
diff changeset
   154
			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
   155
			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
   156
			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
   157
			mlu_writeback_cache_disable:1,
bf09620212ab 6795089 COMSTAR sbd lun provider should support PGR
tim szeto <Tim.Szeto@Sun.COM>
parents: 7836
diff changeset
   158
			mlu_write_protected_valid:1,
bf09620212ab 6795089 COMSTAR sbd lun provider should support PGR
tim szeto <Tim.Szeto@Sun.COM>
parents: 7836
diff changeset
   159
			mlu_write_protected:1,
bf09620212ab 6795089 COMSTAR sbd lun provider should support PGR
tim szeto <Tim.Szeto@Sun.COM>
parents: 7836
diff changeset
   160
			mlu_by_guid:1,
10725
cd144ed668c5 PSARC/2009/465 COMSTAR ALUA active/standby support
John Forte <John.Forte@Sun.COM>
parents: 10113
diff changeset
   161
			mlu_by_fname:1,
cd144ed668c5 PSARC/2009/465 COMSTAR ALUA active/standby support
John Forte <John.Forte@Sun.COM>
parents: 10113
diff changeset
   162
			mlu_standby_valid:1,
cd144ed668c5 PSARC/2009/465 COMSTAR ALUA active/standby support
John Forte <John.Forte@Sun.COM>
parents: 10113
diff changeset
   163
			mlu_standby:1;
9585
bf09620212ab 6795089 COMSTAR sbd lun provider should support PGR
tim szeto <Tim.Szeto@Sun.COM>
parents: 7836
diff changeset
   164
	uint64_t	mlu_lu_size;
bf09620212ab 6795089 COMSTAR sbd lun provider should support PGR
tim szeto <Tim.Szeto@Sun.COM>
parents: 7836
diff changeset
   165
	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
   166
	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
   167
	uint16_t	mlu_serial_off;
bf09620212ab 6795089 COMSTAR sbd lun provider should support PGR
tim szeto <Tim.Szeto@Sun.COM>
parents: 7836
diff changeset
   168
	uint16_t	mlu_serial_size;
bf09620212ab 6795089 COMSTAR sbd lun provider should support PGR
tim szeto <Tim.Szeto@Sun.COM>
parents: 7836
diff changeset
   169
	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
   170
	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
   171
	uint32_t	mlu_rsvd2;
9585
bf09620212ab 6795089 COMSTAR sbd lun provider should support PGR
tim szeto <Tim.Szeto@Sun.COM>
parents: 7836
diff changeset
   172
	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
   173
	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
   174
} sbd_modify_lu_t;
bf09620212ab 6795089 COMSTAR sbd lun provider should support PGR
tim szeto <Tim.Szeto@Sun.COM>
parents: 7836
diff changeset
   175
bf09620212ab 6795089 COMSTAR sbd lun provider should support PGR
tim szeto <Tim.Szeto@Sun.COM>
parents: 7836
diff changeset
   176
typedef struct sbd_delete_lu {
bf09620212ab 6795089 COMSTAR sbd lun provider should support PGR
tim szeto <Tim.Szeto@Sun.COM>
parents: 7836
diff changeset
   177
	uint32_t	dlu_struct_size;
bf09620212ab 6795089 COMSTAR sbd lun provider should support PGR
tim szeto <Tim.Szeto@Sun.COM>
parents: 7836
diff changeset
   178
	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
   179
			dlu_by_meta_name:1;
bf09620212ab 6795089 COMSTAR sbd lun provider should support PGR
tim szeto <Tim.Szeto@Sun.COM>
parents: 7836
diff changeset
   180
	uint16_t	dlu_rsvd;
bf09620212ab 6795089 COMSTAR sbd lun provider should support PGR
tim szeto <Tim.Szeto@Sun.COM>
parents: 7836
diff changeset
   181
	uint8_t		dlu_guid[16];
bf09620212ab 6795089 COMSTAR sbd lun provider should support PGR
tim szeto <Tim.Szeto@Sun.COM>
parents: 7836
diff changeset
   182
	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
   183
} sbd_delete_lu_t;
7836
4e95154b5b7a 6745433 Merge NWS consolidation into OS/Net consolidation
John Forte <John.Forte@Sun.COM>
parents:
diff changeset
   184
10725
cd144ed668c5 PSARC/2009/465 COMSTAR ALUA active/standby support
John Forte <John.Forte@Sun.COM>
parents: 10113
diff changeset
   185
/*
cd144ed668c5 PSARC/2009/465 COMSTAR ALUA active/standby support
John Forte <John.Forte@Sun.COM>
parents: 10113
diff changeset
   186
 * sbd access states
cd144ed668c5 PSARC/2009/465 COMSTAR ALUA active/standby support
John Forte <John.Forte@Sun.COM>
parents: 10113
diff changeset
   187
 */
cd144ed668c5 PSARC/2009/465 COMSTAR ALUA active/standby support
John Forte <John.Forte@Sun.COM>
parents: 10113
diff changeset
   188
#define	SBD_LU_ACTIVE			1
cd144ed668c5 PSARC/2009/465 COMSTAR ALUA active/standby support
John Forte <John.Forte@Sun.COM>
parents: 10113
diff changeset
   189
#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
   190
#define	SBD_LU_STANDBY			3
cd144ed668c5 PSARC/2009/465 COMSTAR ALUA active/standby support
John Forte <John.Forte@Sun.COM>
parents: 10113
diff changeset
   191
#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
   192
9585
bf09620212ab 6795089 COMSTAR sbd lun provider should support PGR
tim szeto <Tim.Szeto@Sun.COM>
parents: 7836
diff changeset
   193
typedef struct sbd_lu_props {
bf09620212ab 6795089 COMSTAR sbd lun provider should support PGR
tim szeto <Tim.Szeto@Sun.COM>
parents: 7836
diff changeset
   194
	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
   195
			slp_separate_meta:1,
bf09620212ab 6795089 COMSTAR sbd lun provider should support PGR
tim szeto <Tim.Szeto@Sun.COM>
parents: 7836
diff changeset
   196
			slp_meta_fname_valid:1,
bf09620212ab 6795089 COMSTAR sbd lun provider should support PGR
tim szeto <Tim.Szeto@Sun.COM>
parents: 7836
diff changeset
   197
			slp_data_fname_valid:1,
bf09620212ab 6795089 COMSTAR sbd lun provider should support PGR
tim szeto <Tim.Szeto@Sun.COM>
parents: 7836
diff changeset
   198
			slp_zfs_meta:1,
bf09620212ab 6795089 COMSTAR sbd lun provider should support PGR
tim szeto <Tim.Szeto@Sun.COM>
parents: 7836
diff changeset
   199
			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
   200
			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
   201
			slp_lu_vid:1,
bf09620212ab 6795089 COMSTAR sbd lun provider should support PGR
tim szeto <Tim.Szeto@Sun.COM>
parents: 7836
diff changeset
   202
			slp_lu_pid:1,
bf09620212ab 6795089 COMSTAR sbd lun provider should support PGR
tim szeto <Tim.Szeto@Sun.COM>
parents: 7836
diff changeset
   203
			slp_lu_rev:1,
bf09620212ab 6795089 COMSTAR sbd lun provider should support PGR
tim szeto <Tim.Szeto@Sun.COM>
parents: 7836
diff changeset
   204
			slp_serial_valid:1,
bf09620212ab 6795089 COMSTAR sbd lun provider should support PGR
tim szeto <Tim.Szeto@Sun.COM>
parents: 7836
diff changeset
   205
			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
   206
			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
   207
			slp_write_protected:1;
bf09620212ab 6795089 COMSTAR sbd lun provider should support PGR
tim szeto <Tim.Szeto@Sun.COM>
parents: 7836
diff changeset
   208
	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
   209
	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
   210
	uint64_t	slp_lu_size;
bf09620212ab 6795089 COMSTAR sbd lun provider should support PGR
tim szeto <Tim.Szeto@Sun.COM>
parents: 7836
diff changeset
   211
	uint16_t	slp_serial_off;
bf09620212ab 6795089 COMSTAR sbd lun provider should support PGR
tim szeto <Tim.Szeto@Sun.COM>
parents: 7836
diff changeset
   212
	uint16_t	slp_blksize;
bf09620212ab 6795089 COMSTAR sbd lun provider should support PGR
tim szeto <Tim.Szeto@Sun.COM>
parents: 7836
diff changeset
   213
	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
   214
	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
   215
	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
   216
	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
   217
	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
   218
	char		slp_rev[4];
bf09620212ab 6795089 COMSTAR sbd lun provider should support PGR
tim szeto <Tim.Szeto@Sun.COM>
parents: 7836
diff changeset
   219
	char		slp_vid[8];
bf09620212ab 6795089 COMSTAR sbd lun provider should support PGR
tim szeto <Tim.Szeto@Sun.COM>
parents: 7836
diff changeset
   220
	char		slp_pid[16];
bf09620212ab 6795089 COMSTAR sbd lun provider should support PGR
tim szeto <Tim.Szeto@Sun.COM>
parents: 7836
diff changeset
   221
	uint8_t		slp_guid[16];
bf09620212ab 6795089 COMSTAR sbd lun provider should support PGR
tim szeto <Tim.Szeto@Sun.COM>
parents: 7836
diff changeset
   222
	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
   223
} sbd_lu_props_t;
7836
4e95154b5b7a 6745433 Merge NWS consolidation into OS/Net consolidation
John Forte <John.Forte@Sun.COM>
parents:
diff changeset
   224
4e95154b5b7a 6745433 Merge NWS consolidation into OS/Net consolidation
John Forte <John.Forte@Sun.COM>
parents:
diff changeset
   225
#ifdef	__cplusplus
4e95154b5b7a 6745433 Merge NWS consolidation into OS/Net consolidation
John Forte <John.Forte@Sun.COM>
parents:
diff changeset
   226
}
4e95154b5b7a 6745433 Merge NWS consolidation into OS/Net consolidation
John Forte <John.Forte@Sun.COM>
parents:
diff changeset
   227
#endif
4e95154b5b7a 6745433 Merge NWS consolidation into OS/Net consolidation
John Forte <John.Forte@Sun.COM>
parents:
diff changeset
   228
4e95154b5b7a 6745433 Merge NWS consolidation into OS/Net consolidation
John Forte <John.Forte@Sun.COM>
parents:
diff changeset
   229
#endif /* _STMF_SBD_IOCTL_H */