svn commit: r365614 - in stable/12: sys/dev/virtio/block usr.sbin/bhyve

Alan Somers asomers at freebsd.org
Thu Sep 10 21:44:38 UTC 2020


On Thu, Sep 10, 2020 at 3:01 PM Allan Jude <allanjude at freebsd.org> wrote:

> Author: allanjude
> Date: Thu Sep 10 21:01:22 2020
> New Revision: 365614
> URL: https://svnweb.freebsd.org/changeset/base/365614
>
> Log:
>   MFC r360229, r363255
>
>   r360229:
>   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.
>
>   r363255:
>   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
>
>   Relnotes:     yes
>   Sponsored by: Klara Inc.
>
> Modified:
>   stable/12/sys/dev/virtio/block/virtio_blk.c
>   stable/12/sys/dev/virtio/block/virtio_blk.h
>   stable/12/usr.sbin/bhyve/block_if.c
>   stable/12/usr.sbin/bhyve/pci_virtio_block.c
> Directory Properties:
>   stable/12/   (props changed)
>

Yay!


More information about the svn-src-stable mailing list