cmlb_impl.h (7f0b8309) | cmlb_impl.h (aa1b14e7) |
---|---|
1/* 2 * CDDL HEADER START 3 * 4 * The contents of this file are subject to the terms of the 5 * Common Development and Distribution License (the "License"). 6 * You may not use this file except in compliance with the License. 7 * 8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE --- 21 unchanged lines hidden (view full) --- 30#ifdef __cplusplus 31extern "C" { 32#endif 33 34#include <sys/cmlb.h> 35#include <sys/ddi.h> 36#include <sys/sunddi.h> 37 | 1/* 2 * CDDL HEADER START 3 * 4 * The contents of this file are subject to the terms of the 5 * Common Development and Distribution License (the "License"). 6 * You may not use this file except in compliance with the License. 7 * 8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE --- 21 unchanged lines hidden (view full) --- 30#ifdef __cplusplus 31extern "C" { 32#endif 33 34#include <sys/cmlb.h> 35#include <sys/ddi.h> 36#include <sys/sunddi.h> 37 |
38/* 39 * FDISK partitions - 4 primary and MAX_EXT_PARTS number of Extended 40 * Partitions. 41 */ 42#define FDISK_PARTS (FD_NUMPART + MAX_EXT_PARTS) 43 |
|
38#if defined(_SUNOS_VTOC_8) 39#define NSDMAP NDKMAP 40#elif defined(_SUNOS_VTOC_16) | 44#if defined(_SUNOS_VTOC_8) 45#define NSDMAP NDKMAP 46#elif defined(_SUNOS_VTOC_16) |
41#define NSDMAP (NDKMAP + FD_NUMPART + 1) | 47#define NSDMAP (NDKMAP + FDISK_PARTS + 1) |
42#else 43#error "No VTOC format defined." 44#endif 45 46#define MAXPART (NSDMAP + 1) 47#define WD_NODE 7 48 49 --- 56 unchanged lines hidden (view full) --- 106#define CMLB_OLDVTOC_LIMIT CMLB_1TB_BLOCKS 107 108/* 109 * fdisk partition mapping structure 110 */ 111struct fmap { 112 ulong_t fmap_start; /* starting block number */ 113 ulong_t fmap_nblk; /* number of blocks */ | 48#else 49#error "No VTOC format defined." 50#endif 51 52#define MAXPART (NSDMAP + 1) 53#define WD_NODE 7 54 55 --- 56 unchanged lines hidden (view full) --- 112#define CMLB_OLDVTOC_LIMIT CMLB_1TB_BLOCKS 113 114/* 115 * fdisk partition mapping structure 116 */ 117struct fmap { 118 ulong_t fmap_start; /* starting block number */ 119 ulong_t fmap_nblk; /* number of blocks */ |
120 uchar_t fmap_systid; /* systid of the partition */ |
|
114}; 115 116/* for cm_state */ 117typedef enum { 118 CMLB_INITED = 0, 119 CMLB_ATTACHED 120} cmlb_state_t; 121 --- 19 unchanged lines hidden (view full) --- 141 uint_t cl_solaris_offset; /* offset to Solaris part. */ 142 143 struct dk_map cl_map[MAXPART]; /* logical partitions */ 144 /* cylno is overloaded. used */ 145 /* for starting block for EFI */ 146 147 diskaddr_t cl_offset[MAXPART]; /* partition start blocks */ 148 | 121}; 122 123/* for cm_state */ 124typedef enum { 125 CMLB_INITED = 0, 126 CMLB_ATTACHED 127} cmlb_state_t; 128 --- 19 unchanged lines hidden (view full) --- 148 uint_t cl_solaris_offset; /* offset to Solaris part. */ 149 150 struct dk_map cl_map[MAXPART]; /* logical partitions */ 151 /* cylno is overloaded. used */ 152 /* for starting block for EFI */ 153 154 diskaddr_t cl_offset[MAXPART]; /* partition start blocks */ 155 |
149 struct fmap cl_fmap[FD_NUMPART]; /* fdisk partitions */ | 156 struct fmap cl_fmap[FDISK_PARTS]; /* fdisk partitions */ |
150 151 uchar_t cl_asciilabel[LEN_DKL_ASCII]; /* Disk ASCII label */ 152 153 /* 154 * This is the HBAs current notion of the geometry of the drive, 155 * for HBAs that support the "geometry" property. 156 */ 157 struct cmlb_geom cl_lgeom; --- 27 unchanged lines hidden (view full) --- 185 /* the following are passed in at attach time */ 186 boolean_t cl_is_removable; /* is removable */ 187 boolean_t cl_is_hotpluggable; /* is hotpluggable */ 188 int cl_alter_behavior; 189 char *cl_node_type; /* DDI_NT_... */ 190 int cl_device_type; /* DTYPE_DIRECT,.. */ 191 int cl_reserved; /* reserved efi partition # */ 192 cmlb_tg_ops_t *cmlb_tg_ops; | 157 158 uchar_t cl_asciilabel[LEN_DKL_ASCII]; /* Disk ASCII label */ 159 160 /* 161 * This is the HBAs current notion of the geometry of the drive, 162 * for HBAs that support the "geometry" property. 163 */ 164 struct cmlb_geom cl_lgeom; --- 27 unchanged lines hidden (view full) --- 192 /* the following are passed in at attach time */ 193 boolean_t cl_is_removable; /* is removable */ 194 boolean_t cl_is_hotpluggable; /* is hotpluggable */ 195 int cl_alter_behavior; 196 char *cl_node_type; /* DDI_NT_... */ 197 int cl_device_type; /* DTYPE_DIRECT,.. */ 198 int cl_reserved; /* reserved efi partition # */ 199 cmlb_tg_ops_t *cmlb_tg_ops; |
200#if defined(__i386) || defined(__amd64) 201 /* 202 * Flag indicating whether extended partition nodes should be created 203 * or not. Is set in cmlb_attach. After creating nodes in 204 * cmlb_read_fdisk, it will be unset. 205 */ 206 int cl_update_ext_minor_nodes; 207 int cl_logical_drive_count; 208#endif /* __i386 || __amd64 */ |
|
193 uint8_t cl_msglog_flag; /* used to enable/suppress */ 194 /* certain log messages */ 195} cmlb_lun_t; 196 197_NOTE(SCHEME_PROTECTS_DATA("stable data", cmlb_lun::cmlb_tg_ops)) 198_NOTE(SCHEME_PROTECTS_DATA("stable data", cmlb_lun::cl_devi)) 199_NOTE(SCHEME_PROTECTS_DATA("stable data", cmlb_lun::cl_is_removable)) 200_NOTE(SCHEME_PROTECTS_DATA("stable data", cmlb_lun::cl_is_hotpluggable)) --- 42 unchanged lines hidden --- | 209 uint8_t cl_msglog_flag; /* used to enable/suppress */ 210 /* certain log messages */ 211} cmlb_lun_t; 212 213_NOTE(SCHEME_PROTECTS_DATA("stable data", cmlb_lun::cmlb_tg_ops)) 214_NOTE(SCHEME_PROTECTS_DATA("stable data", cmlb_lun::cl_devi)) 215_NOTE(SCHEME_PROTECTS_DATA("stable data", cmlb_lun::cl_is_removable)) 216_NOTE(SCHEME_PROTECTS_DATA("stable data", cmlb_lun::cl_is_hotpluggable)) --- 42 unchanged lines hidden --- |