HomeFreeBSD

Add VIRTIO_BLK_T_DISCARD (TRIM) support to the bhyve virtio-blk backend

Description

Add VIRTIO_BLK_T_DISCARD (TRIM) support to the bhyve virtio-blk backend

This will advertise support for TRIM to the guest virtio-blk driver and
perform the DIOCGDELETE ioctl on the backing storage if it supports it.

Thanks to Jason King and others at Joyent and illumos for expanding on
my original patch, adding improvements including better error handling
and making sure to following the virtio spec.

Submitted by: Jason King <jason.king@joyent.com> (improvements)
Reviewed by: jhb
Obtained from: illumos-joyent (improvements)
MFC after: 1 month
Relnotes: yes
Sponsored by: Klara Inc.
Differential Revision: https://reviews.freebsd.org/D21707

Details

Provenance
allanjudeAuthored on
Reviewer
jhb
Differential Revision
D21707: Add VIRTIO_BLK_T_DISCARD (TRIM) support to the bhyve virtio-blk backend
Parents
rS360228: arm64: rockchip: Fix TSADC on RK3328
Branches
Unknown
Tags
Unknown