Page MenuHomeFreeBSD

bhyve: implement NVMe flush command

Authored by on Mar 19 2020, 4:59 PM.


Group Reviewers

Guest needs proper storage flushing support in order to make sure data
persists on the storage media. For RAM storage target, we can simply
return success with no-op. Otherwise, we submit flush request to blockif
behind the scene.

Also we need to indicate that volatile write cache is presented.
For get feature admin requests we always return 1 currently.

In future, we may indicate that volatile write cache is not enabled if
the underlying file is opened with O_SYNC.

The changes are simply tested on a FreeBSD guest and a Linux guest, with
debug outputs from bhyve. Also tested with nvme-cli flush.

Diff Detail

Lint OK
No Unit Test Coverage
Build Status
Buildable 30008
Build 27821: arc lint + arc unit

Event Timeline

Thank you for working on this. I have work-in-progress that significantly restructures the I/O path and includes support for missing commands such as Write Zeros and Flush. Once some of the previous reviews are finished, I will post reviews for that work as well and would appreciate your feedback and testing.