Commit Graph

8 Commits

Author SHA1 Message Date
Warner Losh
33a099d2e5 Print numbers instead of hex values for smart data. The full 128-bit
number is printed, even though you'd need like a billion IOPs for a 10
billion seconds to overflow the 64-bit counters (~300 years).

Sponsored by: Netflix, Inc
2016-11-19 17:12:44 +00:00
Warner Losh
cc63e8e6ab Use a table for pages we know the size of. We have a special case for
the error log since it isn't a fixed size.

Sponsored by: Netflix, Inc
2016-11-19 17:12:39 +00:00
Warner Losh
fbc3f2995e Remove check for valid log pages. Let the drive tell us which pages
are valid or not. While many pages are reserved in the standard, that
doesn't make them invalid and future versions of the standard may
define then.

Sponsored by: Netflix, Inc
2016-11-19 17:12:28 +00:00
Jim Harris
628683cb81 nvmecontrol: read controller identify data before any log page operations
MFC after:	3 days
Sponsored by:	Intel
2015-07-22 16:10:29 +00:00
Jim Harris
2528d6a326 Send per-namespace logpage commands to the controller devnode, so they
are processed as admin commands, not I/O commands.

As part of this change, pull out the code for parsing a namespace node
string into a separate function, since it is used for both identify and
logpage commands.

Sponsored by:	Intel
MFC after:	3 days
2013-07-09 21:31:21 +00:00
Jim Harris
821ef73ca6 Incorporate feedback from bde@ based on r252672 changes:
* Use 0/1 instead of sysexits.  Man pages are confusing on this topic,
  but 0/1 is sufficient for nvmecontrol.
* Use err function family where possible instead of fprintf/exit.
* Fix some typing errors.
* Clean up some error message inconsistencies.

Sponsored by:	Intel
Submitted by:	bde (parts of firmware.c changes)
MFC after:	3 days
2013-07-09 21:14:15 +00:00
Gleb Smirnoff
25fa33476b Fix build. 2013-06-27 10:42:09 +00:00
Jim Harris
75871362ad Add log page support to nvmecontrol(8) through a new logpage command.
This includes pretty printers for all of the standard NVMe log pages
(Error, SMART/Health, Firmware), as well as hex output for non-standard
or vendor-specific log pages.

Submitted by:	Joe Golio <joseph.golio@emc.com>
Obtained from:	EMC / Isilon Storage Division
MFC after:	3 days
2013-06-26 23:53:54 +00:00