Hannes Reinecke [Thu, 20 Sep 2018 09:09:39 +0000 (11:09 +0200)]
nvme-cli: kill nvme_passthru_admin()
The seagate plugin is the only one using it, and it's identical
to nvme_get_log13(). So replace the invocation with nvme_get_log13()
and remove the function.
Hannes Reinecke [Thu, 20 Sep 2018 09:09:36 +0000 (11:09 +0200)]
nvme-discover: Re-check generation counter after log page transfer
The log page transfer might have been split up in several chunks, so
it might happen that the generation counter changed inbetween these
transfer. Hence we need to re-fetch the header again to figure out
if there had been changes to the generation counter; if so we need
to fetch the entire page again.
Hannes Reinecke [Thu, 20 Sep 2018 09:09:35 +0000 (11:09 +0200)]
nvme-ioctl: retrieve log pages in 4k chunks
Some log pages increase with the scale of the subsystem, so the
overall size might be larger than the MDTS value for that controller.
In order to avoid having to pass in the MDTS value we should restrict
the transfer size to 4k and retrieve the log page in 4k chunks.
Hannes Reinecke [Thu, 20 Sep 2018 09:09:34 +0000 (11:09 +0200)]
nvme-discover: Retry discovery log if the generation counter changes
If the generation counter changes we need to validate if the number
of records has changed, too.
If so we need to retry retrieving the discovery log to the most recent
values. The retry will be terminated after MAX_DISC_RETRIES (currently
set to 10) to avoid infinite recursion.
Ralph Corderoy [Wed, 5 Sep 2018 21:16:07 +0000 (22:16 +0100)]
Enlarge local char[] so snprintf(3) can't truncate path.
The path is in a char[310], contributing at most 309 chars for the ‘%s’.
‘/subsysnqn’ is a further 10. Plus one for the NUL.
309 + 10 + 1 = 320 so sspath[319] is too short.
Jeff Lien [Fri, 24 Aug 2018 18:34:27 +0000 (13:34 -0500)]
nvme-cli: Fix the displayed metadata length value on Big Endian systems.
On BE systems, the metadata length value displayed as part of the
format in the nvme list command is byte swapped. So a value of 0
appears just fine but a value of 8 bytes is displayed as 0x0800.
This patch fixes that is the value is correct for both LE and BE
systems.
Hannes Reinecke [Fri, 17 Aug 2018 07:29:05 +0000 (09:29 +0200)]
nvme-discover: sanitize options
The discovery controller doesn't accept any KATO or number of I/O
queue changes, but we do want to change the reconnect delay and
the controller loss timeout.
Chaitanya Kulkarni [Mon, 13 Aug 2018 05:59:19 +0000 (22:59 -0700)]
nvme-cli: add minimal ana-log page support
This patch adds a new command to retrieve the ANA Log page.
We update identify ctrl/ns data structure to support this command.
We also add ana based error codes and different identifiers to the
linux/nvme.h header file in order to support this command.
Signed-off-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com> Signed-off-by: Hannes Reinecke <hare@suse.com>
Johannes Thumshirn [Thu, 9 Aug 2018 09:25:23 +0000 (11:25 +0200)]
fabrics: write keep-alive-timeout to fabrics device on connect
Commit 7099227b07a8 ("fabrics: add option to supply keep-alive-timeout
for connect-all") introduced a keep-alive-timeout option for
connect-all but forgot to write it down to the kernel's fabrics
device in connect_ctrl().
Pass down the keep-alove-timeouts if we're connecting to a non
discovery controller.
Signed-off-by: Johannes Thumshirn <jthumshirn@suse.de> Fixes: 7099227b07a8 ("fabrics: add option to supply keep-alive-timeout for connect-all") Signed-off-by: Keith Busch <keith.busch@intel.com>
Johannes Thumshirn [Thu, 9 Aug 2018 09:25:22 +0000 (11:25 +0200)]
fabrics: write ctrl_loss_tmo to fabrics device on connect
Commit 388c9dbe86be ("fabrics: add ctrl-loss-tmo to connect-all")
introduced the '--ctrl-loss-tmo' option for the connect-all command,
but we forgor to pass down the option to the kernel in connect_ctrl().
Signed-off-by: Johannes Thumshirn <jthumshirn@suse.de> Fixes: 388c9dbe86be ("fabrics: add ctrl-loss-tmo to connect-all")
fixup! fabrics: write ctrl_loss_tmo to fabrics device on connect Signed-off-by: Keith Busch <keith.busch@intel.com>
Keith Busch [Wed, 18 Jul 2018 18:47:00 +0000 (12:47 -0600)]
Release 1.6
It's been far too long, and we've lots of fixes and updates, so tagging
a new release. Shortlog of all the commits since the 1.5 release are
below. Special thanks to everyone who contributed, including the people
not listed here who filed and verified issues.
521852 (2):
Adding ppc big endian support
Updating version to 1.1
Alexey Timofeyev (3):
nvme-cli: Fix build breaks for GCC 8.1 Signed-off-by: Alexey Timofeyev <alexey.timofeyev@sk.com>
nvme-cli: Fix build breaks for GCC 8.1 Signed-off-by: Alexey Timofeyev <alexey.timofeyev@sk.com>
nvme-cli: add support of RAE
Andrew Meir (3):
Add toshiba plugin code and command documentation.
Add toshiba plugin to makefile rules.
Fixes for log page access.
Chaitanya Kulkarni (5):
nvme-cli: allow block device for delete-ns
nvme-cli: fix get_nsid() return value check
nvme-cli: fix compilation error
nvme-cli: add changed log ns support
nvme-cli: add changed-ns-list-log documentation
Daniel Verkamp (1):
nvme-cli: fix typo in 'disconnect' docs
Eyal Ben David (3):
nvme-ioctl.c : nvme_get_properties(): fix 64bit offset advance
Add a single get-property command for NVMeOF.
nvme.c, list_ns: use le32_to_cpu in display
James Smart (4):
nvme-cli: correct spelling of discovery
nvme-cli: show partial results if controller fails during list and list-subsys
nvme-cli: Wait for device file if not present after successful add_ctrl
nvme-cli: Add ioctl retry support for "connect-all"
JasonChiuCC (2):
nvme-cli: fix show command typo
nvme-cli: Modify Get Features-Asynchronous Event Configuration
Javier González (1):
lightnvm: enable to set OP on target creation
Jeff Lien (10):
NVMe-CLI WDC-Plugin Add drive-essentials command
NVMe-CLI WDC-Plugin Add drive-essentials documentation
NVMe-CLI WDC-Plugin Add clear-pcie-corr command
NVMe-CLI WDC-Plugin Add clear-pcie-corr documentation.
NVMe-CLI WDC-Plugin Update drive essentials code with review comments.
NVMe-CLI Fix fw_log Command json output
Add nvme fw-log commmand test
Add nvme id-ctrl command test
Add nvme id-ns command test
NVMe-CLI Fix id-ns fpi field when Human Readable option selected.
Johannes Thumshirn (3):
Documentation: add manpage entry for connect's --ctrl-loss-tmo setting
fabrics: add option to supply keep-alive-timeout for connect-all
fabrics: add ctrl-loss-tmo to connect-all
Keith Busch (34):
Allow hierarchy of similiarly named plugins
Fix verbose decoding for coalescing aggregation time
Use NSID all for error log
Use '-' for compounded word telemetry-log subcommand
flush: Use device NSID if issuing through block device
Fix freeing wrong address
Update makefile dependencies
Add decoding for new controller attributes
Add support for decoding IO Determinism features
Add support for NVMe Sets log page
Add read-recover level feature decoding
Ignore cscope files
Fix fabrics property commands
Add manpage for endurance log
Regenerate documentation
Don't print non-existent command line options
Add remaining fields from NVM Sets
Fix parameter descriptions
get-log: Make log identifier a required parameter
Use fixed-width integer types for long suffixed parameters
Fix intel media wear json output
Remove error print for telemetry log arg parse
Regenrate documentation
Regenerate man pages
Revert "nvme-cli: Add ioctl retry support for "connect-all""
Revert "nvme-cli: Wait for device file if not present after successful add_ctrl"
Add man pages for new device self test commands
Replace host-gen telemetry short-option 'h' with 'g'
Fix json output of 128-bit numbers
Fix format specifier for 32-bit
Update doc
intel: fix latency stats printing
fix reservation report 0's based dword count
lightnvm: fix type coercion
Klaus Birkelund Abildgaard Jensen (1):
nvme-cli: add support for DLFEAT
Matias Bjørling (1):
Add open-channel 2.0 identify support
Max Gurtovoy (1):
nvme-cli: fabrics: Fix passing "host_traddr" for all transports
Maxim (2):
Add user parameter to specify data area region from telemetry log
Wrote man page for telemetry
Minwoo Im (55):
nvme-cli: make sanitize description const
nvme-cli: update print for sanitize-log command with output-format
nvme-cli: add print for command specific info field of error log page
nvme-cli: Remove unnecessary nsid field in error-log
nvme-cli: add support for json output format of sanitize-log command
Update subcommand alias description in README.md
nvme-cli: add BPS bit field to CAP controller register
nvme-cli: lnvm: add whitespace between words in a description
nvme-cli: lnvm: remove unnecessary force parameter of ns-id in lnvm
nvme-cli: lnvm: add check for fd after open operation
nvme-cli: lnvm: add human-readable print format to ns-id subcommand
nvme-cli: update error-log documentation
nvme-cli: intel: update smart-log-add command documentation
nvme-cli: intel: fix smart-log-add documentation
nvme-cli: intel: add check for fd after open to intel commands
nvme-cli: intel: add const to descriptions of subcommand option
nvme-cli: add support for options to effects-log subcommand
nvme-cli: update documentation of effects-log
nvme-cli: tests: remove nsid parameter in a testcase of error-log
nvme-cli: tests: fix typo in get_feature_test
nvme-cli: add error handling for a failure of malloc
nvme-cli: fix memory leak in list_ctrl()
nvme-cli: fix memory leak in ns_descs()
nvme-cli: fix memory leak in fw_download()
nvme-cli: fix memory leak in set_feature()
nvme-cli: fix memory leak in sec_send()
nvme-cli: fix memory leak in dir_send()
nvme-cli: fix memory leak in sec_recv()
nvme-cli: fix memory leak in dir_receive()
nvme-cli: wdc: add const to descriptions
nvme-cli: wdc: fix mismatch in document for smart-add-log
nvme-cli: fix memory leak in passthru()
nvme-cli: lnvm: Make it return error status when argconfig_parse fails
nvme-cli: memblaze: fix memory leak in memblaze-nvme.c
nvme-cli: memblaze: add error return after parse_and_open()
nvme-cli: add command specific field to json output of error-log
nvme-cli: make it have bpid in cdw10 for fw-commit
nvme-cli: add print for command name to effects-log
nvme-cli: fix leaks in subcommands
nvme-cli: move print-function to nvme-print
nvme-cli: make return negative value in nvme_get_nsid() when not blkdev
nvme-cli: convert iekey into a no_argument parameter
nvme-cli: update documentations to sync up with subcommands
nvme-cli: add helper for sanitize command
nvme-cli: adjust json print according to uint format
nvme-cli: make it use NVME_IDENTIFY_DATA_SIZE
nvme-cli: fix seg_fault by cmd options in endurance_log
nvme-cli: fix leak in endurance_log command
nvme-cli: make it return 0 in case of non-fabric for show-regs
nvme-cli: fix perror when blkdev not given when get-ns-id
nvme-cli: add support for id-nvmset subcommand
nvme-cli: update new fields in id-ns subcommand
nvme-cli: update the document for id-nvmset subcommand
nvme-cli: print firmware activation notices support bit to id_ctrl
nvme-cli: adjust memset size for data buffer in submit_io
Muhammad Ahmad (2):
Fixed a bug where cdw11 was being overwritten by cdw12
Updatign the plugin version
Oleksii Timofieiev (5):
nvme-cli: Add support of unsigned long long to json routines Signed-off-by: Oleksii Timofieiev <tim.oleksii@gmail.com>
nvme-cli: wdc: Removed superfluous output in WDC plugin
nvme-cli: handle long commands in help message by adjusting minimal padding Signed-off-by: Oleksii Timofieiev <tim.oleksii@gmail.com>
nvme-cli: Fixed incosistency of error handling in intel plugin Signed-off-by: Oleksii Timofieiev <tim.oleksii@gmail.com>
Fix endianess in WDC plugin.
Pavel Borzenkov (1):
nvme-cli: fix typo in Intel SMART json output
Revanth Rajashekar (5):
nvme-cli: Implemented Device self test and log.
nvme-cli: Implement printing the get timestamp feature.
nvme-cli: Implement printing the get host controlled thermal management feature.
nvme-cli: Implement printing the get Keep Alive Timer feature
nvme-cli: Implement printing get NOPSC feature
Rodrigo R. Galvao (1):
nvme-cli: Add friendly status messages
Sagi Grimberg (2):
fabrics: fail early if argconfig_parse failed
fabrics: omit newline character when reading nvme host nqn
Schremmer, Steven (2):
nvme-cli: add NetApp plugin
nvme-cli: add netapp smdevices man page
Scott Bauer (4):
nvme-cli: Implement get_telemetry_log from 1.3 spec
nvme/vendor: Add get log LSP/LSO fields from 1.3 spec
nvme-cli: Implement nvme_get_log13
nvme-cli: telemetry-log add controller initiated log gathering
Stephen Tubbs (1):
Add support for Micron plugin
Takashi Iwai (2):
Documentation: fix title markers
Documentation: allow to format with asciidoctor
Vijay Kumar (2):
Fix double free in list_subsys
Log error incase of failure in get_nvme_subsystem_info()
muhammad.ahmad@seagate.com (7):
Initial checkin for Seagate Plugin
Removed Duplicate commands.
refactored some strings
Initial checkin for Seagate Plugin
Removed Duplicate commands.
refactored some strings
Making gcc compiler (5.4.0 among others) happy
Signed-off-by: Keith Busch <keith.busch@intel.com>
Keith Busch [Tue, 17 Jul 2018 21:56:25 +0000 (15:56 -0600)]
lightnvm: fix type coercion
The lightnvm passthrough command wasn't actually aligned to the ioctl's
structure because it had an extra dword, and some compilers were having a
hard time dealing with some of the other structure casting. This fixes
the passthrough structure by removing the erroneous dword, and uses
temporary void pointers for type casting.
Minwoo Im [Sun, 1 Jul 2018 13:58:05 +0000 (22:58 +0900)]
nvme-cli: print firmware activation notices support bit to id_ctrl
It's now currently printing the OAES(Optional Asynchronous Events Supported)
field in identify controller data structure without [9] firmware activation
notices field in case of human-readable format.
Print it out by updating the reserved bit field.
Signed-off-by: Minwoo Im <minwoo.im.dev@gmail.com> Signed-off-by: Keith Busch <keith.busch@intel.com>
Alexey Timofeyev [Thu, 28 Jun 2018 17:33:05 +0000 (17:33 +0000)]
nvme-cli: add support of RAE
Currently telemetry-log cannot retain content of corresponding log page as RAE is not set.
This patch adds RAE bit support into routines to retrieve log pages.