Page MenuHomeFreeBSD

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

Authored by imp on Jun 27 2019, 11:11 PM.
Tags
None
Referenced Files
Unknown Object (File)
Dec 23 2023, 12:48 AM
Unknown Object (File)
Nov 10 2023, 7:58 AM
Unknown Object (File)
Nov 10 2023, 4:12 AM
Unknown Object (File)
Nov 8 2023, 8:00 AM
Unknown Object (File)
Nov 7 2023, 4:30 PM
Unknown Object (File)
Nov 7 2023, 8:31 AM
Unknown Object (File)
Nov 7 2023, 7:39 AM
Unknown Object (File)
Oct 9 2023, 3:06 AM
Subscribers

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 Warnings
SeverityLocationCodeMessage
Warningsbin/nvmecontrol/nvmecontrol.h:51SPELL1Possible Spelling Mistake
Warningsbin/nvmecontrol/nvmecontrol.h:53SPELL1Possible Spelling Mistake
Unit
No Test Coverage
Build Status
Buildable 25255
Build 23923: arc lint + arc unit

Event Timeline

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
imp added inline comments.
sbin/nvmecontrol/nvmecontrol.h
51

false positive.

53–54

false positive