]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
bhyve: implement NVMe deallocate command
authorChuck Tuffli <chuck@FreeBSD.org>
Fri, 27 Mar 2020 15:28:11 +0000 (15:28 +0000)
committerChuck Tuffli <chuck@FreeBSD.org>
Fri, 27 Mar 2020 15:28:11 +0000 (15:28 +0000)
commitcd65e08916415af2282d9f99858b7169ff6cd87b
treea5d4ebf34b1bd2b3d1e2bb58788ab20f16ff3594
parentd31d525ef5cc35c8eb22e395b478dde61cb98a42
bhyve: implement NVMe deallocate command

This adds support for the Dataset Management (DSM) command to the NVMe
emulation in general, and more specifically, for the deallocate
attribute (a.k.a. trim in the ATA protocol). If the backing storage for
the namespace supports delete (i.e. deallocate), setting the deallocate
attribute in a DSM will trim/delete the requested LBA ranges in the
underlying storage.

Reviewed by: jhb, araujo, imp
Approved by: jhb (maintainer)
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D21839
usr.sbin/bhyve/pci_nvme.c