Feature #12941
openSupport multiple extents in bhyve blockif_delete
0%
Description
Currently, the blockif_delete() function only supports deleting a single extent (offset + length) per request. This mimics the current semantics of the FreeBSD DIOCDELETE ioctl which only allows a single extent per call. The bhyve virtio block support always advertises supporting a single extent to match the FreeBSD limits (when advertising the discard feature to guests). However the emulated NVMe device supports requests w/ up to 256 extents (the maximum allowed by the NVMe spec). It does this by storing additional extents in the request's br_iov
array and then using a loopback to issue an ioctl for each extent in the NVMe dataset management command.
illumos's DKIOCFREE ioctl supports passing multiple extents in a single request (following the interfaces such as SCSI, ATA, virtio, and NVMe which all potentially allow multiple extents to be provided in a single request). We should enhance the illumos blockif_delete() code to support multiple extents. We can map additional extents to the br_iov
array as the current NVMe support does, except we can then issue a single ioctl() to the underlying block device instead of looping.
No data to display