Page MenuHomeFreeBSD

bhyve: implement NVMe flush command
Needs ReviewPublic

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

Details

Reviewers
chuck
Group Reviewers
bhyve
Summary

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
Lint OK
Unit
No Unit Test Coverage
Build Status
Buildable 30008
Build 27821: arc lint + arc unit

Event Timeline

chuck added a comment.Mar 20 2020, 1:06 AM

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.

lwhsu added a subscriber: lwhsu.Mar 23 2020, 9:30 AM