Page MenuHomeFreeBSD

implement nvmecontrol passthru commands compatible (mostly) with linux nvme-cli
Needs ReviewPublic

Authored by imp on Jun 27 2019, 11:11 PM.
This revision needs review, but there are no reviewers specified.

Details

Reviewers
None
Summary

Generic argument parsing and usage generation, first pass

Implement {io,admin}-passthru commands.

These are mostly compatible with Linux, with three exceptions.

  1. We don't do metadata segment stuff. Our passthrough interface doesn't cope. The code is there, but generates an error.
  2. Linux lets you specify a namespace ID for the command. We current do not: we get ours from the namespace device, or pass in a generic one. Generally, this will lead to the same command, but FreeBSD's is safer since you can't specify the wrong id.
  3. --show-command outputs to stderr instead of stdout so you can both see your command, and capture its output with a simple redirect.

Diff Detail

Lint
Lint WarningsExcuse: THIS IS A FALSE POSITIVE THANK YOU FOR PLAYING
SeverityLocationCodeMessage
Warningsbin/nvmecontrol/nvmecontrol.h:51SPELL1Possible Spelling Mistake
Warningsbin/nvmecontrol/nvmecontrol.h:53SPELL1Possible Spelling Mistake
Unit
No Unit Test Coverage
Build Status
Buildable 25255
Build 23923: arc lint + arc unit

Event Timeline

imp created this revision.Jun 27 2019, 11:11 PM
imp updated this revision to Diff 59551.Jul 8 2019, 8:56 PM

rebase + spelling nit

imp updated this revision to Diff 59552.Jul 8 2019, 8:58 PM

Tweaks to license / years

imp retitled this revision from rework to include descriptions and arg info to implement nvmecontrol passthru commands compatible (mostly) with linux nvme-cli.Jul 15 2019, 4:21 PM