Print this page
document DKIOCFREE
*** 516,525 ****
--- 516,574 ----
} while (rval != EINVAL || dr->vdr_flags &
(DKV_DMR_DONE | DKV_DMR_ERROR | DKV_DMR_SHORT)
}
}
+ DKIOCFREE
+
+ The argument is a pointer to a dkioc_free_list_t structure (described
+ below). The structure consists of a header followed by one or more
+ dkioc_free_list_ext_t strctures (described below) that list the
+ extents that the device should free.
+
+ typedef struct dkioc_free_list_ext_s {
+ uint64_t dfle_start;
+ uint64_t dfle_length;
+ } dkioc_free_list_ext_t;
+
+ typedef struct dkioc_free_list_s {
+ uint64_t dfl_flags;
+ uint64_t dfl_num_exts;
+ uint64_t dfl_offset;
+ dkioc_free_list_ext_t dfl_exts[1];
+ } dkioc_free_list_t;
+
+ The dfle_start, dfle_length, and dfl_offset fields are in units of
+ bytes (not blocks).
+
+ The values for dfl_flags are:
+
+ DF_WAIT_SYNC Wait for the device to complete freeing the space before
+ returning.
+
+ The dfl_num_exts field indicates the number of dkioc_free_list_ext_t
+ structures follow the dkioc_free_list_t structure (including the first
+ entry in dfl_exts). There must be at least one dkioc_free_list_ext_t
+ in the ioctl(2) request (i.e. dfl_num_exts must be >= 1).
+
+ The dfl_offset field is added to all of the values of dfle_start when
+ processed by the device.
+
+ The dfl_exts field contains the first extent to free, immediately
+ followed by any additional dkioc_free_list_ext_t structures if there
+ are more than one extent to free.
+
+ The DFL_SZ(num_exts) macro can be used to calculate the amount of
+ memory required to hold num_exts extents.
+
+ DKIOC_CANFREE
+ The argument is a pointer to an int that is populated by the ioctl(2)
+ request. Upon a successful return, if a non-zero value has been set
+ in the int parameter, it indicates that the device supports the
+ DKIOCFREE ioctl(2). If the int parameter has been set to zero, the
+ DKIOCFREE ioctl(2) is not supported by the device.
+
RETURN VALUES
Upon successful completion, the value returned is 0. Otherwise, -1 is
returned and errno is set to indicate the error.
x86 Only
*** 639,644 ****
partition is changed. The default VTOC persists until the ioctl
DKIOCSVTOC is called to modify VTOC or the device is closed and reopened.
At that point, the old valid VTOC is read from the disk if it is still
available.
! illumos October 23, 2017 illumos
--- 688,693 ----
partition is changed. The default VTOC persists until the ioctl
DKIOCSVTOC is called to modify VTOC or the device is closed and reopened.
At that point, the old valid VTOC is read from the disk if it is still
available.
! illumos February 14, 2020 illumos