Print this page
701 UNMAP support for COMSTAR
Contributed by: Sumit Gupta <sumit.gupta@nexenta.com>
Reviewed by: Garrett D'Amore <garrett@nexenta.com>
Reviewed by: Eric Schrock <eric.schrock@delphix.com>
Reviewed by: George Wilson <gwilson@zfsmail.com>
| Split |
Close |
| Expand all |
| Collapse all |
--- old/usr/src/uts/common/sys/dkio.h
+++ new/usr/src/uts/common/sys/dkio.h
1 1 /*
2 2 * CDDL HEADER START
3 3 *
4 4 * The contents of this file are subject to the terms of the
5 5 * Common Development and Distribution License (the "License").
6 6 * You may not use this file except in compliance with the License.
7 7 *
8 8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 9 * or http://www.opensolaris.org/os/licensing.
10 10 * See the License for the specific language governing permissions
11 11 * and limitations under the License.
12 12 *
13 13 * When distributing Covered Code, include this CDDL HEADER in each
|
↓ open down ↓ |
13 lines elided |
↑ open up ↑ |
14 14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 15 * If applicable, add the following below this CDDL HEADER, with the
16 16 * fields enclosed by brackets "[]" replaced with your own identifying
17 17 * information: Portions Copyright [yyyy] [name of copyright owner]
18 18 *
19 19 * CDDL HEADER END
20 20 */
21 21
22 22 /*
23 23 * Copyright (c) 1982, 2010, Oracle and/or its affiliates. All rights reserved.
24 + *
25 + * Copyright 2011 Nexenta Systems, Inc. All rights reserved.
24 26 */
25 27
26 28 #ifndef _SYS_DKIO_H
27 29 #define _SYS_DKIO_H
28 30
29 31 #include <sys/dklabel.h> /* Needed for NDKMAP define */
30 32
31 33 #ifdef __cplusplus
32 34 extern "C" {
33 35 #endif
34 36
35 37 /*
36 38 * Structures and definitions for disk io control commands
37 39 */
38 40
39 41 /*
40 42 * Structures used as data by ioctl calls.
41 43 */
42 44
43 45 #define DK_DEVLEN 16 /* device name max length, including */
44 46 /* unit # & NULL (ie - "xyc1") */
45 47
46 48 /*
47 49 * Used for controller info
48 50 */
49 51 struct dk_cinfo {
50 52 char dki_cname[DK_DEVLEN]; /* controller name (no unit #) */
51 53 ushort_t dki_ctype; /* controller type */
52 54 ushort_t dki_flags; /* flags */
53 55 ushort_t dki_cnum; /* controller number */
54 56 uint_t dki_addr; /* controller address */
55 57 uint_t dki_space; /* controller bus type */
56 58 uint_t dki_prio; /* interrupt priority */
57 59 uint_t dki_vec; /* interrupt vector */
58 60 char dki_dname[DK_DEVLEN]; /* drive name (no unit #) */
59 61 uint_t dki_unit; /* unit number */
60 62 uint_t dki_slave; /* slave number */
61 63 ushort_t dki_partition; /* partition number */
62 64 ushort_t dki_maxtransfer; /* max. transfer size in DEV_BSIZE */
63 65 };
64 66
65 67 /*
66 68 * Controller types
67 69 */
68 70 #define DKC_UNKNOWN 0
69 71 #define DKC_CDROM 1 /* CD-ROM, SCSI or otherwise */
70 72 #define DKC_WDC2880 2
71 73 #define DKC_XXX_0 3 /* unassigned */
72 74 #define DKC_XXX_1 4 /* unassigned */
73 75 #define DKC_DSD5215 5
74 76 #define DKC_ACB4000 7
75 77 #define DKC_MD21 8
76 78 #define DKC_XXX_2 9 /* unassigned */
77 79 #define DKC_NCRFLOPPY 10
78 80 #define DKC_SMSFLOPPY 12
79 81 #define DKC_SCSI_CCS 13 /* SCSI CCS compatible */
80 82 #define DKC_INTEL82072 14 /* native floppy chip */
81 83 #define DKC_MD 16 /* meta-disk (virtual-disk) driver */
82 84 #define DKC_INTEL82077 19 /* 82077 floppy disk controller */
83 85 #define DKC_DIRECT 20 /* Intel direct attached device i.e. IDE */
84 86 #define DKC_PCMCIA_MEM 21 /* PCMCIA memory disk-like type (Obsolete) */
85 87 #define DKC_PCMCIA_ATA 22 /* PCMCIA AT Attached type */
86 88 #define DKC_VBD 23 /* virtual block device */
87 89 #define DKC_BLKDEV 24 /* generic block device (see blkdev(7d)) */
88 90
89 91 /*
90 92 * Sun reserves up through 1023
91 93 */
92 94
93 95 #define DKC_CUSTOMER_BASE 1024
94 96
95 97 /*
96 98 * Flags
97 99 */
98 100 #define DKI_BAD144 0x01 /* use DEC std 144 bad sector fwding */
99 101 #define DKI_MAPTRK 0x02 /* controller does track mapping */
100 102 #define DKI_FMTTRK 0x04 /* formats only full track at a time */
101 103 #define DKI_FMTVOL 0x08 /* formats only full volume at a time */
102 104 #define DKI_FMTCYL 0x10 /* formats only full cylinders at a time */
103 105 #define DKI_HEXUNIT 0x20 /* unit number is printed as 3 hex digits */
104 106 #define DKI_PCMCIA_PFD 0x40 /* PCMCIA pseudo-floppy memory card */
105 107
106 108 /*
107 109 * Used for all partitions
108 110 */
109 111 struct dk_allmap {
110 112 struct dk_map dka_map[NDKMAP];
111 113 };
112 114
113 115 #if defined(_SYSCALL32)
114 116 struct dk_allmap32 {
115 117 struct dk_map32 dka_map[NDKMAP];
116 118 };
117 119 #endif /* _SYSCALL32 */
118 120
119 121 /*
120 122 * Definition of a disk's geometry
121 123 */
122 124 struct dk_geom {
123 125 unsigned short dkg_ncyl; /* # of data cylinders */
124 126 unsigned short dkg_acyl; /* # of alternate cylinders */
125 127 unsigned short dkg_bcyl; /* cyl offset (for fixed head area) */
126 128 unsigned short dkg_nhead; /* # of heads */
127 129 unsigned short dkg_obs1; /* obsolete */
128 130 unsigned short dkg_nsect; /* # of data sectors per track */
129 131 unsigned short dkg_intrlv; /* interleave factor */
130 132 unsigned short dkg_obs2; /* obsolete */
131 133 unsigned short dkg_obs3; /* obsolete */
132 134 unsigned short dkg_apc; /* alternates per cyl (SCSI only) */
133 135 unsigned short dkg_rpm; /* revolutions per minute */
134 136 unsigned short dkg_pcyl; /* # of physical cylinders */
135 137 unsigned short dkg_write_reinstruct; /* # sectors to skip, writes */
136 138 unsigned short dkg_read_reinstruct; /* # sectors to skip, reads */
137 139 unsigned short dkg_extra[7]; /* for compatible expansion */
138 140 };
139 141
140 142 /*
141 143 * These defines are for historic compatibility with old drivers.
142 144 */
143 145 #define dkg_bhead dkg_obs1 /* used to be head offset */
144 146 #define dkg_gap1 dkg_obs2 /* used to be gap1 */
145 147 #define dkg_gap2 dkg_obs3 /* used to be gap2 */
146 148
147 149 /*
148 150 * Disk io control commands
149 151 * Warning: some other ioctls with the DIOC prefix exist elsewhere.
150 152 * The Generic DKIOC numbers are from 0 - 50.
151 153 * The Floppy Driver uses 51 - 100.
152 154 * The Hard Disk (except SCSI) 101 - 106. (these are obsolete)
153 155 * The CDROM Driver 151 - 200.
154 156 * The USCSI ioctl 201 - 250.
155 157 */
156 158 #define DKIOC (0x04 << 8)
157 159
158 160 /*
159 161 * The following ioctls are generic in nature and need to be
160 162 * suported as appropriate by all disk drivers
161 163 */
162 164 #define DKIOCGGEOM (DKIOC|1) /* Get geometry */
163 165 #define DKIOCINFO (DKIOC|3) /* Get info */
164 166 #define DKIOCEJECT (DKIOC|6) /* Generic 'eject' */
165 167 #define DKIOCGVTOC (DKIOC|11) /* Get VTOC */
166 168 #define DKIOCSVTOC (DKIOC|12) /* Set VTOC & Write to Disk */
167 169
168 170 #define DKIOCGEXTVTOC (DKIOC|23) /* Get extended VTOC */
169 171 #define DKIOCSEXTVTOC (DKIOC|24) /* Set extended VTOC, Write to Disk */
170 172
171 173 /*
172 174 * Disk Cache Controls. These ioctls should be supported by
173 175 * all disk drivers.
174 176 *
175 177 * DKIOCFLUSHWRITECACHE when used from user-mode ignores the ioctl
176 178 * argument, but it should be passed as NULL to allow for future
177 179 * reinterpretation. From user-mode, this ioctl request is synchronous.
178 180 *
179 181 * When invoked from within the kernel, the arg can be NULL to indicate
180 182 * a synchronous request or can be the address of a struct dk_callback
181 183 * to request an asynchronous callback when the flush request is complete.
182 184 * In this case, the flag to the ioctl must include FKIOCTL and the
183 185 * dkc_callback field of the pointed to struct must be non-null or the
184 186 * request is made synchronously.
185 187 *
186 188 * In the callback case: if the ioctl returns 0, a callback WILL be performed.
187 189 * If the ioctl returns non-zero, a callback will NOT be performed.
188 190 * NOTE: In some cases, the callback may be done BEFORE the ioctl call
189 191 * returns. The caller's locking strategy should be prepared for this case.
190 192 */
191 193 #define DKIOCFLUSHWRITECACHE (DKIOC|34) /* flush cache to phys medium */
192 194
193 195 struct dk_callback {
194 196 void (*dkc_callback)(void *dkc_cookie, int error);
195 197 void *dkc_cookie;
196 198 int dkc_flag;
197 199 };
198 200
199 201 /* bit flag definitions for dkc_flag */
200 202 #define FLUSH_VOLATILE 0x1 /* Bit 0: if set, only flush */
201 203 /* volatile cache; otherwise, flush */
202 204 /* volatile and non-volatile cache */
203 205
204 206 #define DKIOCGETWCE (DKIOC|36) /* Get current write cache */
205 207 /* enablement status */
206 208 #define DKIOCSETWCE (DKIOC|37) /* Enable/Disable write cache */
207 209
208 210 /*
209 211 * The following ioctls are used by Sun drivers to communicate
210 212 * with their associated format routines. Support of these ioctls
211 213 * is not required of foreign drivers
212 214 */
213 215 #define DKIOCSGEOM (DKIOC|2) /* Set geometry */
214 216 #define DKIOCSAPART (DKIOC|4) /* Set all partitions */
215 217 #define DKIOCGAPART (DKIOC|5) /* Get all partitions */
216 218 #define DKIOCG_PHYGEOM (DKIOC|32) /* get physical geometry */
217 219 #define DKIOCG_VIRTGEOM (DKIOC|33) /* get virtual geometry */
218 220
219 221 /*
220 222 * The following ioctl's are removable media support
221 223 */
222 224 #define DKIOCLOCK (DKIOC|7) /* Generic 'lock' */
223 225 #define DKIOCUNLOCK (DKIOC|8) /* Generic 'unlock' */
224 226 #define DKIOCSTATE (DKIOC|13) /* Inquire insert/eject state */
225 227 #define DKIOCREMOVABLE (DKIOC|16) /* is media removable */
226 228
227 229
228 230 /*
229 231 * ioctl for hotpluggable devices
230 232 */
231 233 #define DKIOCHOTPLUGGABLE (DKIOC|35) /* is hotpluggable */
232 234
233 235 #if defined(__i386) || defined(__amd64)
234 236 /* ioctl to write extended partition structure into the disk */
235 237 #define DKIOCSETEXTPART (DKIOC|46)
236 238 #endif
237 239
238 240 /*
239 241 * Ioctl to force driver to re-read the alternate partition and rebuild
240 242 * the internal defect map.
241 243 */
242 244 #define DKIOCADDBAD (DKIOC|20) /* Re-read the alternate map (IDE) */
243 245 #define DKIOCGETDEF (DKIOC|21) /* read defect list (IDE) */
244 246
245 247 /*
246 248 * Used by applications to get disk defect information from IDE
247 249 * drives.
248 250 */
249 251 #ifdef _SYSCALL32
250 252 struct defect_header32 {
251 253 int head;
252 254 caddr32_t buffer;
253 255 };
254 256 #endif /* _SYSCALL32 */
255 257
256 258 struct defect_header {
257 259 int head;
258 260 caddr_t buffer;
259 261 };
260 262
261 263 #define DKIOCPARTINFO (DKIOC|22) /* Get partition or slice parameters */
262 264 #define DKIOCEXTPARTINFO (DKIOC|19) /* Get extended partition or slice */
263 265 /* parameters */
264 266
265 267
266 268 /*
267 269 * Used by applications to get partition or slice information
268 270 */
269 271 #ifdef _SYSCALL32
270 272 struct part_info32 {
271 273 daddr32_t p_start;
272 274 int p_length;
273 275 };
274 276 #endif /* _SYSCALL32 */
275 277
276 278 struct part_info {
277 279 daddr_t p_start;
278 280 int p_length;
279 281 };
280 282
281 283 struct extpart_info {
282 284 diskaddr_t p_start;
283 285 diskaddr_t p_length;
284 286 };
285 287
286 288 /* The following ioctls are for Optical Memory Device */
287 289 #define DKIOC_EBP_ENABLE (DKIOC|40) /* enable by pass erase on write */
288 290 #define DKIOC_EBP_DISABLE (DKIOC|41) /* disable by pass erase on write */
289 291
290 292 /*
291 293 * This state enum is the argument passed to the DKIOCSTATE ioctl.
292 294 */
293 295 enum dkio_state { DKIO_NONE, DKIO_EJECTED, DKIO_INSERTED, DKIO_DEV_GONE };
294 296
295 297 #define DKIOCGMEDIAINFO (DKIOC|42) /* get information about the media */
296 298
297 299 /*
298 300 * ioctls to read/write mboot info.
299 301 */
300 302 #define DKIOCGMBOOT (DKIOC|43) /* get mboot info */
301 303 #define DKIOCSMBOOT (DKIOC|44) /* set mboot info */
302 304
303 305 /*
304 306 * ioctl to get the device temperature.
305 307 */
306 308 #define DKIOCGTEMPERATURE (DKIOC|45) /* get temperature */
307 309
308 310 /*
309 311 * ioctl to get the media info including physical block size
310 312 */
311 313 #define DKIOCGMEDIAINFOEXT (DKIOC|48)
312 314
313 315 /*
314 316 * ioctl to determine whether media is write-protected
315 317 */
316 318 #define DKIOCREADONLY (DKIOC|49)
317 319
318 320 /*
319 321 * Used for providing the temperature.
320 322 */
321 323
322 324 struct dk_temperature {
323 325 uint_t dkt_flags; /* Flags */
324 326 short dkt_cur_temp; /* Current disk temperature */
325 327 short dkt_ref_temp; /* reference disk temperature */
326 328 };
327 329
328 330 #define DKT_BYPASS_PM 0x1
329 331 #define DKT_INVALID_TEMP 0xFFFF
330 332
331 333
332 334 /*
333 335 * Used for Media info or the current profile info
334 336 */
335 337 struct dk_minfo {
336 338 uint_t dki_media_type; /* Media type or profile info */
337 339 uint_t dki_lbsize; /* Logical blocksize of media */
338 340 diskaddr_t dki_capacity; /* Capacity as # of dki_lbsize blks */
339 341 };
340 342
341 343 /*
342 344 * Used for Media info or the current profile info
343 345 * including physical block size if supported.
344 346 */
345 347 struct dk_minfo_ext {
346 348 uint_t dki_media_type; /* Media type or profile info */
347 349 uint_t dki_lbsize; /* Logical blocksize of media */
348 350 diskaddr_t dki_capacity; /* Capacity as # of dki_lbsize blks */
349 351 uint_t dki_pbsize; /* Physical blocksize of media */
350 352 };
351 353
352 354 /*
353 355 * Media types or profiles known
354 356 */
355 357 #define DK_UNKNOWN 0x00 /* Media inserted - type unknown */
356 358
357 359
358 360 /*
359 361 * SFF 8090 Specification Version 3, media types 0x01 - 0xfffe are retained to
360 362 * maintain compatibility with SFF8090. The following define the
361 363 * optical media type.
362 364 */
363 365 #define DK_REMOVABLE_DISK 0x02 /* Removable Disk */
364 366 #define DK_MO_ERASABLE 0x03 /* MO Erasable */
365 367 #define DK_MO_WRITEONCE 0x04 /* MO Write once */
366 368 #define DK_AS_MO 0x05 /* AS MO */
367 369 #define DK_CDROM 0x08 /* CDROM */
368 370 #define DK_CDR 0x09 /* CD-R */
369 371 #define DK_CDRW 0x0A /* CD-RW */
370 372 #define DK_DVDROM 0x10 /* DVD-ROM */
371 373 #define DK_DVDR 0x11 /* DVD-R */
372 374 #define DK_DVDRAM 0x12 /* DVD_RAM or DVD-RW */
373 375
374 376 /*
375 377 * Media types for other rewritable magnetic media
376 378 */
377 379 #define DK_FIXED_DISK 0x10001 /* Fixed disk SCSI or otherwise */
378 380 #define DK_FLOPPY 0x10002 /* Floppy media */
379 381 #define DK_ZIP 0x10003 /* IOMEGA ZIP media */
380 382 #define DK_JAZ 0x10004 /* IOMEGA JAZ media */
381 383
382 384 #define DKIOCSETEFI (DKIOC|17) /* Set EFI info */
383 385 #define DKIOCGETEFI (DKIOC|18) /* Get EFI info */
384 386
385 387 #define DKIOCPARTITION (DKIOC|9) /* Get partition info */
386 388
387 389 /*
388 390 * Ioctls to get/set volume capabilities related to Logical Volume Managers.
389 391 * They include the ability to get/set capabilities and to issue a read to a
390 392 * specific underlying device of a replicated device.
391 393 */
392 394
393 395 #define DKIOCGETVOLCAP (DKIOC | 25) /* Get volume capabilities */
394 396 #define DKIOCSETVOLCAP (DKIOC | 26) /* Set volume capabilities */
395 397 #define DKIOCDMR (DKIOC | 27) /* Issue a directed read */
396 398
397 399 #define DKIOCDUMPINIT (DKIOC | 28) /* Dumpify a zvol */
398 400 #define DKIOCDUMPFINI (DKIOC | 29) /* Un-Dumpify a zvol */
399 401
400 402 typedef uint_t volcapinfo_t;
401 403
402 404 typedef uint_t volcapset_t;
403 405
404 406 #define DKV_ABR_CAP 0x00000001 /* Support Appl.Based Recovery */
405 407 #define DKV_DMR_CAP 0x00000002 /* Support Directed Mirror Read */
406 408
407 409 typedef struct volcap {
408 410 volcapinfo_t vc_info; /* Capabilities available */
409 411 volcapset_t vc_set; /* Capabilities set */
410 412 } volcap_t;
411 413
412 414 #define VOL_SIDENAME 256
413 415
414 416 typedef struct vol_directed_rd {
415 417 int vdr_flags;
416 418 offset_t vdr_offset;
417 419 size_t vdr_nbytes;
418 420 size_t vdr_bytesread;
419 421 void *vdr_data;
420 422 int vdr_side;
421 423 char vdr_side_name[VOL_SIDENAME];
422 424 } vol_directed_rd_t;
423 425
424 426 #define DKV_SIDE_INIT (-1)
425 427 #define DKV_DMR_NEXT_SIDE 0x00000001
426 428 #define DKV_DMR_DONE 0x00000002
427 429 #define DKV_DMR_ERROR 0x00000004
428 430 #define DKV_DMR_SUCCESS 0x00000008
429 431 #define DKV_DMR_SHORT 0x00000010
430 432
431 433 #ifdef _MULTI_DATAMODEL
432 434 #if _LONG_LONG_ALIGNMENT == 8 && _LONG_LONG_ALIGNMENT_32 == 4
433 435 #pragma pack(4)
434 436 #endif
435 437 typedef struct vol_directed_rd32 {
436 438 int32_t vdr_flags;
437 439 offset_t vdr_offset; /* 64-bit element on 32-bit alignment */
438 440 size32_t vdr_nbytes;
439 441 size32_t vdr_bytesread;
440 442 caddr32_t vdr_data;
441 443 int32_t vdr_side;
442 444 char vdr_side_name[VOL_SIDENAME];
443 445 } vol_directed_rd32_t;
444 446 #if _LONG_LONG_ALIGNMENT == 8 && _LONG_LONG_ALIGNMENT_32 == 4
445 447 #pragma pack()
446 448 #endif
447 449 #endif /* _MULTI_DATAMODEL */
448 450
449 451 /*
450 452 * The ioctl is used to fetch disk's device type, vendor ID,
451 453 * model number/product ID, firmware revision and serial number together.
452 454 *
453 455 * Currently there are two device types - DKD_ATA_TYPE which means the
454 456 * disk is driven by cmdk/ata or dad/uata driver, and DKD_SCSI_TYPE
455 457 * which means the disk is driven by sd/scsi hba driver.
456 458 */
457 459 #define DKIOC_GETDISKID (DKIOC|46)
458 460
459 461 /* These two labels are for dkd_dtype of dk_disk_id_t */
460 462 #define DKD_ATA_TYPE 0x01 /* ATA disk or legacy mode SATA disk */
461 463 #define DKD_SCSI_TYPE 0x02 /* SCSI disk or native mode SATA disk */
462 464
463 465 #define DKD_ATA_MODEL 40 /* model number length */
464 466 #define DKD_ATA_FWVER 8 /* firmware revision length */
465 467 #define DKD_ATA_SERIAL 20 /* serial number length */
466 468
467 469 #define DKD_SCSI_VENDOR 8 /* vendor ID length */
468 470 #define DKD_SCSI_PRODUCT 16 /* product ID length */
469 471 #define DKD_SCSI_REVLEVEL 4 /* revision level length */
470 472 #define DKD_SCSI_SERIAL 12 /* serial number length */
471 473
472 474 /*
473 475 * The argument type for DKIOC_GETDISKID ioctl.
474 476 */
475 477 typedef struct dk_disk_id {
476 478 uint_t dkd_dtype;
477 479 union {
478 480 struct {
479 481 char dkd_amodel[DKD_ATA_MODEL]; /* 40 bytes */
480 482 char dkd_afwver[DKD_ATA_FWVER]; /* 8 bytes */
481 483 char dkd_aserial[DKD_ATA_SERIAL]; /* 20 bytes */
482 484 } ata_disk_id;
483 485 struct {
484 486 char dkd_svendor[DKD_SCSI_VENDOR]; /* 8 bytes */
485 487 char dkd_sproduct[DKD_SCSI_PRODUCT]; /* 16 bytes */
486 488 char dkd_sfwver[DKD_SCSI_REVLEVEL]; /* 4 bytes */
487 489 char dkd_sserial[DKD_SCSI_SERIAL]; /* 12 bytes */
488 490 } scsi_disk_id;
489 491 } disk_id;
490 492 } dk_disk_id_t;
491 493
492 494 /*
493 495 * The ioctl is used to update the firmware of device.
494 496 */
495 497 #define DKIOC_UPDATEFW (DKIOC|47)
496 498
497 499 /* The argument type for DKIOC_UPDATEFW ioctl */
498 500 typedef struct dk_updatefw {
499 501 caddr_t dku_ptrbuf; /* pointer to firmware buf */
500 502 uint_t dku_size; /* firmware buf length */
501 503 uint8_t dku_type; /* firmware update type */
502 504 } dk_updatefw_t;
503 505
504 506 #ifdef _SYSCALL32
505 507 typedef struct dk_updatefw_32 {
506 508 caddr32_t dku_ptrbuf; /* pointer to firmware buf */
507 509 uint_t dku_size; /* firmware buf length */
|
↓ open down ↓ |
474 lines elided |
↑ open up ↑ |
508 510 uint8_t dku_type; /* firmware update type */
509 511 } dk_updatefw_32_t;
510 512 #endif /* _SYSCALL32 */
511 513
512 514 /*
513 515 * firmware update type - temporary or permanent use
514 516 */
515 517 #define FW_TYPE_TEMP 0x0 /* temporary use */
516 518 #define FW_TYPE_PERM 0x1 /* permanent use */
517 519
520 +/*
521 + * ioctl to free space (e.g. SCSI UNMAP) off a disk.
522 + */
523 +#define DKIOCFREE (DKIOC|50)
518 524
525 +typedef struct dkioc_free_s {
526 + uint32_t df_flags;
527 + uint32_t df_reserved; /* For easy 64-bit alignment below... */
528 + diskaddr_t df_start;
529 + diskaddr_t df_length;
530 +} dkioc_free_t;
531 +
532 +#define DF_WAIT_SYNC 0x00000001 /* Wait for full write-out of free. */
533 +
519 534 #ifdef __cplusplus
520 535 }
521 536 #endif
522 537
523 538 #endif /* _SYS_DKIO_H */
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX