Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

scsi: core: Remove OSD include files

All code from which the OSD include files were included has been removed.
Hence also remove the include files themselves. See also commit
19fcae3d4f2d ("scsi: remove the SCSI OSD library").

Cc: Christoph Hellwig <hch@lst.de>
Cc: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>

authored by

Bart Van Assche and committed by
Martin K. Petersen
2e96fe92 c0327e67

-1427
-398
include/scsi/osd_attributes.h
··· 1 - /* SPDX-License-Identifier: GPL-2.0 */ 2 - #ifndef __OSD_ATTRIBUTES_H__ 3 - #define __OSD_ATTRIBUTES_H__ 4 - 5 - #include <scsi/osd_protocol.h> 6 - 7 - /* 8 - * Contains types and constants that define attribute pages and attribute 9 - * numbers and their data types. 10 - */ 11 - 12 - #define ATTR_SET(pg, id, l, ptr) \ 13 - { .attr_page = pg, .attr_id = id, .len = l, .val_ptr = ptr } 14 - 15 - #define ATTR_DEF(pg, id, l) ATTR_SET(pg, id, l, NULL) 16 - 17 - /* osd-r10 4.7.3 Attributes pages */ 18 - enum { 19 - OSD_APAGE_OBJECT_FIRST = 0x0, 20 - OSD_APAGE_OBJECT_DIRECTORY = 0, 21 - OSD_APAGE_OBJECT_INFORMATION = 1, 22 - OSD_APAGE_OBJECT_QUOTAS = 2, 23 - OSD_APAGE_OBJECT_TIMESTAMP = 3, 24 - OSD_APAGE_OBJECT_COLLECTIONS = 4, 25 - OSD_APAGE_OBJECT_SECURITY = 5, 26 - OSD_APAGE_OBJECT_LAST = 0x2fffffff, 27 - 28 - OSD_APAGE_PARTITION_FIRST = 0x30000000, 29 - OSD_APAGE_PARTITION_DIRECTORY = OSD_APAGE_PARTITION_FIRST + 0, 30 - OSD_APAGE_PARTITION_INFORMATION = OSD_APAGE_PARTITION_FIRST + 1, 31 - OSD_APAGE_PARTITION_QUOTAS = OSD_APAGE_PARTITION_FIRST + 2, 32 - OSD_APAGE_PARTITION_TIMESTAMP = OSD_APAGE_PARTITION_FIRST + 3, 33 - OSD_APAGE_PARTITION_ATTR_ACCESS = OSD_APAGE_PARTITION_FIRST + 4, 34 - OSD_APAGE_PARTITION_SECURITY = OSD_APAGE_PARTITION_FIRST + 5, 35 - OSD_APAGE_PARTITION_LAST = 0x5FFFFFFF, 36 - 37 - OSD_APAGE_COLLECTION_FIRST = 0x60000000, 38 - OSD_APAGE_COLLECTION_DIRECTORY = OSD_APAGE_COLLECTION_FIRST + 0, 39 - OSD_APAGE_COLLECTION_INFORMATION = OSD_APAGE_COLLECTION_FIRST + 1, 40 - OSD_APAGE_COLLECTION_TIMESTAMP = OSD_APAGE_COLLECTION_FIRST + 3, 41 - OSD_APAGE_COLLECTION_SECURITY = OSD_APAGE_COLLECTION_FIRST + 5, 42 - OSD_APAGE_COLLECTION_LAST = 0x8FFFFFFF, 43 - 44 - OSD_APAGE_ROOT_FIRST = 0x90000000, 45 - OSD_APAGE_ROOT_DIRECTORY = OSD_APAGE_ROOT_FIRST + 0, 46 - OSD_APAGE_ROOT_INFORMATION = OSD_APAGE_ROOT_FIRST + 1, 47 - OSD_APAGE_ROOT_QUOTAS = OSD_APAGE_ROOT_FIRST + 2, 48 - OSD_APAGE_ROOT_TIMESTAMP = OSD_APAGE_ROOT_FIRST + 3, 49 - OSD_APAGE_ROOT_SECURITY = OSD_APAGE_ROOT_FIRST + 5, 50 - OSD_APAGE_ROOT_LAST = 0xBFFFFFFF, 51 - 52 - OSD_APAGE_RESERVED_TYPE_FIRST = 0xC0000000, 53 - OSD_APAGE_RESERVED_TYPE_LAST = 0xEFFFFFFF, 54 - 55 - OSD_APAGE_COMMON_FIRST = 0xF0000000, 56 - OSD_APAGE_COMMON_LAST = 0xFFFFFFFD, 57 - 58 - OSD_APAGE_CURRENT_COMMAND = 0xFFFFFFFE, 59 - 60 - OSD_APAGE_REQUEST_ALL = 0xFFFFFFFF, 61 - }; 62 - 63 - /* subcategories of attr pages within each range above */ 64 - enum { 65 - OSD_APAGE_STD_FIRST = 0x0, 66 - OSD_APAGE_STD_DIRECTORY = 0, 67 - OSD_APAGE_STD_INFORMATION = 1, 68 - OSD_APAGE_STD_QUOTAS = 2, 69 - OSD_APAGE_STD_TIMESTAMP = 3, 70 - OSD_APAGE_STD_COLLECTIONS = 4, 71 - OSD_APAGE_STD_POLICY_SECURITY = 5, 72 - OSD_APAGE_STD_LAST = 0x0000007F, 73 - 74 - OSD_APAGE_RESERVED_FIRST = 0x00000080, 75 - OSD_APAGE_RESERVED_LAST = 0x00007FFF, 76 - 77 - OSD_APAGE_OTHER_STD_FIRST = 0x00008000, 78 - OSD_APAGE_OTHER_STD_LAST = 0x0000EFFF, 79 - 80 - OSD_APAGE_PUBLIC_FIRST = 0x0000F000, 81 - OSD_APAGE_PUBLIC_LAST = 0x0000FFFF, 82 - 83 - OSD_APAGE_APP_DEFINED_FIRST = 0x00010000, 84 - OSD_APAGE_APP_DEFINED_LAST = 0x1FFFFFFF, 85 - 86 - OSD_APAGE_VENDOR_SPECIFIC_FIRST = 0x20000000, 87 - OSD_APAGE_VENDOR_SPECIFIC_LAST = 0x2FFFFFFF, 88 - }; 89 - 90 - enum { 91 - OSD_ATTR_PAGE_IDENTIFICATION = 0, /* in all pages 40 bytes */ 92 - }; 93 - 94 - struct page_identification { 95 - u8 vendor_identification[8]; 96 - u8 page_identification[32]; 97 - } __packed; 98 - 99 - struct osd_attr_page_header { 100 - __be32 page_number; 101 - __be32 page_length; 102 - } __packed; 103 - 104 - /* 7.1.2.8 Root Information attributes page (OSD_APAGE_ROOT_INFORMATION) */ 105 - enum { 106 - OSD_ATTR_RI_OSD_SYSTEM_ID = 0x3, /* 20 */ 107 - OSD_ATTR_RI_VENDOR_IDENTIFICATION = 0x4, /* 8 */ 108 - OSD_ATTR_RI_PRODUCT_IDENTIFICATION = 0x5, /* 16 */ 109 - OSD_ATTR_RI_PRODUCT_MODEL = 0x6, /* 32 */ 110 - OSD_ATTR_RI_PRODUCT_REVISION_LEVEL = 0x7, /* 4 */ 111 - OSD_ATTR_RI_PRODUCT_SERIAL_NUMBER = 0x8, /* variable */ 112 - OSD_ATTR_RI_OSD_NAME = 0x9, /* variable */ 113 - OSD_ATTR_RI_MAX_CDB_CONTINUATION_LEN = 0xA, /* 4 */ 114 - OSD_ATTR_RI_TOTAL_CAPACITY = 0x80, /* 8 */ 115 - OSD_ATTR_RI_USED_CAPACITY = 0x81, /* 8 */ 116 - OSD_ATTR_RI_NUMBER_OF_PARTITIONS = 0xC0, /* 8 */ 117 - OSD_ATTR_RI_CLOCK = 0x100, /* 6 */ 118 - OARI_DEFAULT_ISOLATION_METHOD = 0X110, /* 1 */ 119 - OARI_SUPPORTED_ISOLATION_METHODS = 0X111, /* 32 */ 120 - 121 - OARI_DATA_ATOMICITY_GUARANTEE = 0X120, /* 8 */ 122 - OARI_DATA_ATOMICITY_ALIGNMENT = 0X121, /* 8 */ 123 - OARI_ATTRIBUTES_ATOMICITY_GUARANTEE = 0X122, /* 8 */ 124 - OARI_DATA_ATTRIBUTES_ATOMICITY_MULTIPLIER = 0X123, /* 1 */ 125 - 126 - OARI_MAXIMUM_SNAPSHOTS_COUNT = 0X1C1, /* 0 or 4 */ 127 - OARI_MAXIMUM_CLONES_COUNT = 0X1C2, /* 0 or 4 */ 128 - OARI_MAXIMUM_BRANCH_DEPTH = 0X1CC, /* 0 or 4 */ 129 - OARI_SUPPORTED_OBJECT_DUPLICATION_METHOD_FIRST = 0X200, /* 0 or 4 */ 130 - OARI_SUPPORTED_OBJECT_DUPLICATION_METHOD_LAST = 0X2ff, /* 0 or 4 */ 131 - OARI_SUPPORTED_TIME_OF_DUPLICATION_METHOD_FIRST = 0X300, /* 0 or 4 */ 132 - OARI_SUPPORTED_TIME_OF_DUPLICATION_METHOD_LAST = 0X30F, /* 0 or 4 */ 133 - OARI_SUPPORT_FOR_DUPLICATED_OBJECT_FREEZING = 0X310, /* 0 or 4 */ 134 - OARI_SUPPORT_FOR_SNAPSHOT_REFRESHING = 0X311, /* 0 or 1 */ 135 - OARI_SUPPORTED_CDB_CONTINUATION_DESC_TYPE_FIRST = 0X7000001,/* 0 or 4 */ 136 - OARI_SUPPORTED_CDB_CONTINUATION_DESC_TYPE_LAST = 0X700FFFF,/* 0 or 4 */ 137 - }; 138 - /* Root_Information_attributes_page does not have a get_page structure */ 139 - 140 - /* 7.1.2.9 Partition Information attributes page 141 - * (OSD_APAGE_PARTITION_INFORMATION) 142 - */ 143 - enum { 144 - OSD_ATTR_PI_PARTITION_ID = 0x1, /* 8 */ 145 - OSD_ATTR_PI_USERNAME = 0x9, /* variable */ 146 - OSD_ATTR_PI_USED_CAPACITY = 0x81, /* 8 */ 147 - OSD_ATTR_PI_USED_CAPACITY_INCREMENT = 0x84, /* 0 or 8 */ 148 - OSD_ATTR_PI_NUMBER_OF_OBJECTS = 0xC1, /* 8 */ 149 - 150 - OSD_ATTR_PI_ACTUAL_DATA_SPACE = 0xD1, /* 0 or 8 */ 151 - OSD_ATTR_PI_RESERVED_DATA_SPACE = 0xD2, /* 0 or 8 */ 152 - OSD_ATTR_PI_DEFAULT_SNAPSHOT_DUPLICATION_METHOD = 0x200,/* 0 or 4 */ 153 - OSD_ATTR_PI_DEFAULT_CLONE_DUPLICATION_METHOD = 0x201,/* 0 or 4 */ 154 - OSD_ATTR_PI_DEFAULT_SP_TIME_OF_DUPLICATION = 0x300,/* 0 or 4 */ 155 - OSD_ATTR_PI_DEFAULT_CLONE_TIME_OF_DUPLICATION = 0x301,/* 0 or 4 */ 156 - }; 157 - /* Partition Information attributes page does not have a get_page structure */ 158 - 159 - /* 7.1.2.10 Collection Information attributes page 160 - * (OSD_APAGE_COLLECTION_INFORMATION) 161 - */ 162 - enum { 163 - OSD_ATTR_CI_PARTITION_ID = 0x1, /* 8 */ 164 - OSD_ATTR_CI_COLLECTION_OBJECT_ID = 0x2, /* 8 */ 165 - OSD_ATTR_CI_USERNAME = 0x9, /* variable */ 166 - OSD_ATTR_CI_COLLECTION_TYPE = 0xA, /* 1 */ 167 - OSD_ATTR_CI_USED_CAPACITY = 0x81, /* 8 */ 168 - }; 169 - /* Collection Information attributes page does not have a get_page structure */ 170 - 171 - /* 7.1.2.11 User Object Information attributes page 172 - * (OSD_APAGE_OBJECT_INFORMATION) 173 - */ 174 - enum { 175 - OSD_ATTR_OI_PARTITION_ID = 0x1, /* 8 */ 176 - OSD_ATTR_OI_OBJECT_ID = 0x2, /* 8 */ 177 - OSD_ATTR_OI_USERNAME = 0x9, /* variable */ 178 - OSD_ATTR_OI_USED_CAPACITY = 0x81, /* 8 */ 179 - OSD_ATTR_OI_LOGICAL_LENGTH = 0x82, /* 8 */ 180 - SD_ATTR_OI_ACTUAL_DATA_SPACE = 0XD1, /* 0 OR 8 */ 181 - SD_ATTR_OI_RESERVED_DATA_SPACE = 0XD2, /* 0 OR 8 */ 182 - }; 183 - /* Object Information attributes page does not have a get_page structure */ 184 - 185 - /* 7.1.2.12 Root Quotas attributes page (OSD_APAGE_ROOT_QUOTAS) */ 186 - enum { 187 - OSD_ATTR_RQ_DEFAULT_MAXIMUM_USER_OBJECT_LENGTH = 0x1, /* 8 */ 188 - OSD_ATTR_RQ_PARTITION_CAPACITY_QUOTA = 0x10001, /* 8 */ 189 - OSD_ATTR_RQ_PARTITION_OBJECT_COUNT = 0x10002, /* 8 */ 190 - OSD_ATTR_RQ_PARTITION_COLLECTIONS_PER_USER_OBJECT = 0x10081, /* 4 */ 191 - OSD_ATTR_RQ_PARTITION_COUNT = 0x20002, /* 8 */ 192 - }; 193 - 194 - struct Root_Quotas_attributes_page { 195 - struct osd_attr_page_header hdr; /* id=R+2, size=0x24 */ 196 - __be64 default_maximum_user_object_length; 197 - __be64 partition_capacity_quota; 198 - __be64 partition_object_count; 199 - __be64 partition_collections_per_user_object; 200 - __be64 partition_count; 201 - } __packed; 202 - 203 - /* 7.1.2.13 Partition Quotas attributes page (OSD_APAGE_PARTITION_QUOTAS)*/ 204 - enum { 205 - OSD_ATTR_PQ_DEFAULT_MAXIMUM_USER_OBJECT_LENGTH = 0x1, /* 8 */ 206 - OSD_ATTR_PQ_CAPACITY_QUOTA = 0x10001, /* 8 */ 207 - OSD_ATTR_PQ_OBJECT_COUNT = 0x10002, /* 8 */ 208 - OSD_ATTR_PQ_COLLECTIONS_PER_USER_OBJECT = 0x10081, /* 4 */ 209 - }; 210 - 211 - struct Partition_Quotas_attributes_page { 212 - struct osd_attr_page_header hdr; /* id=P+2, size=0x1C */ 213 - __be64 default_maximum_user_object_length; 214 - __be64 capacity_quota; 215 - __be64 object_count; 216 - __be64 collections_per_user_object; 217 - } __packed; 218 - 219 - /* 7.1.2.14 User Object Quotas attributes page (OSD_APAGE_OBJECT_QUOTAS) */ 220 - enum { 221 - OSD_ATTR_OQ_MAXIMUM_LENGTH = 0x1, /* 8 */ 222 - }; 223 - 224 - struct Object_Quotas_attributes_page { 225 - struct osd_attr_page_header hdr; /* id=U+2, size=0x8 */ 226 - __be64 maximum_length; 227 - } __packed; 228 - 229 - /* 7.1.2.15 Root Timestamps attributes page (OSD_APAGE_ROOT_TIMESTAMP) */ 230 - enum { 231 - OSD_ATTR_RT_ATTRIBUTES_ACCESSED_TIME = 0x2, /* 6 */ 232 - OSD_ATTR_RT_ATTRIBUTES_MODIFIED_TIME = 0x3, /* 6 */ 233 - OSD_ATTR_RT_TIMESTAMP_BYPASS = 0xFFFFFFFE, /* 1 */ 234 - }; 235 - 236 - struct root_timestamps_attributes_page { 237 - struct osd_attr_page_header hdr; /* id=R+3, size=0xD */ 238 - struct osd_timestamp attributes_accessed_time; 239 - struct osd_timestamp attributes_modified_time; 240 - u8 timestamp_bypass; 241 - } __packed; 242 - 243 - /* 7.1.2.16 Partition Timestamps attributes page 244 - * (OSD_APAGE_PARTITION_TIMESTAMP) 245 - */ 246 - enum { 247 - OSD_ATTR_PT_CREATED_TIME = 0x1, /* 6 */ 248 - OSD_ATTR_PT_ATTRIBUTES_ACCESSED_TIME = 0x2, /* 6 */ 249 - OSD_ATTR_PT_ATTRIBUTES_MODIFIED_TIME = 0x3, /* 6 */ 250 - OSD_ATTR_PT_DATA_ACCESSED_TIME = 0x4, /* 6 */ 251 - OSD_ATTR_PT_DATA_MODIFIED_TIME = 0x5, /* 6 */ 252 - OSD_ATTR_PT_TIMESTAMP_BYPASS = 0xFFFFFFFE, /* 1 */ 253 - }; 254 - 255 - struct partition_timestamps_attributes_page { 256 - struct osd_attr_page_header hdr; /* id=P+3, size=0x1F */ 257 - struct osd_timestamp created_time; 258 - struct osd_timestamp attributes_accessed_time; 259 - struct osd_timestamp attributes_modified_time; 260 - struct osd_timestamp data_accessed_time; 261 - struct osd_timestamp data_modified_time; 262 - u8 timestamp_bypass; 263 - } __packed; 264 - 265 - /* 7.1.2.17/18 Collection/Object Timestamps attributes page 266 - * (OSD_APAGE_COLLECTION_TIMESTAMP/OSD_APAGE_OBJECT_TIMESTAMP) 267 - */ 268 - enum { 269 - OSD_ATTR_OT_CREATED_TIME = 0x1, /* 6 */ 270 - OSD_ATTR_OT_ATTRIBUTES_ACCESSED_TIME = 0x2, /* 6 */ 271 - OSD_ATTR_OT_ATTRIBUTES_MODIFIED_TIME = 0x3, /* 6 */ 272 - OSD_ATTR_OT_DATA_ACCESSED_TIME = 0x4, /* 6 */ 273 - OSD_ATTR_OT_DATA_MODIFIED_TIME = 0x5, /* 6 */ 274 - }; 275 - 276 - /* same for collection */ 277 - struct object_timestamps_attributes_page { 278 - struct osd_attr_page_header hdr; /* id=C+3/3, size=0x1E */ 279 - struct osd_timestamp created_time; 280 - struct osd_timestamp attributes_accessed_time; 281 - struct osd_timestamp attributes_modified_time; 282 - struct osd_timestamp data_accessed_time; 283 - struct osd_timestamp data_modified_time; 284 - } __packed; 285 - 286 - /* OSD2r05: 7.1.3.19 Attributes Access attributes page 287 - * (OSD_APAGE_PARTITION_ATTR_ACCESS) 288 - * 289 - * each attribute is of the form below. Total array length is deduced 290 - * from the attribute's length 291 - * (See allowed_attributes_access of the struct osd_cap_object_descriptor) 292 - */ 293 - struct attributes_access_attr { 294 - struct osd_attributes_list_attrid attr_list[0]; 295 - } __packed; 296 - 297 - /* OSD2r05: 7.1.2.21 Collections attributes page */ 298 - /* TBD */ 299 - 300 - /* 7.1.2.20 Root Policy/Security attributes page (OSD_APAGE_ROOT_SECURITY) */ 301 - enum { 302 - OSD_ATTR_RS_DEFAULT_SECURITY_METHOD = 0x1, /* 1 */ 303 - OSD_ATTR_RS_OLDEST_VALID_NONCE_LIMIT = 0x2, /* 6 */ 304 - OSD_ATTR_RS_NEWEST_VALID_NONCE_LIMIT = 0x3, /* 6 */ 305 - OSD_ATTR_RS_PARTITION_DEFAULT_SECURITY_METHOD = 0x6, /* 1 */ 306 - OSD_ATTR_RS_SUPPORTED_SECURITY_METHODS = 0x7, /* 2 */ 307 - OSD_ATTR_RS_ADJUSTABLE_CLOCK = 0x9, /* 6 */ 308 - OSD_ATTR_RS_MASTER_KEY_IDENTIFIER = 0x7FFD, /* 0 or 7 */ 309 - OSD_ATTR_RS_ROOT_KEY_IDENTIFIER = 0x7FFE, /* 0 or 7 */ 310 - OSD_ATTR_RS_SUPPORTED_INTEGRITY_ALGORITHM_0 = 0x80000000,/* 1,(x16)*/ 311 - OSD_ATTR_RS_SUPPORTED_DH_GROUP_0 = 0x80000010,/* 1,(x16)*/ 312 - }; 313 - 314 - struct root_security_attributes_page { 315 - struct osd_attr_page_header hdr; /* id=R+5, size=0x3F */ 316 - u8 default_security_method; 317 - u8 partition_default_security_method; 318 - __be16 supported_security_methods; 319 - u8 mki_valid_rki_valid; 320 - struct osd_timestamp oldest_valid_nonce_limit; 321 - struct osd_timestamp newest_valid_nonce_limit; 322 - struct osd_timestamp adjustable_clock; 323 - u8 master_key_identifier[32-25]; 324 - u8 root_key_identifier[39-32]; 325 - u8 supported_integrity_algorithm[16]; 326 - u8 supported_dh_group[16]; 327 - } __packed; 328 - 329 - /* 7.1.2.21 Partition Policy/Security attributes page 330 - * (OSD_APAGE_PARTITION_SECURITY) 331 - */ 332 - enum { 333 - OSD_ATTR_PS_DEFAULT_SECURITY_METHOD = 0x1, /* 1 */ 334 - OSD_ATTR_PS_OLDEST_VALID_NONCE = 0x2, /* 6 */ 335 - OSD_ATTR_PS_NEWEST_VALID_NONCE = 0x3, /* 6 */ 336 - OSD_ATTR_PS_REQUEST_NONCE_LIST_DEPTH = 0x4, /* 2 */ 337 - OSD_ATTR_PS_FROZEN_WORKING_KEY_BIT_MASK = 0x5, /* 2 */ 338 - OSD_ATTR_PS_PARTITION_KEY_IDENTIFIER = 0x7FFF, /* 0 or 7 */ 339 - OSD_ATTR_PS_WORKING_KEY_IDENTIFIER_FIRST = 0x8000, /* 0 or 7 */ 340 - OSD_ATTR_PS_WORKING_KEY_IDENTIFIER_LAST = 0x800F, /* 0 or 7 */ 341 - OSD_ATTR_PS_POLICY_ACCESS_TAG = 0x40000001, /* 4 */ 342 - OSD_ATTR_PS_USER_OBJECT_POLICY_ACCESS_TAG = 0x40000002, /* 4 */ 343 - }; 344 - 345 - struct partition_security_attributes_page { 346 - struct osd_attr_page_header hdr; /* id=p+5, size=0x8f */ 347 - u8 reserved[3]; 348 - u8 default_security_method; 349 - struct osd_timestamp oldest_valid_nonce; 350 - struct osd_timestamp newest_valid_nonce; 351 - __be16 request_nonce_list_depth; 352 - __be16 frozen_working_key_bit_mask; 353 - __be32 policy_access_tag; 354 - __be32 user_object_policy_access_tag; 355 - u8 pki_valid; 356 - __be16 wki_00_0f_vld; 357 - struct osd_key_identifier partition_key_identifier; 358 - struct osd_key_identifier working_key_identifiers[16]; 359 - } __packed; 360 - 361 - /* 7.1.2.22/23 Collection/Object Policy-Security attributes page 362 - * (OSD_APAGE_COLLECTION_SECURITY/OSD_APAGE_OBJECT_SECURITY) 363 - */ 364 - enum { 365 - OSD_ATTR_OS_POLICY_ACCESS_TAG = 0x40000001, /* 4 */ 366 - }; 367 - 368 - struct object_security_attributes_page { 369 - struct osd_attr_page_header hdr; /* id=C+5/5, size=4 */ 370 - __be32 policy_access_tag; 371 - } __packed; 372 - 373 - /* OSD2r05: 7.1.3.31 Current Command attributes page 374 - * (OSD_APAGE_CURRENT_COMMAND) 375 - */ 376 - enum { 377 - OSD_ATTR_CC_RESPONSE_INTEGRITY_CHECK_VALUE = 0x1, /* 32 */ 378 - OSD_ATTR_CC_OBJECT_TYPE = 0x2, /* 1 */ 379 - OSD_ATTR_CC_PARTITION_ID = 0x3, /* 8 */ 380 - OSD_ATTR_CC_OBJECT_ID = 0x4, /* 8 */ 381 - OSD_ATTR_CC_STARTING_BYTE_ADDRESS_OF_APPEND = 0x5, /* 8 */ 382 - OSD_ATTR_CC_CHANGE_IN_USED_CAPACITY = 0x6, /* 8 */ 383 - }; 384 - 385 - /*TBD: osdv1_current_command_attributes_page */ 386 - 387 - struct osdv2_current_command_attributes_page { 388 - struct osd_attr_page_header hdr; /* id=0xFFFFFFFE, size=0x44 */ 389 - u8 response_integrity_check_value[OSD_CRYPTO_KEYID_SIZE]; 390 - u8 object_type; 391 - u8 reserved[3]; 392 - __be64 partition_id; 393 - __be64 object_id; 394 - __be64 starting_byte_address_of_append; 395 - __be64 change_in_used_capacity; 396 - }; 397 - 398 - #endif /*ndef __OSD_ATTRIBUTES_H__*/
-676
include/scsi/osd_protocol.h
··· 1 - /* 2 - * osd_protocol.h - OSD T10 standard C definitions. 3 - * 4 - * Copyright (C) 2008 Panasas Inc. All rights reserved. 5 - * 6 - * Authors: 7 - * Boaz Harrosh <ooo@electrozaur.com> 8 - * Benny Halevy <bhalevy@panasas.com> 9 - * 10 - * This program is free software; you can redistribute it and/or modify 11 - * it under the terms of the GNU General Public License version 2 12 - * 13 - * This file contains types and constants that are defined by the protocol 14 - * Note: All names and symbols are taken from the OSD standard's text. 15 - */ 16 - #ifndef __OSD_PROTOCOL_H__ 17 - #define __OSD_PROTOCOL_H__ 18 - 19 - #include <linux/types.h> 20 - #include <linux/kernel.h> 21 - #include <asm/unaligned.h> 22 - #include <scsi/scsi.h> 23 - 24 - enum { 25 - OSDv1_ADDITIONAL_CDB_LENGTH = 192, 26 - OSDv1_TOTAL_CDB_LEN = OSDv1_ADDITIONAL_CDB_LENGTH + 8, 27 - OSDv1_CAP_LEN = 80, 28 - 29 - /* Latest supported version */ 30 - OSDv2_ADDITIONAL_CDB_LENGTH = 228, 31 - OSD_ADDITIONAL_CDB_LENGTH = 32 - OSDv2_ADDITIONAL_CDB_LENGTH, 33 - OSD_TOTAL_CDB_LEN = OSD_ADDITIONAL_CDB_LENGTH + 8, 34 - OSD_CAP_LEN = 104, 35 - 36 - OSD_SYSTEMID_LEN = 20, 37 - OSDv1_CRYPTO_KEYID_SIZE = 20, 38 - OSDv2_CRYPTO_KEYID_SIZE = 32, 39 - OSD_CRYPTO_KEYID_SIZE = OSDv2_CRYPTO_KEYID_SIZE, 40 - OSD_CRYPTO_SEED_SIZE = 4, 41 - OSD_CRYPTO_NONCE_SIZE = 12, 42 - OSD_MAX_SENSE_LEN = 252, /* from SPC-3 */ 43 - 44 - OSD_PARTITION_FIRST_ID = 0x10000, 45 - OSD_OBJECT_FIRST_ID = 0x10000, 46 - }; 47 - 48 - /* (osd-r10 5.2.4) 49 - * osd2r03: 5.2.3 Caching control bits 50 - */ 51 - enum osd_options_byte { 52 - OSD_CDB_FUA = 0x08, /* Force Unit Access */ 53 - OSD_CDB_DPO = 0x10, /* Disable Page Out */ 54 - }; 55 - 56 - /* 57 - * osd2r03: 5.2.5 Isolation. 58 - * First 3 bits, V2-only. 59 - * Also for attr 110h "default isolation method" at Root Information page 60 - */ 61 - enum osd_options_byte_isolation { 62 - OSD_ISOLATION_DEFAULT = 0, 63 - OSD_ISOLATION_NONE = 1, 64 - OSD_ISOLATION_STRICT = 2, 65 - OSD_ISOLATION_RANGE = 4, 66 - OSD_ISOLATION_FUNCTIONAL = 5, 67 - OSD_ISOLATION_VENDOR = 7, 68 - }; 69 - 70 - /* (osd-r10: 6.7) 71 - * osd2r03: 6.8 FLUSH, FLUSH COLLECTION, FLUSH OSD, FLUSH PARTITION 72 - */ 73 - enum osd_options_flush_scope_values { 74 - OSD_CDB_FLUSH_ALL = 0, 75 - OSD_CDB_FLUSH_ATTR_ONLY = 1, 76 - 77 - OSD_CDB_FLUSH_ALL_RECURSIVE = 2, 78 - /* V2-only */ 79 - OSD_CDB_FLUSH_ALL_RANGE = 2, 80 - }; 81 - 82 - /* osd2r03: 5.2.10 Timestamps control */ 83 - enum { 84 - OSD_CDB_NORMAL_TIMESTAMPS = 0, 85 - OSD_CDB_BYPASS_TIMESTAMPS = 0x7f, 86 - }; 87 - 88 - /* (osd-r10: 5.2.2.1) 89 - * osd2r03: 5.2.4.1 Get and set attributes CDB format selection 90 - * 2 bits at second nibble of command_specific_options byte 91 - */ 92 - enum osd_attributes_mode { 93 - /* V2-only */ 94 - OSD_CDB_SET_ONE_ATTR = 0x10, 95 - 96 - OSD_CDB_GET_ATTR_PAGE_SET_ONE = 0x20, 97 - OSD_CDB_GET_SET_ATTR_LISTS = 0x30, 98 - 99 - OSD_CDB_GET_SET_ATTR_MASK = 0x30, 100 - }; 101 - 102 - /* (osd-r10: 4.12.5) 103 - * osd2r03: 4.14.5 Data-In and Data-Out buffer offsets 104 - * byte offset = mantissa * (2^(exponent+8)) 105 - * struct { 106 - * unsigned mantissa: 28; 107 - * int exponent: 04; 108 - * } 109 - */ 110 - typedef __be32 osd_cdb_offset; 111 - 112 - enum { 113 - OSD_OFFSET_UNUSED = 0xFFFFFFFF, 114 - OSD_OFFSET_MAX_BITS = 28, 115 - 116 - OSDv1_OFFSET_MIN_SHIFT = 8, 117 - OSD_OFFSET_MIN_SHIFT = 3, 118 - OSD_OFFSET_MAX_SHIFT = 16, 119 - }; 120 - 121 - /* Return the smallest allowed encoded offset that contains @offset. 122 - * 123 - * The actual encoded offset returned is @offset + *padding. 124 - * (up to max_shift, non-inclusive) 125 - */ 126 - osd_cdb_offset __osd_encode_offset(u64 offset, unsigned *padding, 127 - int min_shift, int max_shift); 128 - 129 - /* Minimum alignment is 256 bytes 130 - * Note: Seems from std v1 that exponent can be from 0+8 to 0xE+8 (inclusive) 131 - * which is 8 to 23 but IBM code restricts it to 16, so be it. 132 - */ 133 - static inline osd_cdb_offset osd_encode_offset_v1(u64 offset, unsigned *padding) 134 - { 135 - return __osd_encode_offset(offset, padding, 136 - OSDv1_OFFSET_MIN_SHIFT, OSD_OFFSET_MAX_SHIFT); 137 - } 138 - 139 - /* Minimum 8 bytes alignment 140 - * Same as v1 but since exponent can be signed than a less than 141 - * 256 alignment can be reached with small offsets (<2GB) 142 - */ 143 - static inline osd_cdb_offset osd_encode_offset_v2(u64 offset, unsigned *padding) 144 - { 145 - return __osd_encode_offset(offset, padding, 146 - OSD_OFFSET_MIN_SHIFT, OSD_OFFSET_MAX_SHIFT); 147 - } 148 - 149 - /* osd2r03: 5.2.1 Overview */ 150 - struct osd_cdb_head { 151 - struct scsi_varlen_cdb_hdr varlen_cdb; 152 - /*10*/ u8 options; 153 - u8 command_specific_options; 154 - u8 timestamp_control; 155 - /*13*/ u8 reserved1[3]; 156 - /*16*/ __be64 partition; 157 - /*24*/ __be64 object; 158 - /*32*/ union { /* V1 vs V2 alignment differences */ 159 - struct __osdv1_cdb_addr_len { 160 - /*32*/ __be32 list_identifier;/* Rarely used */ 161 - /*36*/ __be64 length; 162 - /*44*/ __be64 start_address; 163 - } __packed v1; 164 - 165 - struct __osdv2_cdb_addr_len { 166 - /* called allocation_length in some commands */ 167 - /*32*/ __be64 length; 168 - /*40*/ __be64 start_address; 169 - union { 170 - /*48*/ __be32 list_identifier;/* Rarely used */ 171 - /* OSD2r05 5.2.5 CDB continuation length */ 172 - /*48*/ __be32 cdb_continuation_length; 173 - }; 174 - } __packed v2; 175 - }; 176 - /*52*/ union { /* selected attributes mode Page/List/Single */ 177 - struct osd_attributes_page_mode { 178 - /*52*/ __be32 get_attr_page; 179 - /*56*/ __be32 get_attr_alloc_length; 180 - /*60*/ osd_cdb_offset get_attr_offset; 181 - 182 - /*64*/ __be32 set_attr_page; 183 - /*68*/ __be32 set_attr_id; 184 - /*72*/ __be32 set_attr_length; 185 - /*76*/ osd_cdb_offset set_attr_offset; 186 - /*80*/ } __packed attrs_page; 187 - 188 - struct osd_attributes_list_mode { 189 - /*52*/ __be32 get_attr_desc_bytes; 190 - /*56*/ osd_cdb_offset get_attr_desc_offset; 191 - 192 - /*60*/ __be32 get_attr_alloc_length; 193 - /*64*/ osd_cdb_offset get_attr_offset; 194 - 195 - /*68*/ __be32 set_attr_bytes; 196 - /*72*/ osd_cdb_offset set_attr_offset; 197 - __be32 not_used; 198 - /*80*/ } __packed attrs_list; 199 - 200 - /* osd2r03:5.2.4.2 Set one attribute value using CDB fields */ 201 - struct osd_attributes_cdb_mode { 202 - /*52*/ __be32 set_attr_page; 203 - /*56*/ __be32 set_attr_id; 204 - /*60*/ __be16 set_attr_len; 205 - /*62*/ u8 set_attr_val[18]; 206 - /*80*/ } __packed attrs_cdb; 207 - /*52*/ u8 get_set_attributes_parameters[28]; 208 - }; 209 - } __packed; 210 - /*80*/ 211 - 212 - /*160 v1*/ 213 - struct osdv1_security_parameters { 214 - /*160*/u8 integrity_check_value[OSDv1_CRYPTO_KEYID_SIZE]; 215 - /*180*/u8 request_nonce[OSD_CRYPTO_NONCE_SIZE]; 216 - /*192*/osd_cdb_offset data_in_integrity_check_offset; 217 - /*196*/osd_cdb_offset data_out_integrity_check_offset; 218 - } __packed; 219 - /*200 v1*/ 220 - 221 - /*184 v2*/ 222 - struct osdv2_security_parameters { 223 - /*184*/u8 integrity_check_value[OSDv2_CRYPTO_KEYID_SIZE]; 224 - /*216*/u8 request_nonce[OSD_CRYPTO_NONCE_SIZE]; 225 - /*228*/osd_cdb_offset data_in_integrity_check_offset; 226 - /*232*/osd_cdb_offset data_out_integrity_check_offset; 227 - } __packed; 228 - /*236 v2*/ 229 - 230 - struct osd_security_parameters { 231 - union { 232 - struct osdv1_security_parameters v1; 233 - struct osdv2_security_parameters v2; 234 - }; 235 - }; 236 - 237 - struct osdv1_cdb { 238 - struct osd_cdb_head h; 239 - u8 caps[OSDv1_CAP_LEN]; 240 - struct osdv1_security_parameters sec_params; 241 - } __packed; 242 - 243 - struct osdv2_cdb { 244 - struct osd_cdb_head h; 245 - u8 caps[OSD_CAP_LEN]; 246 - struct osdv2_security_parameters sec_params; 247 - } __packed; 248 - 249 - struct osd_cdb { 250 - union { 251 - struct osdv1_cdb v1; 252 - struct osdv2_cdb v2; 253 - u8 buff[OSD_TOTAL_CDB_LEN]; 254 - }; 255 - } __packed; 256 - 257 - static inline struct osd_cdb_head *osd_cdb_head(struct osd_cdb *ocdb) 258 - { 259 - return (struct osd_cdb_head *)ocdb->buff; 260 - } 261 - 262 - /* define both version actions 263 - * Ex name = FORMAT_OSD we have OSD_ACT_FORMAT_OSD && OSDv1_ACT_FORMAT_OSD 264 - */ 265 - #define OSD_ACT___(Name, Num) \ 266 - OSD_ACT_##Name = cpu_to_be16(0x8880 + Num), \ 267 - OSDv1_ACT_##Name = cpu_to_be16(0x8800 + Num), 268 - 269 - /* V2 only actions */ 270 - #define OSD_ACT_V2(Name, Num) \ 271 - OSD_ACT_##Name = cpu_to_be16(0x8880 + Num), 272 - 273 - #define OSD_ACT_V1_V2(Name, Num1, Num2) \ 274 - OSD_ACT_##Name = cpu_to_be16(Num2), \ 275 - OSDv1_ACT_##Name = cpu_to_be16(Num1), 276 - 277 - enum osd_service_actions { 278 - OSD_ACT_V2(OBJECT_STRUCTURE_CHECK, 0x00) 279 - OSD_ACT___(FORMAT_OSD, 0x01) 280 - OSD_ACT___(CREATE, 0x02) 281 - OSD_ACT___(LIST, 0x03) 282 - OSD_ACT_V2(PUNCH, 0x04) 283 - OSD_ACT___(READ, 0x05) 284 - OSD_ACT___(WRITE, 0x06) 285 - OSD_ACT___(APPEND, 0x07) 286 - OSD_ACT___(FLUSH, 0x08) 287 - OSD_ACT_V2(CLEAR, 0x09) 288 - OSD_ACT___(REMOVE, 0x0A) 289 - OSD_ACT___(CREATE_PARTITION, 0x0B) 290 - OSD_ACT___(REMOVE_PARTITION, 0x0C) 291 - OSD_ACT___(GET_ATTRIBUTES, 0x0E) 292 - OSD_ACT___(SET_ATTRIBUTES, 0x0F) 293 - OSD_ACT___(CREATE_AND_WRITE, 0x12) 294 - OSD_ACT___(CREATE_COLLECTION, 0x15) 295 - OSD_ACT___(REMOVE_COLLECTION, 0x16) 296 - OSD_ACT___(LIST_COLLECTION, 0x17) 297 - OSD_ACT___(SET_KEY, 0x18) 298 - OSD_ACT___(SET_MASTER_KEY, 0x19) 299 - OSD_ACT___(FLUSH_COLLECTION, 0x1A) 300 - OSD_ACT___(FLUSH_PARTITION, 0x1B) 301 - OSD_ACT___(FLUSH_OSD, 0x1C) 302 - 303 - OSD_ACT_V2(QUERY, 0x20) 304 - OSD_ACT_V2(REMOVE_MEMBER_OBJECTS, 0x21) 305 - OSD_ACT_V2(GET_MEMBER_ATTRIBUTES, 0x22) 306 - OSD_ACT_V2(SET_MEMBER_ATTRIBUTES, 0x23) 307 - 308 - OSD_ACT_V2(CREATE_CLONE, 0x28) 309 - OSD_ACT_V2(CREATE_SNAPSHOT, 0x29) 310 - OSD_ACT_V2(DETACH_CLONE, 0x2A) 311 - OSD_ACT_V2(REFRESH_SNAPSHOT_CLONE, 0x2B) 312 - OSD_ACT_V2(RESTORE_PARTITION_FROM_SNAPSHOT, 0x2C) 313 - 314 - OSD_ACT_V2(READ_MAP, 0x31) 315 - OSD_ACT_V2(READ_MAPS_COMPARE, 0x32) 316 - 317 - OSD_ACT_V1_V2(PERFORM_SCSI_COMMAND, 0x8F7E, 0x8F7C) 318 - OSD_ACT_V1_V2(SCSI_TASK_MANAGEMENT, 0x8F7F, 0x8F7D) 319 - /* 0x8F80 to 0x8FFF are Vendor specific */ 320 - }; 321 - 322 - /* osd2r03: 7.1.3.2 List entry format for retrieving attributes */ 323 - struct osd_attributes_list_attrid { 324 - __be32 attr_page; 325 - __be32 attr_id; 326 - } __packed; 327 - 328 - /* 329 - * NOTE: v1: is not aligned. 330 - */ 331 - struct osdv1_attributes_list_element { 332 - __be32 attr_page; 333 - __be32 attr_id; 334 - __be16 attr_bytes; /* valid bytes at attr_val without padding */ 335 - u8 attr_val[0]; 336 - } __packed; 337 - 338 - /* 339 - * osd2r03: 7.1.3.3 List entry format for retrieved attributes and 340 - * for setting attributes 341 - * NOTE: v2 is 8-bytes aligned 342 - */ 343 - struct osdv2_attributes_list_element { 344 - __be32 attr_page; 345 - __be32 attr_id; 346 - u8 reserved[6]; 347 - __be16 attr_bytes; /* valid bytes at attr_val without padding */ 348 - u8 attr_val[0]; 349 - } __packed; 350 - 351 - enum { 352 - OSDv1_ATTRIBUTES_ELEM_ALIGN = 1, 353 - OSD_ATTRIBUTES_ELEM_ALIGN = 8, 354 - }; 355 - 356 - enum { 357 - OSD_ATTR_LIST_ALL_PAGES = 0xFFFFFFFF, 358 - OSD_ATTR_LIST_ALL_IN_PAGE = 0xFFFFFFFF, 359 - }; 360 - 361 - static inline unsigned osdv1_attr_list_elem_size(unsigned len) 362 - { 363 - return ALIGN(len + sizeof(struct osdv1_attributes_list_element), 364 - OSDv1_ATTRIBUTES_ELEM_ALIGN); 365 - } 366 - 367 - static inline unsigned osdv2_attr_list_elem_size(unsigned len) 368 - { 369 - return ALIGN(len + sizeof(struct osdv2_attributes_list_element), 370 - OSD_ATTRIBUTES_ELEM_ALIGN); 371 - } 372 - 373 - /* 374 - * osd2r03: 7.1.3 OSD attributes lists (Table 184) — List type values 375 - */ 376 - enum osd_attr_list_types { 377 - OSD_ATTR_LIST_GET = 0x1, /* descriptors only */ 378 - OSD_ATTR_LIST_SET_RETRIEVE = 0x9, /*descriptors/values variable-length*/ 379 - OSD_V2_ATTR_LIST_MULTIPLE = 0xE, /* ver2, Multiple Objects lists*/ 380 - OSD_V1_ATTR_LIST_CREATE_MULTIPLE = 0xF,/*ver1, used by create_multple*/ 381 - }; 382 - 383 - /* osd2r03: 7.1.3.4 Multi-object retrieved attributes format */ 384 - struct osd_attributes_list_multi_header { 385 - __be64 object_id; 386 - u8 object_type; /* object_type enum below */ 387 - u8 reserved[5]; 388 - __be16 list_bytes; 389 - /* followed by struct osd_attributes_list_element's */ 390 - }; 391 - 392 - struct osdv1_attributes_list_header { 393 - u8 type; /* low 4-bit only */ 394 - u8 pad; 395 - __be16 list_bytes; /* Initiator shall set to Zero. Only set by target */ 396 - /* 397 - * type=9 followed by struct osd_attributes_list_element's 398 - * type=E followed by struct osd_attributes_list_multi_header's 399 - */ 400 - } __packed; 401 - 402 - static inline unsigned osdv1_list_size(struct osdv1_attributes_list_header *h) 403 - { 404 - return be16_to_cpu(h->list_bytes); 405 - } 406 - 407 - struct osdv2_attributes_list_header { 408 - u8 type; /* lower 4-bits only */ 409 - u8 pad[3]; 410 - /*4*/ __be32 list_bytes; /* Initiator shall set to zero. Only set by target */ 411 - /* 412 - * type=9 followed by struct osd_attributes_list_element's 413 - * type=E followed by struct osd_attributes_list_multi_header's 414 - */ 415 - } __packed; 416 - 417 - static inline unsigned osdv2_list_size(struct osdv2_attributes_list_header *h) 418 - { 419 - return be32_to_cpu(h->list_bytes); 420 - } 421 - 422 - /* (osd-r10 6.13) 423 - * osd2r03: 6.15 LIST (Table 79) LIST command parameter data. 424 - * for root_lstchg below 425 - */ 426 - enum { 427 - OSD_OBJ_ID_LIST_PAR = 0x1, /* V1-only. Not used in V2 */ 428 - OSD_OBJ_ID_LIST_LSTCHG = 0x2, 429 - }; 430 - 431 - /* 432 - * osd2r03: 6.15.2 LIST command parameter data 433 - * (Also for LIST COLLECTION) 434 - */ 435 - struct osd_obj_id_list { 436 - __be64 list_bytes; /* bytes in list excluding list_bytes (-8) */ 437 - __be64 continuation_id; 438 - __be32 list_identifier; 439 - u8 pad[3]; 440 - u8 root_lstchg; 441 - __be64 object_ids[0]; 442 - } __packed; 443 - 444 - static inline bool osd_is_obj_list_done(struct osd_obj_id_list *list, 445 - bool *is_changed) 446 - { 447 - *is_changed = (0 != (list->root_lstchg & OSD_OBJ_ID_LIST_LSTCHG)); 448 - return 0 != list->continuation_id; 449 - } 450 - 451 - /* 452 - * osd2r03: 4.12.4.5 The ALLDATA security method 453 - */ 454 - struct osd_data_out_integrity_info { 455 - __be64 data_bytes; 456 - __be64 set_attributes_bytes; 457 - __be64 get_attributes_bytes; 458 - __u8 integrity_check_value[OSD_CRYPTO_KEYID_SIZE]; 459 - } __packed; 460 - 461 - /* Same osd_data_out_integrity_info is used for OSD2/OSD1. The only difference 462 - * Is the sizeof the structure since in OSD1 the last array is smaller. Use 463 - * below for version independent handling of this structure 464 - */ 465 - static inline int osd_data_out_integrity_info_sizeof(bool is_ver1) 466 - { 467 - return sizeof(struct osd_data_out_integrity_info) - 468 - (is_ver1 * (OSDv2_CRYPTO_KEYID_SIZE - OSDv1_CRYPTO_KEYID_SIZE)); 469 - } 470 - 471 - struct osd_data_in_integrity_info { 472 - __be64 data_bytes; 473 - __be64 retrieved_attributes_bytes; 474 - __u8 integrity_check_value[OSD_CRYPTO_KEYID_SIZE]; 475 - } __packed; 476 - 477 - /* Same osd_data_in_integrity_info is used for OSD2/OSD1. The only difference 478 - * Is the sizeof the structure since in OSD1 the last array is smaller. Use 479 - * below for version independent handling of this structure 480 - */ 481 - static inline int osd_data_in_integrity_info_sizeof(bool is_ver1) 482 - { 483 - return sizeof(struct osd_data_in_integrity_info) - 484 - (is_ver1 * (OSDv2_CRYPTO_KEYID_SIZE - OSDv1_CRYPTO_KEYID_SIZE)); 485 - } 486 - 487 - struct osd_timestamp { 488 - u8 time[6]; /* number of milliseconds since 1/1/1970 UT (big endian) */ 489 - } __packed; 490 - /* FIXME: define helper functions to convert to/from osd time format */ 491 - 492 - /* 493 - * Capability & Security definitions 494 - * osd2r03: 4.11.2.2 Capability format 495 - * osd2r03: 5.2.8 Security parameters 496 - */ 497 - 498 - struct osd_key_identifier { 499 - u8 id[7]; /* if you know why 7 please email ooo@electrozaur.com */ 500 - } __packed; 501 - 502 - /* for osd_capability.format */ 503 - enum { 504 - OSD_SEC_CAP_FORMAT_NO_CAPS = 0, 505 - OSD_SEC_CAP_FORMAT_VER1 = 1, 506 - OSD_SEC_CAP_FORMAT_VER2 = 2, 507 - }; 508 - 509 - /* security_method */ 510 - enum { 511 - OSD_SEC_NOSEC = 0, 512 - OSD_SEC_CAPKEY = 1, 513 - OSD_SEC_CMDRSP = 2, 514 - OSD_SEC_ALLDATA = 3, 515 - }; 516 - 517 - enum object_type { 518 - OSD_SEC_OBJ_ROOT = 0x1, 519 - OSD_SEC_OBJ_PARTITION = 0x2, 520 - OSD_SEC_OBJ_COLLECTION = 0x40, 521 - OSD_SEC_OBJ_USER = 0x80, 522 - }; 523 - 524 - enum osd_capability_bit_masks { 525 - OSD_SEC_CAP_APPEND = BIT(0), 526 - OSD_SEC_CAP_OBJ_MGMT = BIT(1), 527 - OSD_SEC_CAP_REMOVE = BIT(2), 528 - OSD_SEC_CAP_CREATE = BIT(3), 529 - OSD_SEC_CAP_SET_ATTR = BIT(4), 530 - OSD_SEC_CAP_GET_ATTR = BIT(5), 531 - OSD_SEC_CAP_WRITE = BIT(6), 532 - OSD_SEC_CAP_READ = BIT(7), 533 - 534 - OSD_SEC_CAP_NONE1 = BIT(8), 535 - OSD_SEC_CAP_NONE2 = BIT(9), 536 - OSD_SEC_GBL_REM = BIT(10), /*v2 only*/ 537 - OSD_SEC_CAP_QUERY = BIT(11), /*v2 only*/ 538 - OSD_SEC_CAP_M_OBJECT = BIT(12), /*v2 only*/ 539 - OSD_SEC_CAP_POL_SEC = BIT(13), 540 - OSD_SEC_CAP_GLOBAL = BIT(14), 541 - OSD_SEC_CAP_DEV_MGMT = BIT(15), 542 - }; 543 - 544 - /* for object_descriptor_type (hi nibble used) */ 545 - enum { 546 - OSD_SEC_OBJ_DESC_NONE = 0, /* Not allowed */ 547 - OSD_SEC_OBJ_DESC_OBJ = 1 << 4, /* v1: also collection */ 548 - OSD_SEC_OBJ_DESC_PAR = 2 << 4, /* also root */ 549 - OSD_SEC_OBJ_DESC_COL = 3 << 4, /* v2 only */ 550 - }; 551 - 552 - /* (osd-r10:4.9.2.2) 553 - * osd2r03:4.11.2.2 Capability format 554 - */ 555 - struct osd_capability_head { 556 - u8 format; /* low nibble */ 557 - u8 integrity_algorithm__key_version; /* MAKE_BYTE(integ_alg, key_ver) */ 558 - u8 security_method; 559 - u8 reserved1; 560 - /*04*/ struct osd_timestamp expiration_time; 561 - /*10*/ u8 audit[20]; 562 - /*30*/ u8 discriminator[12]; 563 - /*42*/ struct osd_timestamp object_created_time; 564 - /*48*/ u8 object_type; 565 - /*49*/ u8 permissions_bit_mask[5]; 566 - /*54*/ u8 reserved2; 567 - /*55*/ u8 object_descriptor_type; /* high nibble */ 568 - } __packed; 569 - 570 - /*56 v1*/ 571 - struct osdv1_cap_object_descriptor { 572 - union { 573 - struct { 574 - /*56*/ __be32 policy_access_tag; 575 - /*60*/ __be64 allowed_partition_id; 576 - /*68*/ __be64 allowed_object_id; 577 - /*76*/ __be32 reserved; 578 - } __packed obj_desc; 579 - 580 - /*56*/ u8 object_descriptor[24]; 581 - }; 582 - } __packed; 583 - /*80 v1*/ 584 - 585 - /*56 v2*/ 586 - struct osd_cap_object_descriptor { 587 - union { 588 - struct { 589 - /*56*/ __be32 allowed_attributes_access; 590 - /*60*/ __be32 policy_access_tag; 591 - /*64*/ __be16 boot_epoch; 592 - /*66*/ u8 reserved[6]; 593 - /*72*/ __be64 allowed_partition_id; 594 - /*80*/ __be64 allowed_object_id; 595 - /*88*/ __be64 allowed_range_length; 596 - /*96*/ __be64 allowed_range_start; 597 - } __packed obj_desc; 598 - 599 - /*56*/ u8 object_descriptor[48]; 600 - }; 601 - } __packed; 602 - /*104 v2*/ 603 - 604 - struct osdv1_capability { 605 - struct osd_capability_head h; 606 - struct osdv1_cap_object_descriptor od; 607 - } __packed; 608 - 609 - struct osd_capability { 610 - struct osd_capability_head h; 611 - struct osd_cap_object_descriptor od; 612 - } __packed; 613 - 614 - /** 615 - * osd_sec_set_caps - set cap-bits into the capabilities header 616 - * 617 - * @cap: The osd_capability_head to set cap bits to. 618 - * @bit_mask: Use an ORed list of enum osd_capability_bit_masks values 619 - * 620 - * permissions_bit_mask is unaligned use below to set into caps 621 - * in a version independent way 622 - */ 623 - static inline void osd_sec_set_caps(struct osd_capability_head *cap, 624 - u16 bit_mask) 625 - { 626 - /* 627 - *Note: The bits above are defined LE order this is because this way 628 - * they can grow in the future to more then 16, and still retain 629 - * there constant values. 630 - */ 631 - put_unaligned_le16(bit_mask, &cap->permissions_bit_mask); 632 - } 633 - 634 - /* osd2r05a sec 5.3: CDB continuation segment formats */ 635 - enum osd_continuation_segment_format { 636 - CDB_CONTINUATION_FORMAT_V2 = 0x01, 637 - }; 638 - 639 - struct osd_continuation_segment_header { 640 - u8 format; 641 - u8 reserved1; 642 - __be16 service_action; 643 - __be32 reserved2; 644 - u8 integrity_check[OSDv2_CRYPTO_KEYID_SIZE]; 645 - } __packed; 646 - 647 - /* osd2r05a sec 5.4.1: CDB continuation descriptors */ 648 - enum osd_continuation_descriptor_type { 649 - NO_MORE_DESCRIPTORS = 0x0000, 650 - SCATTER_GATHER_LIST = 0x0001, 651 - QUERY_LIST = 0x0002, 652 - USER_OBJECT = 0x0003, 653 - COPY_USER_OBJECT_SOURCE = 0x0101, 654 - EXTENSION_CAPABILITIES = 0xFFEE 655 - }; 656 - 657 - struct osd_continuation_descriptor_header { 658 - __be16 type; 659 - u8 reserved; 660 - u8 pad_length; 661 - __be32 length; 662 - } __packed; 663 - 664 - 665 - /* osd2r05a sec 5.4.2: Scatter/gather list */ 666 - struct osd_sg_list_entry { 667 - __be64 offset; 668 - __be64 len; 669 - }; 670 - 671 - struct osd_sg_continuation_descriptor { 672 - struct osd_continuation_descriptor_header hdr; 673 - struct osd_sg_list_entry entries[]; 674 - }; 675 - 676 - #endif /* ndef __OSD_PROTOCOL_H__ */
-45
include/scsi/osd_sec.h
··· 1 - /* 2 - * osd_sec.h - OSD security manager API 3 - * 4 - * Copyright (C) 2008 Panasas Inc. All rights reserved. 5 - * 6 - * Authors: 7 - * Boaz Harrosh <ooo@electrozaur.com> 8 - * Benny Halevy <bhalevy@panasas.com> 9 - * 10 - * This program is free software; you can redistribute it and/or modify 11 - * it under the terms of the GNU General Public License version 2 12 - * 13 - */ 14 - #ifndef __OSD_SEC_H__ 15 - #define __OSD_SEC_H__ 16 - 17 - #include <scsi/osd_protocol.h> 18 - #include <scsi/osd_types.h> 19 - 20 - /* 21 - * Contains types and constants of osd capabilities and security 22 - * encoding/decoding. 23 - * API is trying to keep security abstract so initiator of an object 24 - * based pNFS client knows as little as possible about security and 25 - * capabilities. It is the Server's osd-initiator place to know more. 26 - * Also can be used by osd-target. 27 - */ 28 - void osd_sec_encode_caps(void *caps, ...);/* NI */ 29 - void osd_sec_init_nosec_doall_caps(void *caps, 30 - const struct osd_obj_id *obj, bool is_collection, const bool is_v1); 31 - 32 - bool osd_is_sec_alldata(struct osd_security_parameters *sec_params); 33 - 34 - /* Conditionally sign the CDB according to security setting in ocdb 35 - * with cap_key */ 36 - void osd_sec_sign_cdb(struct osd_cdb *ocdb, const u8 *cap_key); 37 - 38 - /* Unconditionally sign the BIO data with cap_key. 39 - * Check for osd_is_sec_alldata() was done prior to calling this. */ 40 - void osd_sec_sign_data(void *data_integ, struct bio *bio, const u8 *cap_key); 41 - 42 - /* Version independent copy of caps into the cdb */ 43 - void osd_set_caps(struct osd_cdb *cdb, const void *caps); 44 - 45 - #endif /* ndef __OSD_SEC_H__ */
-263
include/scsi/osd_sense.h
··· 1 - /* 2 - * osd_sense.h - OSD Related sense handling definitions. 3 - * 4 - * Copyright (C) 2008 Panasas Inc. All rights reserved. 5 - * 6 - * Authors: 7 - * Boaz Harrosh <ooo@electrozaur.com> 8 - * Benny Halevy <bhalevy@panasas.com> 9 - * 10 - * This program is free software; you can redistribute it and/or modify 11 - * it under the terms of the GNU General Public License version 2 12 - * 13 - * This file contains types and constants that are defined by the protocol 14 - * Note: All names and symbols are taken from the OSD standard's text. 15 - */ 16 - #ifndef __OSD_SENSE_H__ 17 - #define __OSD_SENSE_H__ 18 - 19 - #include <scsi/osd_protocol.h> 20 - 21 - /* SPC3r23 4.5.6 Sense key and sense code definitions table 27 */ 22 - enum scsi_sense_keys { 23 - scsi_sk_no_sense = 0x0, 24 - scsi_sk_recovered_error = 0x1, 25 - scsi_sk_not_ready = 0x2, 26 - scsi_sk_medium_error = 0x3, 27 - scsi_sk_hardware_error = 0x4, 28 - scsi_sk_illegal_request = 0x5, 29 - scsi_sk_unit_attention = 0x6, 30 - scsi_sk_data_protect = 0x7, 31 - scsi_sk_blank_check = 0x8, 32 - scsi_sk_vendor_specific = 0x9, 33 - scsi_sk_copy_aborted = 0xa, 34 - scsi_sk_aborted_command = 0xb, 35 - scsi_sk_volume_overflow = 0xd, 36 - scsi_sk_miscompare = 0xe, 37 - scsi_sk_reserved = 0xf, 38 - }; 39 - 40 - /* SPC3r23 4.5.6 Sense key and sense code definitions table 28 */ 41 - /* Note: only those which can be returned by an OSD target. Most of 42 - * these errors are taken care of by the generic scsi layer. 43 - */ 44 - enum osd_additional_sense_codes { 45 - scsi_no_additional_sense_information = 0x0000, 46 - scsi_operation_in_progress = 0x0016, 47 - scsi_cleaning_requested = 0x0017, 48 - scsi_lunr_cause_not_reportable = 0x0400, 49 - scsi_logical_unit_is_in_process_of_becoming_ready = 0x0401, 50 - scsi_lunr_initializing_command_required = 0x0402, 51 - scsi_lunr_manual_intervention_required = 0x0403, 52 - scsi_lunr_operation_in_progress = 0x0407, 53 - scsi_lunr_selftest_in_progress = 0x0409, 54 - scsi_luna_asymmetric_access_state_transition = 0x040a, 55 - scsi_luna_target_port_in_standby_state = 0x040b, 56 - scsi_luna_target_port_in_unavailable_state = 0x040c, 57 - scsi_lunr_notify_enable_spinup_required = 0x0411, 58 - scsi_logical_unit_does_not_respond_to_selection = 0x0500, 59 - scsi_logical_unit_communication_failure = 0x0800, 60 - scsi_logical_unit_communication_timeout = 0x0801, 61 - scsi_logical_unit_communication_parity_error = 0x0802, 62 - scsi_error_log_overflow = 0x0a00, 63 - scsi_warning = 0x0b00, 64 - scsi_warning_specified_temperature_exceeded = 0x0b01, 65 - scsi_warning_enclosure_degraded = 0x0b02, 66 - scsi_write_error_unexpected_unsolicited_data = 0x0c0c, 67 - scsi_write_error_not_enough_unsolicited_data = 0x0c0d, 68 - scsi_invalid_information_unit = 0x0e00, 69 - scsi_invalid_field_in_command_information_unit = 0x0e03, 70 - scsi_read_error_failed_retransmission_request = 0x1113, 71 - scsi_parameter_list_length_error = 0x1a00, 72 - scsi_invalid_command_operation_code = 0x2000, 73 - scsi_invalid_field_in_cdb = 0x2400, 74 - osd_security_audit_value_frozen = 0x2404, 75 - osd_security_working_key_frozen = 0x2405, 76 - osd_nonce_not_unique = 0x2406, 77 - osd_nonce_timestamp_out_of_range = 0x2407, 78 - scsi_logical_unit_not_supported = 0x2500, 79 - scsi_invalid_field_in_parameter_list = 0x2600, 80 - scsi_parameter_not_supported = 0x2601, 81 - scsi_parameter_value_invalid = 0x2602, 82 - scsi_invalid_release_of_persistent_reservation = 0x2604, 83 - osd_invalid_dataout_buffer_integrity_check_value = 0x260f, 84 - scsi_not_ready_to_ready_change_medium_may_have_changed = 0x2800, 85 - scsi_power_on_reset_or_bus_device_reset_occurred = 0x2900, 86 - scsi_power_on_occurred = 0x2901, 87 - scsi_scsi_bus_reset_occurred = 0x2902, 88 - scsi_bus_device_reset_function_occurred = 0x2903, 89 - scsi_device_internal_reset = 0x2904, 90 - scsi_transceiver_mode_changed_to_single_ended = 0x2905, 91 - scsi_transceiver_mode_changed_to_lvd = 0x2906, 92 - scsi_i_t_nexus_loss_occurred = 0x2907, 93 - scsi_parameters_changed = 0x2a00, 94 - scsi_mode_parameters_changed = 0x2a01, 95 - scsi_asymmetric_access_state_changed = 0x2a06, 96 - scsi_priority_changed = 0x2a08, 97 - scsi_command_sequence_error = 0x2c00, 98 - scsi_previous_busy_status = 0x2c07, 99 - scsi_previous_task_set_full_status = 0x2c08, 100 - scsi_previous_reservation_conflict_status = 0x2c09, 101 - osd_partition_or_collection_contains_user_objects = 0x2c0a, 102 - scsi_commands_cleared_by_another_initiator = 0x2f00, 103 - scsi_cleaning_failure = 0x3007, 104 - scsi_enclosure_failure = 0x3400, 105 - scsi_enclosure_services_failure = 0x3500, 106 - scsi_unsupported_enclosure_function = 0x3501, 107 - scsi_enclosure_services_unavailable = 0x3502, 108 - scsi_enclosure_services_transfer_failure = 0x3503, 109 - scsi_enclosure_services_transfer_refused = 0x3504, 110 - scsi_enclosure_services_checksum_error = 0x3505, 111 - scsi_rounded_parameter = 0x3700, 112 - osd_read_past_end_of_user_object = 0x3b17, 113 - scsi_logical_unit_has_not_self_configured_yet = 0x3e00, 114 - scsi_logical_unit_failure = 0x3e01, 115 - scsi_timeout_on_logical_unit = 0x3e02, 116 - scsi_logical_unit_failed_selftest = 0x3e03, 117 - scsi_logical_unit_unable_to_update_selftest_log = 0x3e04, 118 - scsi_target_operating_conditions_have_changed = 0x3f00, 119 - scsi_microcode_has_been_changed = 0x3f01, 120 - scsi_inquiry_data_has_changed = 0x3f03, 121 - scsi_echo_buffer_overwritten = 0x3f0f, 122 - scsi_diagnostic_failure_on_component_nn_first = 0x4080, 123 - scsi_diagnostic_failure_on_component_nn_last = 0x40ff, 124 - scsi_message_error = 0x4300, 125 - scsi_internal_target_failure = 0x4400, 126 - scsi_select_or_reselect_failure = 0x4500, 127 - scsi_scsi_parity_error = 0x4700, 128 - scsi_data_phase_crc_error_detected = 0x4701, 129 - scsi_scsi_parity_error_detected_during_st_data_phase = 0x4702, 130 - scsi_asynchronous_information_protection_error_detected = 0x4704, 131 - scsi_protocol_service_crc_error = 0x4705, 132 - scsi_phy_test_function_in_progress = 0x4706, 133 - scsi_invalid_message_error = 0x4900, 134 - scsi_command_phase_error = 0x4a00, 135 - scsi_data_phase_error = 0x4b00, 136 - scsi_logical_unit_failed_self_configuration = 0x4c00, 137 - scsi_overlapped_commands_attempted = 0x4e00, 138 - osd_quota_error = 0x5507, 139 - scsi_failure_prediction_threshold_exceeded = 0x5d00, 140 - scsi_failure_prediction_threshold_exceeded_false = 0x5dff, 141 - scsi_voltage_fault = 0x6500, 142 - }; 143 - 144 - enum scsi_descriptor_types { 145 - scsi_sense_information = 0x0, 146 - scsi_sense_command_specific_information = 0x1, 147 - scsi_sense_key_specific = 0x2, 148 - scsi_sense_field_replaceable_unit = 0x3, 149 - scsi_sense_stream_commands = 0x4, 150 - scsi_sense_block_commands = 0x5, 151 - osd_sense_object_identification = 0x6, 152 - osd_sense_response_integrity_check = 0x7, 153 - osd_sense_attribute_identification = 0x8, 154 - scsi_sense_ata_return = 0x9, 155 - 156 - scsi_sense_Reserved_first = 0x0A, 157 - scsi_sense_Reserved_last = 0x7F, 158 - scsi_sense_Vendor_specific_first = 0x80, 159 - scsi_sense_Vendor_specific_last = 0xFF, 160 - }; 161 - 162 - struct scsi_sense_descriptor { /* for picking into desc type */ 163 - u8 descriptor_type; /* one of enum scsi_descriptor_types */ 164 - u8 additional_length; /* n - 1 */ 165 - u8 data[]; 166 - } __packed; 167 - 168 - /* OSD deploys only scsi descriptor_based sense buffers */ 169 - struct scsi_sense_descriptor_based { 170 - /*0*/ u8 response_code; /* 0x72 or 0x73 */ 171 - /*1*/ u8 sense_key; /* one of enum scsi_sense_keys (4 lower bits) */ 172 - /*2*/ __be16 additional_sense_code; /* enum osd_additional_sense_codes */ 173 - /*4*/ u8 Reserved[3]; 174 - /*7*/ u8 additional_sense_length; /* n - 7 */ 175 - /*8*/ struct scsi_sense_descriptor ssd[0]; /* variable length, 1 or more */ 176 - } __packed; 177 - 178 - /* some descriptors deployed by OSD */ 179 - 180 - /* SPC3r23 4.5.2.3 Command-specific information sense data descriptor */ 181 - /* Note: this is the same for descriptor_type=00 but with type=00 the 182 - * Reserved[0] == 0x80 (ie. bit-7 set) 183 - */ 184 - struct scsi_sense_command_specific_data_descriptor { 185 - /*0*/ u8 descriptor_type; /* (00h/01h) */ 186 - /*1*/ u8 additional_length; /* (0Ah) */ 187 - /*2*/ u8 Reserved[2]; 188 - /*4*/ __be64 information; 189 - } __packed; 190 - /*12*/ 191 - 192 - struct scsi_sense_key_specific_data_descriptor { 193 - /*0*/ u8 descriptor_type; /* (02h) */ 194 - /*1*/ u8 additional_length; /* (06h) */ 195 - /*2*/ u8 Reserved[2]; 196 - /* SKSV, C/D, Reserved (2), BPV, BIT POINTER (3) */ 197 - /*4*/ u8 sksv_cd_bpv_bp; 198 - /*5*/ __be16 value; /* field-pointer/progress-value/retry-count/... */ 199 - /*7*/ u8 Reserved2; 200 - } __packed; 201 - /*8*/ 202 - 203 - /* 4.16.2.1 OSD error identification sense data descriptor - table 52 */ 204 - /* Note: these bits are defined LE order for easy definition, this way the BIT() 205 - * number is the same as in the documentation. Below members at 206 - * osd_sense_identification_data_descriptor are therefore defined __le32. 207 - */ 208 - enum osd_command_functions_bits { 209 - OSD_CFB_COMMAND = BIT(4), 210 - OSD_CFB_CMD_CAP_VERIFIED = BIT(5), 211 - OSD_CFB_VALIDATION = BIT(7), 212 - OSD_CFB_IMP_ST_ATT = BIT(12), 213 - OSD_CFB_SET_ATT = BIT(20), 214 - OSD_CFB_SA_CAP_VERIFIED = BIT(21), 215 - OSD_CFB_GET_ATT = BIT(28), 216 - OSD_CFB_GA_CAP_VERIFIED = BIT(29), 217 - }; 218 - 219 - struct osd_sense_identification_data_descriptor { 220 - /*0*/ u8 descriptor_type; /* (06h) */ 221 - /*1*/ u8 additional_length; /* (1Eh) */ 222 - /*2*/ u8 Reserved[6]; 223 - /*8*/ __le32 not_initiated_functions; /*osd_command_functions_bits*/ 224 - /*12*/ __le32 completed_functions; /*osd_command_functions_bits*/ 225 - /*16*/ __be64 partition_id; 226 - /*24*/ __be64 object_id; 227 - } __packed; 228 - /*32*/ 229 - 230 - struct osd_sense_response_integrity_check_descriptor { 231 - /*0*/ u8 descriptor_type; /* (07h) */ 232 - /*1*/ u8 additional_length; /* (20h) */ 233 - /*2*/ u8 integrity_check_value[32]; /*FIXME: OSDv2_CRYPTO_KEYID_SIZE*/ 234 - } __packed; 235 - /*34*/ 236 - 237 - struct osd_sense_attributes_data_descriptor { 238 - /*0*/ u8 descriptor_type; /* (08h) */ 239 - /*1*/ u8 additional_length; /* (n-2) */ 240 - /*2*/ u8 Reserved[6]; 241 - struct osd_sense_attr { 242 - /*8*/ __be32 attr_page; 243 - /*12*/ __be32 attr_id; 244 - /*16*/ } sense_attrs[0]; /* 1 or more */ 245 - } __packed; 246 - /*variable*/ 247 - 248 - /* Dig into scsi_sk_illegal_request/scsi_invalid_field_in_cdb errors */ 249 - 250 - /*FIXME: Support also field in CAPS*/ 251 - #define OSD_CDB_OFFSET(F) offsetof(struct osd_cdb_head, F) 252 - 253 - enum osdv2_cdb_field_offset { 254 - OSDv1_CFO_STARTING_BYTE = OSD_CDB_OFFSET(v1.start_address), 255 - OSD_CFO_STARTING_BYTE = OSD_CDB_OFFSET(v2.start_address), 256 - OSD_CFO_PARTITION_ID = OSD_CDB_OFFSET(partition), 257 - OSD_CFO_OBJECT_ID = OSD_CDB_OFFSET(object), 258 - OSD_CFO_PERMISSIONS = sizeof(struct osd_cdb_head) + 259 - offsetof(struct osd_capability_head, 260 - permissions_bit_mask), 261 - }; 262 - 263 - #endif /* ndef __OSD_SENSE_H__ */
-45
include/scsi/osd_types.h
··· 1 - /* 2 - * osd_types.h - Types and constants which are not part of the protocol. 3 - * 4 - * Copyright (C) 2008 Panasas Inc. All rights reserved. 5 - * 6 - * Authors: 7 - * Boaz Harrosh <ooo@electrozaur.com> 8 - * Benny Halevy <bhalevy@panasas.com> 9 - * 10 - * This program is free software; you can redistribute it and/or modify 11 - * it under the terms of the GNU General Public License version 2 12 - * 13 - * Contains types and constants that are implementation specific and are 14 - * used by more than one part of the osd library. 15 - * (Eg initiator/target/security_manager/...) 16 - */ 17 - #ifndef __OSD_TYPES_H__ 18 - #define __OSD_TYPES_H__ 19 - 20 - struct osd_systemid { 21 - u8 data[OSD_SYSTEMID_LEN]; 22 - }; 23 - 24 - typedef u64 __bitwise osd_id; 25 - 26 - struct osd_obj_id { 27 - osd_id partition; 28 - osd_id id; 29 - }; 30 - 31 - static const struct __weak osd_obj_id osd_root_object = {0, 0}; 32 - 33 - struct osd_attr { 34 - u32 attr_page; 35 - u32 attr_id; 36 - u16 len; /* byte count of operand */ 37 - void *val_ptr; /* in network order */ 38 - }; 39 - 40 - struct osd_sg_entry { 41 - u64 offset; 42 - u64 len; 43 - }; 44 - 45 - #endif /* ndef __OSD_TYPES_H__ */