Print this page
document DKIOCFREE

Split Close
Expand all
Collapse all
          --- old/usr/src/man/man7i/dkio.7i.man.txt
          +++ new/usr/src/man/man7i/dkio.7i.man.txt
↓ open down ↓ 510 lines elided ↑ open up ↑
 511  511                            do {
 512  512                                    rval = ioctl(fildes, DKIODMR, dr);
 513  513                                    if (rval != EINVAL) {
 514  514                                            /* Process data */
 515  515                                    }
 516  516                            } while (rval != EINVAL || dr->vdr_flags &
 517  517                                (DKV_DMR_DONE | DKV_DMR_ERROR | DKV_DMR_SHORT)
 518  518                    }
 519  519            }
 520  520  
      521 +     DKIOCFREE
      522 +
      523 +        The argument is a pointer to a dkioc_free_list_t structure (described
      524 +        below).  The structure consists of a header followed by one or more
      525 +        dkioc_free_list_ext_t strctures (described below) that list the
      526 +        extents that the device should free.
      527 +
      528 +          typedef struct dkioc_free_list_ext_s {
      529 +                  uint64_t                dfle_start;
      530 +                  uint64_t                dfle_length;
      531 +          } dkioc_free_list_ext_t;
      532 +
      533 +          typedef struct dkioc_free_list_s {
      534 +                  uint64_t                dfl_flags;
      535 +                  uint64_t                dfl_num_exts;
      536 +                  uint64_t                dfl_offset;
      537 +                  dkioc_free_list_ext_t   dfl_exts[1];
      538 +          } dkioc_free_list_t;
      539 +
      540 +        The dfle_start, dfle_length, and dfl_offset fields are in units of
      541 +        bytes (not blocks).
      542 +
      543 +        The values for dfl_flags are:
      544 +
      545 +        DF_WAIT_SYNC  Wait for the device to complete freeing the space before
      546 +                      returning.
      547 +
      548 +        The dfl_num_exts field indicates the number of dkioc_free_list_ext_t
      549 +        structures follow the dkioc_free_list_t structure (including the first
      550 +        entry in dfl_exts).  There must be at least one dkioc_free_list_ext_t
      551 +        in the ioctl(2) request (i.e.  dfl_num_exts must be >= 1).
      552 +
      553 +        The dfl_offset field is added to all of the values of dfle_start when
      554 +        processed by the device.
      555 +
      556 +        The dfl_exts field contains the first extent to free, immediately
      557 +        followed by any additional dkioc_free_list_ext_t structures if there
      558 +        are more than one extent to free.
      559 +
      560 +        The DFL_SZ(num_exts) macro can be used to calculate the amount of
      561 +        memory required to hold num_exts extents.
      562 +
      563 +     DKIOC_CANFREE
      564 +        The argument is a pointer to an int that is populated by the ioctl(2)
      565 +        request.  Upon a successful return, if a non-zero value has been set
      566 +        in the int parameter, it indicates that the device supports the
      567 +        DKIOCFREE ioctl(2).  If the int parameter has been set to zero, the
      568 +        DKIOCFREE ioctl(2) is not supported by the device.
      569 +
 521  570     RETURN VALUES
 522  571       Upon successful completion, the value returned is 0.  Otherwise, -1 is
 523  572       returned and errno is set to indicate the error.
 524  573  
 525  574     x86 Only
 526  575       The following ioctl(2) requests set and/or retrieve the current disk
 527  576       controller, partitions, or geometry information on the x86 architecture.
 528  577  
 529  578       DKIOCG_PHYGEOM
 530  579  
↓ open down ↓ 103 lines elided ↑ open up ↑
 634  683       For x86 only: If the DKIOCSMBOOT command is used to modify the Solaris
 635  684       partitions, the VTOC information should also be set appropriately to
 636  685       reflect the changes to partition.  Failure to do so leads to unexpected
 637  686       results when the device is closed and reopened fresh at a later time.
 638  687       This is because a default VTOC is assumed by driver when a Solaris
 639  688       partition is changed.  The default VTOC persists until the ioctl
 640  689       DKIOCSVTOC is called to modify VTOC or the device is closed and reopened.
 641  690       At that point, the old valid VTOC is read from the disk if it is still
 642  691       available.
 643  692  
 644      -illumos                        October 23, 2017                        illumos
      693 +illumos                        February 14, 2020                       illumos
    
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX