biovar.h revision 1.1.22.2 1 /* $NetBSD: biovar.h,v 1.1.22.2 2007/10/15 05:09:53 riz Exp $ */
2 /* $OpenBSD: biovar.h,v 1.26 2007/03/19 03:02:08 marco Exp $ */
3
4 /*
5 * Copyright (c) 2002 Niklas Hallqvist. All rights reserved.
6 * Copyright (c) 2005 Marco Peereboom. All rights reserved.
7 *
8 * Redistribution and use in source and binary forms, with or without
9 * modification, are permitted provided that the following conditions
10 * are met:
11 * 1. Redistributions of source code must retain the above copyright
12 * notice, this list of conditions and the following disclaimer.
13 * 2. Redistributions in binary form must reproduce the above copyright
14 * notice, this list of conditions and the following disclaimer in the
15 * documentation and/or other materials provided with the distribution.
16 *
17 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
18 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
19 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
20 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
21 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
22 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 */
28
29 /*
30 * Devices getting ioctls through this interface should use ioctl class 'B'
31 * and command numbers starting from 32, lower ones are reserved for generic
32 * ioctls. All ioctl data must be structures which start with a void *
33 * cookie.
34 */
35
36 #include <sys/types.h>
37
38 struct bio_common {
39 void *bc_cookie;
40 };
41
42 /* convert name to a cookie */
43 #define BIOCLOCATE _IOWR('B', 0, struct bio_locate)
44 struct bio_locate {
45 void *bl_cookie;
46 char *bl_name;
47 };
48
49 #ifdef _KERNEL
50 int bio_register(struct device *, int (*)(struct device *, u_long,
51 caddr_t));
52 void bio_unregister(struct device *);
53 #endif
54
55 #define BIOCINQ _IOWR('B', 32, struct bioc_inq)
56 struct bioc_inq {
57 void *bi_cookie;
58
59 char bi_dev[16]; /* controller device */
60 int bi_novol; /* nr of volumes */
61 int bi_nodisk; /* nr of total disks */
62 };
63
64 #define BIOCDISK _IOWR('B', 33, struct bioc_disk)
65 /* structure that represents a disk in a RAID volume */
66 struct bioc_disk {
67 void *bd_cookie;
68
69 u_int16_t bd_channel;
70 u_int16_t bd_target;
71 u_int16_t bd_lun;
72 u_int16_t bd_other_id; /* unused for now */
73
74 int bd_volid; /* associate with volume */
75 int bd_diskid; /* virtual disk */
76 int bd_status; /* current status */
77 #define BIOC_SDONLINE 0x00
78 #define BIOC_SDONLINE_S "Online"
79 #define BIOC_SDOFFLINE 0x01
80 #define BIOC_SDOFFLINE_S "Offline"
81 #define BIOC_SDFAILED 0x02
82 #define BIOC_SDFAILED_S "Failed"
83 #define BIOC_SDREBUILD 0x03
84 #define BIOC_SDREBUILD_S "Rebuild"
85 #define BIOC_SDHOTSPARE 0x04
86 #define BIOC_SDHOTSPARE_S "Hot spare"
87 #define BIOC_SDUNUSED 0x05
88 #define BIOC_SDUNUSED_S "Unused"
89 #define BIOC_SDSCRUB 0x06
90 #define BIOC_SDSCRUB_S "Scrubbing"
91 #define BIOC_SDINVALID 0xff
92 #define BIOC_SDINVALID_S "Invalid"
93 size_t bd_size; /* size of the disk */
94
95 char bd_vendor[32]; /* scsi string */
96 char bd_serial[32]; /* serial number */
97 char bd_procdev[16]; /* processor device */
98 };
99
100 #define BIOCVOL _IOWR('B', 34, struct bioc_vol)
101 /* structure that represents a RAID volume */
102 struct bioc_vol {
103 void *bv_cookie;
104 int bv_volid; /* volume id */
105
106 int16_t bv_percent; /* percent done operation */
107 u_int16_t bv_seconds; /* seconds of progress so far */
108
109 int bv_status; /* current status */
110 #define BIOC_SVONLINE 0x00
111 #define BIOC_SVONLINE_S "Online"
112 #define BIOC_SVOFFLINE 0x01
113 #define BIOC_SVOFFLINE_S "Offline"
114 #define BIOC_SVDEGRADED 0x02
115 #define BIOC_SVDEGRADED_S "Degraded"
116 #define BIOC_SVBUILDING 0x03
117 #define BIOC_SVBUILDING_S "Building"
118 #define BIOC_SVSCRUB 0x04
119 #define BIOC_SVSCRUB_S "Scrubbing"
120 #define BIOC_SVREBUILD 0x05
121 #define BIOC_SVREBUILD_S "Rebuild"
122 #define BIOC_SVINVALID 0xff
123 #define BIOC_SVINVALID_S "Invalid"
124 size_t bv_size; /* size of the disk */
125 int bv_level; /* raid level */
126 int bv_nodisk; /* nr of drives */
127
128 char bv_dev[16]; /* device */
129 char bv_vendor[32]; /* scsi string */
130 };
131
132 #define BIOCALARM _IOWR('B', 35, struct bioc_alarm)
133 struct bioc_alarm {
134 void *ba_cookie;
135 int ba_opcode;
136
137 int ba_status; /* only used with get state */
138 #define BIOC_SADISABLE 0x00 /* disable alarm */
139 #define BIOC_SAENABLE 0x01 /* enable alarm */
140 #define BIOC_SASILENCE 0x02 /* silence alarm */
141 #define BIOC_GASTATUS 0x03 /* get status */
142 #define BIOC_SATEST 0x04 /* test alarm */
143 };
144
145 #define BIOCBLINK _IOWR('B', 36, struct bioc_blink)
146 struct bioc_blink {
147 void *bb_cookie;
148 u_int16_t bb_channel;
149 u_int16_t bb_target;
150
151 int bb_status; /* current status */
152 #define BIOC_SBUNBLINK 0x00 /* disable blinking */
153 #define BIOC_SBBLINK 0x01 /* enable blink */
154 #define BIOC_SBALARM 0x02 /* enable alarm blink */
155 };
156
157 #define BIOCSETSTATE _IOWR('B', 37, struct bioc_setstate)
158 struct bioc_setstate {
159 void *bs_cookie;
160 u_int16_t bs_channel;
161 u_int16_t bs_target;
162 u_int16_t bs_lun;
163 u_int16_t bs_other_id; /* unused for now */
164
165 int bs_status; /* change to this status */
166 #define BIOC_SSONLINE 0x00 /* online disk */
167 #define BIOC_SSOFFLINE 0x01 /* offline disk */
168 #define BIOC_SSHOTSPARE 0x02 /* mark as hotspare */
169 #define BIOC_SSREBUILD 0x03 /* rebuild on this disk */
170 int bs_volid; /* volume id for rebuild */
171 };
172
173 #define BIOCCREATERAID _IOWR('B', 38, struct bioc_createraid)
174 struct bioc_createraid {
175 void *bc_cookie;
176 char *bc_dev_list;
177 u_int16_t bc_dev_list_len;
178 u_int16_t bc_level;
179 };
180
181 /* kernel and userspace defines */
182 #define BIOC_INQ 0x0001
183 #define BIOC_DISK 0x0002
184 #define BIOC_VOL 0x0004
185 #define BIOC_ALARM 0x0008
186 #define BIOC_BLINK 0x0010
187 #define BIOC_SETSTATE 0x0020
188 #define BIOC_CREATERAID 0x0040
189
190 /* user space defines */
191 #define BIOC_DEVLIST 0x10000
192 /* $NetBSD: biovar.h,v 1.1.22.2 2007/10/15 05:09:53 riz Exp $ */
193 /* $OpenBSD: biovar.h,v 1.26 2007/03/19 03:02:08 marco Exp $ */
194
195 /*
196 * Copyright (c) 2002 Niklas Hallqvist. All rights reserved.
197 * Copyright (c) 2005 Marco Peereboom. All rights reserved.
198 *
199 * Redistribution and use in source and binary forms, with or without
200 * modification, are permitted provided that the following conditions
201 * are met:
202 * 1. Redistributions of source code must retain the above copyright
203 * notice, this list of conditions and the following disclaimer.
204 * 2. Redistributions in binary form must reproduce the above copyright
205 * notice, this list of conditions and the following disclaimer in the
206 * documentation and/or other materials provided with the distribution.
207 *
208 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
209 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
210 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
211 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
212 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
213 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
214 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
215 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
216 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
217 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
218 */
219
220 /*
221 * Devices getting ioctls through this interface should use ioctl class 'B'
222 * and command numbers starting from 32, lower ones are reserved for generic
223 * ioctls. All ioctl data must be structures which start with a void *
224 * cookie.
225 */
226
227 #include <sys/types.h>
228
229 struct bio_common {
230 void *bc_cookie;
231 };
232
233 /* convert name to a cookie */
234 #define BIOCLOCATE _IOWR('B', 0, struct bio_locate)
235 struct bio_locate {
236 void *bl_cookie;
237 char *bl_name;
238 };
239
240 #ifdef _KERNEL
241 int bio_register(struct device *, int (*)(struct device *, u_long,
242 caddr_t));
243 void bio_unregister(struct device *);
244 #endif
245
246 #define BIOCINQ _IOWR('B', 32, struct bioc_inq)
247 struct bioc_inq {
248 void *bi_cookie;
249
250 char bi_dev[16]; /* controller device */
251 int bi_novol; /* nr of volumes */
252 int bi_nodisk; /* nr of total disks */
253 };
254
255 #define BIOCDISK _IOWR('B', 33, struct bioc_disk)
256 /* structure that represents a disk in a RAID volume */
257 struct bioc_disk {
258 void *bd_cookie;
259
260 u_int16_t bd_channel;
261 u_int16_t bd_target;
262 u_int16_t bd_lun;
263 u_int16_t bd_other_id; /* unused for now */
264
265 int bd_volid; /* associate with volume */
266 int bd_diskid; /* virtual disk */
267 int bd_status; /* current status */
268 #define BIOC_SDONLINE 0x00
269 #define BIOC_SDONLINE_S "Online"
270 #define BIOC_SDOFFLINE 0x01
271 #define BIOC_SDOFFLINE_S "Offline"
272 #define BIOC_SDFAILED 0x02
273 #define BIOC_SDFAILED_S "Failed"
274 #define BIOC_SDREBUILD 0x03
275 #define BIOC_SDREBUILD_S "Rebuild"
276 #define BIOC_SDHOTSPARE 0x04
277 #define BIOC_SDHOTSPARE_S "Hot spare"
278 #define BIOC_SDUNUSED 0x05
279 #define BIOC_SDUNUSED_S "Unused"
280 #define BIOC_SDSCRUB 0x06
281 #define BIOC_SDSCRUB_S "Scrubbing"
282 #define BIOC_SDINVALID 0xff
283 #define BIOC_SDINVALID_S "Invalid"
284 size_t bd_size; /* size of the disk */
285
286 char bd_vendor[32]; /* scsi string */
287 char bd_serial[32]; /* serial number */
288 char bd_procdev[16]; /* processor device */
289 };
290
291 #define BIOCVOL _IOWR('B', 34, struct bioc_vol)
292 /* structure that represents a RAID volume */
293 struct bioc_vol {
294 void *bv_cookie;
295 int bv_volid; /* volume id */
296
297 int16_t bv_percent; /* percent done operation */
298 u_int16_t bv_seconds; /* seconds of progress so far */
299
300 int bv_status; /* current status */
301 #define BIOC_SVONLINE 0x00
302 #define BIOC_SVONLINE_S "Online"
303 #define BIOC_SVOFFLINE 0x01
304 #define BIOC_SVOFFLINE_S "Offline"
305 #define BIOC_SVDEGRADED 0x02
306 #define BIOC_SVDEGRADED_S "Degraded"
307 #define BIOC_SVBUILDING 0x03
308 #define BIOC_SVBUILDING_S "Building"
309 #define BIOC_SVSCRUB 0x04
310 #define BIOC_SVSCRUB_S "Scrubbing"
311 #define BIOC_SVREBUILD 0x05
312 #define BIOC_SVREBUILD_S "Rebuild"
313 #define BIOC_SVINVALID 0xff
314 #define BIOC_SVINVALID_S "Invalid"
315 size_t bv_size; /* size of the disk */
316 int bv_level; /* raid level */
317 int bv_nodisk; /* nr of drives */
318
319 char bv_dev[16]; /* device */
320 char bv_vendor[32]; /* scsi string */
321 };
322
323 #define BIOCALARM _IOWR('B', 35, struct bioc_alarm)
324 struct bioc_alarm {
325 void *ba_cookie;
326 int ba_opcode;
327
328 int ba_status; /* only used with get state */
329 #define BIOC_SADISABLE 0x00 /* disable alarm */
330 #define BIOC_SAENABLE 0x01 /* enable alarm */
331 #define BIOC_SASILENCE 0x02 /* silence alarm */
332 #define BIOC_GASTATUS 0x03 /* get status */
333 #define BIOC_SATEST 0x04 /* test alarm */
334 };
335
336 #define BIOCBLINK _IOWR('B', 36, struct bioc_blink)
337 struct bioc_blink {
338 void *bb_cookie;
339 u_int16_t bb_channel;
340 u_int16_t bb_target;
341
342 int bb_status; /* current status */
343 #define BIOC_SBUNBLINK 0x00 /* disable blinking */
344 #define BIOC_SBBLINK 0x01 /* enable blink */
345 #define BIOC_SBALARM 0x02 /* enable alarm blink */
346 };
347
348 #define BIOCSETSTATE _IOWR('B', 37, struct bioc_setstate)
349 struct bioc_setstate {
350 void *bs_cookie;
351 u_int16_t bs_channel;
352 u_int16_t bs_target;
353 u_int16_t bs_lun;
354 u_int16_t bs_other_id; /* unused for now */
355
356 int bs_status; /* change to this status */
357 #define BIOC_SSONLINE 0x00 /* online disk */
358 #define BIOC_SSOFFLINE 0x01 /* offline disk */
359 #define BIOC_SSHOTSPARE 0x02 /* mark as hotspare */
360 #define BIOC_SSREBUILD 0x03 /* rebuild on this disk */
361 int bs_volid; /* volume id for rebuild */
362 };
363
364 #define BIOCCREATERAID _IOWR('B', 38, struct bioc_createraid)
365 struct bioc_createraid {
366 void *bc_cookie;
367 char *bc_dev_list;
368 u_int16_t bc_dev_list_len;
369 u_int16_t bc_level;
370 };
371
372 /* kernel and userspace defines */
373 #define BIOC_INQ 0x0001
374 #define BIOC_DISK 0x0002
375 #define BIOC_VOL 0x0004
376 #define BIOC_ALARM 0x0008
377 #define BIOC_BLINK 0x0010
378 #define BIOC_SETSTATE 0x0020
379 #define BIOC_CREATERAID 0x0040
380
381 /* user space defines */
382 #define BIOC_DEVLIST 0x10000
383 /* $NetBSD: biovar.h,v 1.1.22.2 2007/10/15 05:09:53 riz Exp $ */
384 /* $OpenBSD: biovar.h,v 1.26 2007/03/19 03:02:08 marco Exp $ */
385
386 /*
387 * Copyright (c) 2002 Niklas Hallqvist. All rights reserved.
388 * Copyright (c) 2005 Marco Peereboom. All rights reserved.
389 *
390 * Redistribution and use in source and binary forms, with or without
391 * modification, are permitted provided that the following conditions
392 * are met:
393 * 1. Redistributions of source code must retain the above copyright
394 * notice, this list of conditions and the following disclaimer.
395 * 2. Redistributions in binary form must reproduce the above copyright
396 * notice, this list of conditions and the following disclaimer in the
397 * documentation and/or other materials provided with the distribution.
398 *
399 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
400 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
401 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
402 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
403 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
404 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
405 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
406 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
407 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
408 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
409 */
410
411 /*
412 * Devices getting ioctls through this interface should use ioctl class 'B'
413 * and command numbers starting from 32, lower ones are reserved for generic
414 * ioctls. All ioctl data must be structures which start with a void *
415 * cookie.
416 */
417
418 #include <sys/types.h>
419
420 struct bio_common {
421 void *bc_cookie;
422 };
423
424 /* convert name to a cookie */
425 #define BIOCLOCATE _IOWR('B', 0, struct bio_locate)
426 struct bio_locate {
427 void *bl_cookie;
428 char *bl_name;
429 };
430
431 #ifdef _KERNEL
432 int bio_register(struct device *, int (*)(struct device *, u_long,
433 caddr_t));
434 void bio_unregister(struct device *);
435 #endif
436
437 #define BIOCINQ _IOWR('B', 32, struct bioc_inq)
438 struct bioc_inq {
439 void *bi_cookie;
440
441 char bi_dev[16]; /* controller device */
442 int bi_novol; /* nr of volumes */
443 int bi_nodisk; /* nr of total disks */
444 };
445
446 #define BIOCDISK _IOWR('B', 33, struct bioc_disk)
447 /* structure that represents a disk in a RAID volume */
448 struct bioc_disk {
449 void *bd_cookie;
450
451 u_int16_t bd_channel;
452 u_int16_t bd_target;
453 u_int16_t bd_lun;
454 u_int16_t bd_other_id; /* unused for now */
455
456 int bd_volid; /* associate with volume */
457 int bd_diskid; /* virtual disk */
458 int bd_status; /* current status */
459 #define BIOC_SDONLINE 0x00
460 #define BIOC_SDONLINE_S "Online"
461 #define BIOC_SDOFFLINE 0x01
462 #define BIOC_SDOFFLINE_S "Offline"
463 #define BIOC_SDFAILED 0x02
464 #define BIOC_SDFAILED_S "Failed"
465 #define BIOC_SDREBUILD 0x03
466 #define BIOC_SDREBUILD_S "Rebuild"
467 #define BIOC_SDHOTSPARE 0x04
468 #define BIOC_SDHOTSPARE_S "Hot spare"
469 #define BIOC_SDUNUSED 0x05
470 #define BIOC_SDUNUSED_S "Unused"
471 #define BIOC_SDSCRUB 0x06
472 #define BIOC_SDSCRUB_S "Scrubbing"
473 #define BIOC_SDINVALID 0xff
474 #define BIOC_SDINVALID_S "Invalid"
475 size_t bd_size; /* size of the disk */
476
477 char bd_vendor[32]; /* scsi string */
478 char bd_serial[32]; /* serial number */
479 char bd_procdev[16]; /* processor device */
480 };
481
482 #define BIOCVOL _IOWR('B', 34, struct bioc_vol)
483 /* structure that represents a RAID volume */
484 struct bioc_vol {
485 void *bv_cookie;
486 int bv_volid; /* volume id */
487
488 int16_t bv_percent; /* percent done operation */
489 u_int16_t bv_seconds; /* seconds of progress so far */
490
491 int bv_status; /* current status */
492 #define BIOC_SVONLINE 0x00
493 #define BIOC_SVONLINE_S "Online"
494 #define BIOC_SVOFFLINE 0x01
495 #define BIOC_SVOFFLINE_S "Offline"
496 #define BIOC_SVDEGRADED 0x02
497 #define BIOC_SVDEGRADED_S "Degraded"
498 #define BIOC_SVBUILDING 0x03
499 #define BIOC_SVBUILDING_S "Building"
500 #define BIOC_SVSCRUB 0x04
501 #define BIOC_SVSCRUB_S "Scrubbing"
502 #define BIOC_SVREBUILD 0x05
503 #define BIOC_SVREBUILD_S "Rebuild"
504 #define BIOC_SVINVALID 0xff
505 #define BIOC_SVINVALID_S "Invalid"
506 size_t bv_size; /* size of the disk */
507 int bv_level; /* raid level */
508 int bv_nodisk; /* nr of drives */
509
510 char bv_dev[16]; /* device */
511 char bv_vendor[32]; /* scsi string */
512 };
513
514 #define BIOCALARM _IOWR('B', 35, struct bioc_alarm)
515 struct bioc_alarm {
516 void *ba_cookie;
517 int ba_opcode;
518
519 int ba_status; /* only used with get state */
520 #define BIOC_SADISABLE 0x00 /* disable alarm */
521 #define BIOC_SAENABLE 0x01 /* enable alarm */
522 #define BIOC_SASILENCE 0x02 /* silence alarm */
523 #define BIOC_GASTATUS 0x03 /* get status */
524 #define BIOC_SATEST 0x04 /* test alarm */
525 };
526
527 #define BIOCBLINK _IOWR('B', 36, struct bioc_blink)
528 struct bioc_blink {
529 void *bb_cookie;
530 u_int16_t bb_channel;
531 u_int16_t bb_target;
532
533 int bb_status; /* current status */
534 #define BIOC_SBUNBLINK 0x00 /* disable blinking */
535 #define BIOC_SBBLINK 0x01 /* enable blink */
536 #define BIOC_SBALARM 0x02 /* enable alarm blink */
537 };
538
539 #define BIOCSETSTATE _IOWR('B', 37, struct bioc_setstate)
540 struct bioc_setstate {
541 void *bs_cookie;
542 u_int16_t bs_channel;
543 u_int16_t bs_target;
544 u_int16_t bs_lun;
545 u_int16_t bs_other_id; /* unused for now */
546
547 int bs_status; /* change to this status */
548 #define BIOC_SSONLINE 0x00 /* online disk */
549 #define BIOC_SSOFFLINE 0x01 /* offline disk */
550 #define BIOC_SSHOTSPARE 0x02 /* mark as hotspare */
551 #define BIOC_SSREBUILD 0x03 /* rebuild on this disk */
552 int bs_volid; /* volume id for rebuild */
553 };
554
555 #define BIOCCREATERAID _IOWR('B', 38, struct bioc_createraid)
556 struct bioc_createraid {
557 void *bc_cookie;
558 char *bc_dev_list;
559 u_int16_t bc_dev_list_len;
560 u_int16_t bc_level;
561 };
562
563 /* kernel and userspace defines */
564 #define BIOC_INQ 0x0001
565 #define BIOC_DISK 0x0002
566 #define BIOC_VOL 0x0004
567 #define BIOC_ALARM 0x0008
568 #define BIOC_BLINK 0x0010
569 #define BIOC_SETSTATE 0x0020
570 #define BIOC_CREATERAID 0x0040
571
572 /* user space defines */
573 #define BIOC_DEVLIST 0x10000
574