HomeFreeBSD

Add VIRTIO_BLK_T_DISCARD support to the virtio-blk driver

Description

Add VIRTIO_BLK_T_DISCARD support to the virtio-blk driver

If the hypervisor advertises support for the DISCARD command then the
guest can perform TRIM commands, freeing space on the backing store.

If VIRTIO_BLK_F_DISCARD is enabled, advertise DISKFLAG_CANDELETE

Tested with FreeBSD guests on bhyve and KVM

Reviewed by: jhb
Tested by: freqlabs
MFC after: 1 month
Relnotes: yes
Sponsored by: Klara Inc.
Differential Revision: https://reviews.freebsd.org/D21708

Details

Provenance
allanjudeAuthored on
Reviewer
jhb
Differential Revision
D21708: Add VIRTIO_BLK_T_DISCARD support to the virtio-blk driver
Parents
rS363254: Add a RELNOTES entry for r363253.
Branches
Unknown
Tags
Unknown