freebsd-dev/sys/dev/virtio/block
Allan Jude 2cc8a524af 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
2020-07-16 16:32:16 +00:00
..
virtio_blk.c Add VIRTIO_BLK_T_DISCARD support to the virtio-blk driver 2020-07-16 16:32:16 +00:00
virtio_blk.h Add VIRTIO_BLK_T_DISCARD support to the virtio-blk driver 2020-07-16 16:32:16 +00:00