Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
osd_attributes.h
Go to the documentation of this file.
1 #ifndef __OSD_ATTRIBUTES_H__
2 #define __OSD_ATTRIBUTES_H__
3 
4 #include <scsi/osd_protocol.h>
5 
6 /*
7  * Contains types and constants that define attribute pages and attribute
8  * numbers and their data types.
9  */
10 
11 #define ATTR_SET(pg, id, l, ptr) \
12  { .attr_page = pg, .attr_id = id, .len = l, .val_ptr = ptr }
13 
14 #define ATTR_DEF(pg, id, l) ATTR_SET(pg, id, l, NULL)
15 
16 /* osd-r10 4.7.3 Attributes pages */
17 enum {
25  OSD_APAGE_OBJECT_LAST = 0x2fffffff,
26 
35 
42 
43  OSD_APAGE_ROOT_FIRST = 0x90000000,
49  OSD_APAGE_ROOT_LAST = 0xBFFFFFFF,
50 
53 
54  OSD_APAGE_COMMON_FIRST = 0xF0000000,
55  OSD_APAGE_COMMON_LAST = 0xFFFFFFFD,
56 
58 
59  OSD_APAGE_REQUEST_ALL = 0xFFFFFFFF,
60 };
61 
62 /* subcategories of attr pages within each range above */
63 enum {
71  OSD_APAGE_STD_LAST = 0x0000007F,
72 
75 
78 
79  OSD_APAGE_PUBLIC_FIRST = 0x0000F000,
80  OSD_APAGE_PUBLIC_LAST = 0x0000FFFF,
81 
84 
87 };
88 
89 enum {
90  OSD_ATTR_PAGE_IDENTIFICATION = 0, /* in all pages 40 bytes */
91 };
92 
96 } __packed;
97 
101 } __packed;
102 
103 /* 7.1.2.8 Root Information attributes page (OSD_APAGE_ROOT_INFORMATION) */
104 enum {
110  OSD_ATTR_RI_PRODUCT_SERIAL_NUMBER = 0x8, /* variable */
111  OSD_ATTR_RI_OSD_NAME = 0x9, /* variable */
116  OSD_ATTR_RI_CLOCK = 0x100, /* 6 */
119 
124 
125  OARI_MAXIMUM_SNAPSHOTS_COUNT = 0X1C1, /* 0 or 4 */
126  OARI_MAXIMUM_CLONES_COUNT = 0X1C2, /* 0 or 4 */
127  OARI_MAXIMUM_BRANCH_DEPTH = 0X1CC, /* 0 or 4 */
136 };
137 /* Root_Information_attributes_page does not have a get_page structure */
138 
139 /* 7.1.2.9 Partition Information attributes page
140  * (OSD_APAGE_PARTITION_INFORMATION)
141  */
142 enum {
144  OSD_ATTR_PI_USERNAME = 0x9, /* variable */
148 
149  OSD_ATTR_PI_ACTUAL_DATA_SPACE = 0xD1, /* 0 or 8 */
150  OSD_ATTR_PI_RESERVED_DATA_SPACE = 0xD2, /* 0 or 8 */
155 };
156 /* Partition Information attributes page does not have a get_page structure */
157 
158 /* 7.1.2.10 Collection Information attributes page
159  * (OSD_APAGE_COLLECTION_INFORMATION)
160  */
161 enum {
164  OSD_ATTR_CI_USERNAME = 0x9, /* variable */
167 };
168 /* Collection Information attributes page does not have a get_page structure */
169 
170 /* 7.1.2.11 User Object Information attributes page
171  * (OSD_APAGE_OBJECT_INFORMATION)
172  */
173 enum {
175  OSD_ATTR_OI_OBJECT_ID = 0x2, /* 8 */
176  OSD_ATTR_OI_USERNAME = 0x9, /* variable */
179  SD_ATTR_OI_ACTUAL_DATA_SPACE = 0XD1, /* 0 OR 8 */
180  SD_ATTR_OI_RESERVED_DATA_SPACE = 0XD2, /* 0 OR 8 */
181 };
182 /* Object Information attributes page does not have a get_page structure */
183 
184 /* 7.1.2.12 Root Quotas attributes page (OSD_APAGE_ROOT_QUOTAS) */
185 enum {
190  OSD_ATTR_RQ_PARTITION_COUNT = 0x20002, /* 8 */
191 };
192 
194  struct osd_attr_page_header hdr; /* id=R+2, size=0x24 */
200 } __packed;
201 
202 /* 7.1.2.13 Partition Quotas attributes page (OSD_APAGE_PARTITION_QUOTAS)*/
203 enum {
205  OSD_ATTR_PQ_CAPACITY_QUOTA = 0x10001, /* 8 */
206  OSD_ATTR_PQ_OBJECT_COUNT = 0x10002, /* 8 */
208 };
209 
211  struct osd_attr_page_header hdr; /* id=P+2, size=0x1C */
216 } __packed;
217 
218 /* 7.1.2.14 User Object Quotas attributes page (OSD_APAGE_OBJECT_QUOTAS) */
219 enum {
221 };
222 
224  struct osd_attr_page_header hdr; /* id=U+2, size=0x8 */
226 } __packed;
227 
228 /* 7.1.2.15 Root Timestamps attributes page (OSD_APAGE_ROOT_TIMESTAMP) */
229 enum {
232  OSD_ATTR_RT_TIMESTAMP_BYPASS = 0xFFFFFFFE, /* 1 */
233 };
234 
236  struct osd_attr_page_header hdr; /* id=R+3, size=0xD */
240 } __packed;
241 
242 /* 7.1.2.16 Partition Timestamps attributes page
243  * (OSD_APAGE_PARTITION_TIMESTAMP)
244  */
245 enum {
251  OSD_ATTR_PT_TIMESTAMP_BYPASS = 0xFFFFFFFE, /* 1 */
252 };
253 
255  struct osd_attr_page_header hdr; /* id=P+3, size=0x1F */
262 } __packed;
263 
264 /* 7.1.2.17/18 Collection/Object Timestamps attributes page
265  * (OSD_APAGE_COLLECTION_TIMESTAMP/OSD_APAGE_OBJECT_TIMESTAMP)
266  */
267 enum {
273 };
274 
275 /* same for collection */
277  struct osd_attr_page_header hdr; /* id=C+3/3, size=0x1E */
283 } __packed;
284 
285 /* OSD2r05: 7.1.3.19 Attributes Access attributes page
286  * (OSD_APAGE_PARTITION_ATTR_ACCESS)
287  *
288  * each attribute is of the form below. Total array length is deduced
289  * from the attribute's length
290  * (See allowed_attributes_access of the struct osd_cap_object_descriptor)
291  */
294 } __packed;
295 
296 /* OSD2r05: 7.1.2.21 Collections attributes page */
297 /* TBD */
298 
299 /* 7.1.2.20 Root Policy/Security attributes page (OSD_APAGE_ROOT_SECURITY) */
300 enum {
307  OSD_ATTR_RS_MASTER_KEY_IDENTIFIER = 0x7FFD, /* 0 or 7 */
308  OSD_ATTR_RS_ROOT_KEY_IDENTIFIER = 0x7FFE, /* 0 or 7 */
310  OSD_ATTR_RS_SUPPORTED_DH_GROUP_0 = 0x80000010,/* 1,(x16)*/
311 };
312 
314  struct osd_attr_page_header hdr; /* id=R+5, size=0x3F */
326 } __packed;
327 
328 /* 7.1.2.21 Partition Policy/Security attributes page
329  * (OSD_APAGE_PARTITION_SECURITY)
330  */
331 enum {
340  OSD_ATTR_PS_POLICY_ACCESS_TAG = 0x40000001, /* 4 */
342 };
343 
345  struct osd_attr_page_header hdr; /* id=p+5, size=0x8f */
358 } __packed;
359 
360 /* 7.1.2.22/23 Collection/Object Policy-Security attributes page
361  * (OSD_APAGE_COLLECTION_SECURITY/OSD_APAGE_OBJECT_SECURITY)
362  */
363 enum {
364  OSD_ATTR_OS_POLICY_ACCESS_TAG = 0x40000001, /* 4 */
365 };
366 
368  struct osd_attr_page_header hdr; /* id=C+5/5, size=4 */
370 } __packed;
371 
372 /* OSD2r05: 7.1.3.31 Current Command attributes page
373  * (OSD_APAGE_CURRENT_COMMAND)
374  */
375 enum {
377  OSD_ATTR_CC_OBJECT_TYPE = 0x2, /* 1 */
379  OSD_ATTR_CC_OBJECT_ID = 0x4, /* 8 */
382 };
383 
384 /*TBD: osdv1_current_command_attributes_page */
385 
387  struct osd_attr_page_header hdr; /* id=0xFFFFFFFE, size=0x44 */
395 };
396 
397 #endif /*ndef __OSD_ATTRIBUTES_H__*/