]> www.infradead.org Git - users/sagi/nvme-cli.git/log
users/sagi/nvme-cli.git
7 years agonvme-cli: Implement printing the get timestamp feature.
Revanth Rajashekar [Wed, 13 Jun 2018 19:53:52 +0000 (13:53 -0600)]
nvme-cli: Implement printing the get timestamp feature.

Signed-off-by: Revanth Rajashekar <revanth.rajashekar@intel.com>
Signed-off-by: Keith Busch <keith.busch@intel.com>
7 years agoRevert "nvme-cli: Wait for device file if not present after successful add_ctrl"
Keith Busch [Wed, 13 Jun 2018 13:33:03 +0000 (07:33 -0600)]
Revert "nvme-cli: Wait for device file if not present after successful add_ctrl"

This reverts commit bb2d87d7f386882005bb87fe9412af23c646c876.

Not ready for this one yet either.

7 years agoRevert "nvme-cli: Add ioctl retry support for "connect-all""
Keith Busch [Wed, 13 Jun 2018 13:31:38 +0000 (07:31 -0600)]
Revert "nvme-cli: Add ioctl retry support for "connect-all""

This reverts commit d8f949c21e9d832149518f26c71dfd8de16cd628.

The kernel side was not ready, so this needs more sorting.

Signed-off-by: Keith Busch <keith.busch@intel.com>
7 years agonvme-cli: fix compilation error
Chaitanya Kulkarni [Mon, 11 Jun 2018 17:04:29 +0000 (13:04 -0400)]
nvme-cli: fix compilation error

Signed-off-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
Signed-off-by: Keith Busch <keith.busch@intel.com>
7 years agoMerge pull request #342 from minwooim/v1.6/for_tp4018
Keith Busch [Mon, 11 Jun 2018 15:19:08 +0000 (09:19 -0600)]
Merge pull request #342 from minwooim/v1.6/for_tp4018

nvme-cli: add support for id-nvmset subcmmand

7 years agoMerge pull request #366 from Seagate/master
Keith Busch [Mon, 11 Jun 2018 15:00:28 +0000 (09:00 -0600)]
Merge pull request #366 from Seagate/master

Request to add Seagate Plugin

7 years agoFinish seagate-plugin-v1.0
Muhammad Ahmad [Sun, 10 Jun 2018 21:17:17 +0000 (16:17 -0500)]
Finish seagate-plugin-v1.0

7 years agoUpdatign the plugin version
Muhammad Ahmad [Sun, 10 Jun 2018 21:16:51 +0000 (16:16 -0500)]
Updatign the plugin version

7 years agoMerge remote-tracking branch 'origin/master'
Muhammad Ahmad [Sun, 10 Jun 2018 21:03:39 +0000 (16:03 -0500)]
Merge remote-tracking branch 'origin/master'

# Conflicts:
# Makefile

7 years agorefactored some strings
muhammad.ahmad@seagate.com [Sat, 9 Jun 2018 16:03:44 +0000 (11:03 -0500)]
refactored some strings

7 years agoRemoved Duplicate commands.
muhammad.ahmad@seagate.com [Thu, 7 Jun 2018 22:06:27 +0000 (17:06 -0500)]
Removed Duplicate commands.

7 years agoInitial checkin for Seagate Plugin
muhammad.ahmad@seagate.com [Wed, 23 May 2018 04:51:06 +0000 (23:51 -0500)]
Initial checkin for Seagate Plugin

7 years agonvme-cli: update the document for id-nvmset subcommand
Minwoo Im [Sun, 10 Jun 2018 12:07:10 +0000 (21:07 +0900)]
nvme-cli: update the document for id-nvmset subcommand

Update the document for the usage of id-nvmset subcommand.

Signed-off-by: Minwoo Im <minwoo.im.dev@gmail.com>
7 years agonvme-cli: update new fields in id-ns subcommand
Minwoo Im [Sun, 10 Jun 2018 12:03:54 +0000 (21:03 +0900)]
nvme-cli: update new fields in id-ns subcommand

Update new fields in Identify Namespace data structure: nvmsetid,
endgid.  These fields are added in TP 4018.

Signed-off-by: Minwoo Im <minwoo.im.dev@gmail.com>
7 years agonvme-cli: add support for id-nvmset subcommand
Minwoo Im [Sun, 15 Apr 2018 17:34:41 +0000 (02:34 +0900)]
nvme-cli: add support for id-nvmset subcommand

Identify for NVM Set List has been added and it can be found in TP 4018.
This identify CNS 0x4 uses CDW11 as a NVM Set Identify(NVMSETID).
Currently nvme-cli is not using cdw11 for the identify command.

Therefore make it available for cdw11 to be passed to ioctl command by
adding nvme_identify13() to support the new CNS.

Signed-off-by: Minwoo Im <minwoo.im.dev@gmail.com>
7 years agorefactored some strings
muhammad.ahmad@seagate.com [Sat, 9 Jun 2018 16:03:44 +0000 (11:03 -0500)]
refactored some strings

7 years agoMerge pull request #365 from maximveligan/master
Keith Busch [Fri, 8 Jun 2018 22:19:27 +0000 (16:19 -0600)]
Merge pull request #365 from maximveligan/master

Wrote man page for telemetry

7 years agoWrote man page for telemetry
Maxim [Fri, 8 Jun 2018 22:14:49 +0000 (15:14 -0700)]
Wrote man page for telemetry

7 years agonvme-cli: Implemented Device self test and log.
Revanth Rajashekar [Tue, 5 Jun 2018 20:32:51 +0000 (14:32 -0600)]
nvme-cli: Implemented Device self test and log.

Implmented device self test and log gathering described in the NVMe
1.3 specificiation.

Link: https://github.com/linux-nvme/nvme-cli/pull/364
Signed-off-by: Revanth Rajashekar <revanth.rajashekar@intel.com>
[changelog, code and print formatting]
Signed-off-by: Keith Busch <keith.busch@intel.com>
7 years agoAdd user parameter to specify data area region from telemetry log
Maxim [Thu, 7 Jun 2018 18:06:04 +0000 (11:06 -0700)]
Add user parameter to specify data area region from telemetry log

And read in block size chunks instead of 4k.

Link: https://github.com/linux-nvme/nvme-cli/pull/361
Signed-off-by: Maxim Veligan <maximveligan@gmail.com>
[changelog, formatting, set error on exit, removed unnecessary error check]
Signed-off-by: Keith Busch <keith.busch@intel.com>
7 years agoRemoved Duplicate commands.
muhammad.ahmad@seagate.com [Thu, 7 Jun 2018 22:06:27 +0000 (17:06 -0500)]
Removed Duplicate commands.

7 years agoMerge pull request #359 from JasonChiuCC/master
Keith Busch [Tue, 5 Jun 2018 15:07:30 +0000 (09:07 -0600)]
Merge pull request #359 from JasonChiuCC/master

 nvme-cli: Add Get Feature Command

7 years agoRegenerate man pages
Keith Busch [Tue, 5 Jun 2018 15:02:15 +0000 (09:02 -0600)]
Regenerate man pages

Signed-off-by: Keith Busch <keith.busch@intel.com>
7 years agoDocumentation: allow to format with asciidoctor
Takashi Iwai [Thu, 12 Apr 2018 11:02:38 +0000 (04:02 -0700)]
Documentation: allow to format with asciidoctor

Add asciidoctor support.  You need to pass USE_ASCIIDOCTOR=yes to make
for enabling the feature.

Most of the rb extension code was shamelessly borrowed from git.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Keith Busch <keith.busch@intel.com>
7 years agoDocumentation: fix title markers
Takashi Iwai [Thu, 12 Apr 2018 11:02:37 +0000 (04:02 -0700)]
Documentation: fix title markers

The length of the title marker has to be aligned with the previous
line.  This was caught when running asciidoctor, which is more strict
than asciidoc.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Keith Busch <keith.busch@intel.com>
7 years agofabrics: add ctrl-loss-tmo to connect-all
Johannes Thumshirn [Tue, 29 May 2018 09:32:33 +0000 (11:32 +0200)]
fabrics: add ctrl-loss-tmo to connect-all

Similarly to "keep-alive-tmo" a user might want to specify the
"ctrl-loss-tmo" on connect-all as well.

Signed-off-by: Johannes Thumshirn <jthumshirn@suse.de>
Signed-off-by: Keith Busch <keith.busch@intel.com>
7 years agonvme-cli: Modify Get Features-Asynchronous Event Configuration
JasonChiuCC [Tue, 29 May 2018 07:27:15 +0000 (15:27 +0800)]
nvme-cli: Modify Get Features-Asynchronous Event Configuration

Modify Get Features-Asynchronous Event Configuration that can get Telemetry Log Notices info

7 years agoMerge pull request #341 from minwooim/v1.6/fix_perror_in_get_ns_id
Keith Busch [Fri, 25 May 2018 15:56:04 +0000 (09:56 -0600)]
Merge pull request #341 from minwooim/v1.6/fix_perror_in_get_ns_id

nvme-cli: fix perror when blkdev not given when get-ns-id

7 years agoMerge pull request #353 from StephenATubbs/master
Keith Busch [Fri, 25 May 2018 15:55:30 +0000 (09:55 -0600)]
Merge pull request #353 from StephenATubbs/master

Add support for Micron plugin

7 years agoMerge pull request #357 from MatiasBjorling/for-keith
Keith Busch [Fri, 25 May 2018 15:55:13 +0000 (09:55 -0600)]
Merge pull request #357 from MatiasBjorling/for-keith

Add open-channel 2.0 identify geometry support

7 years agoMerge pull request #356 from JasonChiuCC/master
Keith Busch [Fri, 25 May 2018 15:54:51 +0000 (09:54 -0600)]
Merge pull request #356 from JasonChiuCC/master

nvme-cli: fix show command typo

7 years agoAdd open-channel 2.0 identify support
Matias Bjørling [Fri, 25 May 2018 07:04:34 +0000 (09:04 +0200)]
Add open-channel 2.0 identify support

The 2.0 specification has been released. Update the lightnvm
submodule to understand the 2.0 geometry structure.

Signed-off-by: Matias Bjørling <mb@lightnvm.io>
7 years agonvme-cli: fix show command typo
JasonChiuCC [Fri, 25 May 2018 02:04:33 +0000 (10:04 +0800)]
nvme-cli: fix show command typo

7 years agoMerge pull request #355 from tim-oleksii/master
Keith Busch [Wed, 23 May 2018 14:13:22 +0000 (08:13 -0600)]
Merge pull request #355 from tim-oleksii/master

nvme-cli: Fix build breaks for GCC 8.1

7 years agoInitial checkin for Seagate Plugin
muhammad.ahmad@seagate.com [Wed, 23 May 2018 04:51:06 +0000 (23:51 -0500)]
Initial checkin for Seagate Plugin

7 years agonvme-cli: Fixed magic number in wdc-nvme.c plugin
Alexey Timofeyev [Tue, 22 May 2018 19:06:19 +0000 (19:06 +0000)]
nvme-cli: Fixed magic number in wdc-nvme.c plugin
Signed-off-by: Alexey Timofeyefv <alexey.timofeyev@sk.com>
7 years agonvme-cli: Fix build breaks for GCC 8.1
Alexey Timofeyev [Tue, 22 May 2018 18:31:29 +0000 (18:31 +0000)]
nvme-cli: Fix build breaks for GCC 8.1
Signed-off-by: Alexey Timofeyev <alexey.timofeyev@sk.com>
7 years agonvme-cli: Fix build breaks for GCC 8.1
Alexey Timofeyev [Tue, 22 May 2018 18:31:29 +0000 (18:31 +0000)]
nvme-cli: Fix build breaks for GCC 8.1
Signed-off-by: Alexey Timofeyev <alexey.timofeyev@sk.com>
7 years agoAdd nvme id-ns command test
Jeff Lien [Mon, 7 May 2018 21:41:22 +0000 (16:41 -0500)]
Add nvme id-ns command test

Signed-off-by: Jeff Lien <jeff.lien@wdc.com>
Signed-off-by: Keith Busch <keith.busch@intel.com>
7 years agoAdd nvme id-ctrl command test
Jeff Lien [Mon, 7 May 2018 21:40:59 +0000 (16:40 -0500)]
Add nvme id-ctrl command test

Signed-off-by: Jeff Lien <jeff.lien@wdc.com>
Signed-off-by: Keith Busch <keith.busch@intel.com>
7 years agoAdd nvme fw-log commmand test
Jeff Lien [Mon, 7 May 2018 21:40:32 +0000 (16:40 -0500)]
Add nvme fw-log commmand test

Signed-off-by: Jeff Lien <jeff.lien@wdc.com>
Signed-off-by: Keith Busch <keith.busch@intel.com>
7 years agoAdd support for Micron plugin
Stephen Tubbs [Wed, 9 May 2018 14:06:03 +0000 (07:06 -0700)]
Add support for Micron plugin

7 years agonvme-cli: fix get_nsid() return value check
Chaitanya Kulkarni [Thu, 3 May 2018 10:04:45 +0000 (06:04 -0400)]
nvme-cli: fix get_nsid() return value check

All the callers of the get_nsid() defined cfg.namespace_id as __u32.
The true return value of the call:-

cfg.namespace_id = get_nsid()

will not be used in case nvme_get_nsid() returns < 0 and
comparion of

if (cfg.namespace_id <= 0)

and will result is cfg.namespace_id > 0 due to type mismatch.

We fix this scenario by returning the 0 (invalid nsid on get_nsid()
for nvme_get_nsid() failure case) and adding

cfg.namespace_id == 0

for error checking in all the callers of the get_nsid().

Signed-off-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
Signed-off-by: Keith Busch <keith.busch@intel.com>
7 years agonvme-cli: allow block device for delete-ns
Chaitanya Kulkarni [Wed, 2 May 2018 04:48:40 +0000 (00:48 -0400)]
nvme-cli: allow block device for delete-ns

This patch allows block device to be used for the
NVMe delete-ns command while keeping the -n options
as it is.

Signed-off-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
[fixed nsid check for <= 0]
Signed-off-by: Keith Busch <keith.busch@intel.com>
7 years agonvme-cli: Add ioctl retry support for "connect-all"
James Smart [Mon, 30 Apr 2018 22:46:58 +0000 (15:46 -0700)]
nvme-cli: Add ioctl retry support for "connect-all"

Currently, if an ioctl command to a controller fails, the routines
within nvme-cli don't do retries and just fail.  In the case of
operations such as "connect-all" which depend on the ioctl to read
the discovery log to give it the list of controller to then "connect"
to, this failure can be catastrophic as there's no guarantee that the
event/admin action that performed the connect-all will be re-triggered,
resulting in a loss of connectivity to storage subsystems.

As to why the ioctl may have failed in the first place: if the
controller is in the middle of a reset or reconnect due to
an error or temporary loss of connectivity (which can happen even
on a discovery controller), ioctl commands will fail rather than
suspend for the full duration of the controller state change
(say to live or delete), which could be a minute or more.

This patch makes the following changes:
- Implement an ioctl wrapper that does retries. The ioctl will only
  retry if the failure status was EAGAIN.
- Create an admin passthru wrapper that uses the ioctl wrapper with
  retry
= Modify the ioctl that reads the discovery log to use the new
  admin passthru wrapper that performs retries when reading the
  discovery log, and uses the normal admin passthru (no retries)
  for all other log types.

Signed-off-by: James Smart <james.smart@broadcom.com>
Signed-off-by: Keith Busch <keith.busch@intel.com>
7 years agonvme-cli: Wait for device file if not present after successful add_ctrl
James Smart [Fri, 27 Apr 2018 17:29:39 +0000 (10:29 -0700)]
nvme-cli: Wait for device file if not present after successful add_ctrl

It's possible for the transport to return very quickly after add_ctrl
such that the cli may attempt to access the /dev/nvme? device file
before the udev event has propagated to user space to create the device
file. In these cases, the open fails with EAGAIN.

As the add_ctrl call was successful, thus there "should" be a device
file, if the open fails with EAGAIN delay 500ms and try again. Wait
for at most 2 seconds for the device file to come into existence.

Signed-off-by: James Smart <james.smart@broadcom.com>
Signed-off-by: Keith Busch <keith.busch@intel.com>
7 years agonvme-cli: show partial results if controller fails during list and list-subsys
James Smart [Fri, 27 Apr 2018 17:27:33 +0000 (10:27 -0700)]
nvme-cli: show partial results if controller fails during list and list-subsys

For the current versions of "list" and "list-subsys":
If a command to a controller fails, which is possible if the controller
is going through a reconnect, the operation will fail and all results
gathered up to that point is dropped. Thus, the operation shows no
results.

Revise the commands so that they will report an error if one of the
controllers fail, but will now skip over the failing controller and
continue with the next one.

Signed-off-by: James Smart <james.smart@broadcom.com>
Signed-off-by: Keith Busch <keith.busch@intel.com>
7 years agofabrics: add option to supply keep-alive-timeout for connect-all
Johannes Thumshirn [Wed, 25 Apr 2018 17:49:23 +0000 (11:49 -0600)]
fabrics: add option to supply keep-alive-timeout for connect-all

Currently we can't supply a keep-alive-timeout when doing a nvme
connect-all, but we can supply it when doing nvme connect.

Bring connect-all in line with connect.

Signed-off-by: Johannes Thumshirn <jthumshirn@suse.de>
Signed-off-by: Keith Busch <keith.busch@intel.com>
7 years agoMerge branch 'master' of https://github.com/linux-nvme/nvme-cli
Keith Busch [Wed, 18 Apr 2018 14:24:24 +0000 (08:24 -0600)]
Merge branch 'master' of https://github.com/linux-nvme/nvme-cli

7 years agonvme-cli: fix perror when blkdev not given when get-ns-id
Minwoo Im [Sun, 15 Apr 2018 16:23:45 +0000 (01:23 +0900)]
nvme-cli: fix perror when blkdev not given when get-ns-id

nvme-cli currently is printing out the error code via perror when nsid
from the nvme_get_nsid(fd) <= 0.  Once user gives a chrdev node instead of
blkdev node, following "Success" message is being printed-out even it's
a failure case.

  Error: requesting namespace-id from non-block device
  nvme0: Success

errno will *not* be set in case that blkdev is not given.  So set the
proper errno for this case.  The following message will be nicer than
previous one.

  Error: requesting namespace-id from non-block device
  nvme0: Block device required

This patch will also fix the return value of this subcommand.  0 will
*not* be given when the subcommand fails.

Signed-off-by: Minwoo Im <minwoo.im.dev@gmail.com>
7 years agoMerge pull request #340 from AndrewMeir/master
Keith Busch [Fri, 13 Apr 2018 14:23:47 +0000 (08:23 -0600)]
Merge pull request #340 from AndrewMeir/master

Fixes for log page access.

7 years agoFixes for log page access.
Andrew Meir [Fri, 13 Apr 2018 12:51:17 +0000 (14:51 +0200)]
Fixes for log page access.

7 years agoMerge pull request #339 from minwooim/v1.6/make_return_0_when_non_fabric
Keith Busch [Thu, 12 Apr 2018 14:11:40 +0000 (08:11 -0600)]
Merge pull request #339 from minwooim/v1.6/make_return_0_when_non_fabric

nvme-cli: make it return 0 in case of non-fabric for show-regs

7 years agonvme-cli: make it return 0 in case of non-fabric for show-regs
Minwoo Im [Thu, 12 Apr 2018 12:38:25 +0000 (21:38 +0900)]
nvme-cli: make it return 0 in case of non-fabric for show-regs

Currently, non-fabrics show-regs subcommand is *not* returning 0 even if it has
successfully read from the bar.  Make it return 0 when successfully done.

Link: #338

Signed-off-by: Minwoo Im <minwoo.im.dev@gmail.com>
7 years agoRegenrate documentation
Keith Busch [Tue, 10 Apr 2018 17:25:29 +0000 (11:25 -0600)]
Regenrate documentation

Signed-off-by: Keith Busch <keith.busch@intel.com>
7 years agoDocumentation: add manpage entry for connect's --ctrl-loss-tmo setting
Johannes Thumshirn [Tue, 10 Apr 2018 08:51:10 +0000 (10:51 +0200)]
Documentation: add manpage entry for connect's --ctrl-loss-tmo setting

When adding nvme connect's --ctrl-loss-tmo flag we forgot to update
the manpage accordingly.

Signed-off-by: Johannes Thumshirn <jthumshirn@suse.de>
Reported-by: Matt Schulte <matt.schulte@netapp.com>
Signed-off-by: Keith Busch <keith.busch@intel.com>
7 years agoMerge pull request #335 from minwooim/v1.6/update_endurance_log
Keith Busch [Mon, 9 Apr 2018 17:32:37 +0000 (11:32 -0600)]
Merge pull request #335 from minwooim/v1.6/update_endurance_log

nvme-cli: fix endurance_log subcommand

7 years agonvme-cli: fix leak in endurance_log command
Minwoo Im [Mon, 9 Apr 2018 17:27:22 +0000 (02:27 +0900)]
nvme-cli: fix leak in endurance_log command

Fix file descriptor leak in endurance_log subcommand.

Signed-off-by: Minwoo Im <minwoo.im.dev@gmail.com>
7 years agonvme-cli: fix seg_fault by cmd options in endurance_log
Minwoo Im [Mon, 9 Apr 2018 17:21:27 +0000 (02:21 +0900)]
nvme-cli: fix seg_fault by cmd options in endurance_log

command_line_options[] might cause a segmentation fault if the last
option is not marked.  Make it mark NULL to show the end of the list.

Signed-off-by: Minwoo Im <minwoo.im.dev@gmail.com>
7 years agoRemove error print for telemetry log arg parse
Keith Busch [Wed, 4 Apr 2018 14:14:26 +0000 (08:14 -0600)]
Remove error print for telemetry log arg parse

We don't want to see an error message if the '--help' option was
utilized. Parsing errors are also already printed, so don't need the
second error message anyway.

Signed-off-by: Keith Busch <keith.busch@intel.com>
7 years agoFix intel media wear json output
Keith Busch [Tue, 3 Apr 2018 14:31:53 +0000 (08:31 -0600)]
Fix intel media wear json output

Link: https://github.com/linux-nvme/nvme-cli/issues/331
Signed-off-by: Keith Busch <keith.busch@intel.com>
7 years agoUse fixed-width integer types for long suffixed parameters
Keith Busch [Fri, 30 Mar 2018 16:57:14 +0000 (10:57 -0600)]
Use fixed-width integer types for long suffixed parameters

Fixes possible truncation on 32-bit archs.

Link: https://github.com/linux-nvme/nvme-cli/issues/330
Signed-off-by: Keith Busch <keith.busch@intel.com>
7 years agoMerge pull request #327 from AndrewMeir/master
Keith Busch [Wed, 28 Mar 2018 18:32:03 +0000 (12:32 -0600)]
Merge pull request #327 from AndrewMeir/master

Add toshiba plugin to makefile rules.

7 years agoAdd toshiba plugin to makefile rules.
Andrew Meir [Wed, 28 Mar 2018 18:21:34 +0000 (20:21 +0200)]
Add toshiba plugin to makefile rules.

7 years agoMerge pull request #326 from AndrewMeir/master
Keith Busch [Wed, 28 Mar 2018 16:15:36 +0000 (10:15 -0600)]
Merge pull request #326 from AndrewMeir/master

Add toshiba plugin code and command documentation.

7 years agoAdd toshiba plugin code and command documentation.
Andrew Meir [Wed, 28 Mar 2018 15:42:53 +0000 (17:42 +0200)]
Add toshiba plugin code and command documentation.

7 years agoMerge pull request #322 from rrosatti/add_friendly_error_msgs
Keith Busch [Wed, 21 Mar 2018 16:09:01 +0000 (10:09 -0600)]
Merge pull request #322 from rrosatti/add_friendly_error_msgs

nvme-cli: Add friendly status messages

7 years agonvme-cli: Add friendly status messages
Rodrigo R. Galvao [Tue, 20 Mar 2018 19:10:46 +0000 (16:10 -0300)]
nvme-cli: Add friendly status messages

Additional messages were added on nvme_status_to_string(), in
order to make the returned status easier to understand.
The messages were based in the Description of those statuses in
the NVMe Specification (v1.3), from the figures 31-36.

Signed-off-by: Rodrigo R. Galvao <rosattig@linux.vnet.ibm.com>
7 years agonvme-cli: correct spelling of discovery
James Smart [Tue, 20 Mar 2018 17:33:57 +0000 (10:33 -0700)]
nvme-cli: correct spelling of discovery

correct dicovery to discovery

Signed-off-by: James Smart <james.smart@broadcom.com>
Signed-off-by: Keith Busch <keith.busch@intel.com>
7 years agoget-log: Make log identifier a required parameter
Keith Busch [Mon, 19 Mar 2018 22:55:34 +0000 (16:55 -0600)]
get-log: Make log identifier a required parameter

If you're using the generic get-log, make sure the user specifies the
log parameter. It would be a user error if they don't as they should
never be counting on a default parameter.

Link: https://github.com/linux-nvme/nvme-cli/pull/320
Signed-off-by: Keith Busch <keith.busch@intel.com>
7 years agonvme-cli: fabrics: Fix passing "host_traddr" for all transports
Max Gurtovoy [Thu, 8 Mar 2018 17:38:16 +0000 (19:38 +0200)]
nvme-cli: fabrics: Fix passing "host_traddr" for all transports

Currently only FC transport passes "host_traddr" to the kernel during
nvme connect-all command. Fix it for all transports.

Signed-off-by: Max Gurtovoy <maxg@mellanox.com>
Signed-off-by: Keith Busch <keith.busch@intel.com>
7 years agoMerge pull request #314 from vijaykumar-s/master
Keith Busch [Wed, 7 Mar 2018 14:56:02 +0000 (07:56 -0700)]
Merge pull request #314 from vijaykumar-s/master

Few fix related to 'nvme list-subsys'

7 years agoLog error incase of failure in get_nvme_subsystem_info()
Vijay Kumar [Wed, 7 Mar 2018 01:24:12 +0000 (18:24 -0700)]
Log error incase of failure in get_nvme_subsystem_info()

Currently get_nvme_subsystem_info() silently fails in case
of error. This patch logs relevant error message incase of
failure in get_nvme_subsystem_info().

Signed-off-by: Vijay Kumar <vijay.ac.kumar@oracle.com>
7 years agoFix double free in list_subsys
Vijay Kumar [Wed, 7 Mar 2018 01:45:34 +0000 (19:45 -0600)]
Fix double free in list_subsys

get_nvme_subsystem_info() deallocates subsys_list_item in case of error.
This hits double free when list_subsys() as well attempts to free it.
Removed deallocation of subsys_list_item from get_nvme_subsystem_info().

Signed-off-by: Vijay Kumar <vijay.ac.kumar@oracle.com>
7 years agoFix parameter descriptions
Keith Busch [Tue, 6 Mar 2018 08:06:32 +0000 (01:06 -0700)]
Fix parameter descriptions

The parseing will accept, but doesn't require hex.

Link: https://github.com/linux-nvme/nvme-cli/issues/313
Signed-off-by: Keith Busch <keith.busch@intel.com>
7 years agoAdd remaining fields from NVM Sets
Keith Busch [Mon, 5 Mar 2018 14:31:44 +0000 (07:31 -0700)]
Add remaining fields from NVM Sets

Adds the set id fields to identify controller and identify namespace,
and prints them in the normal and json output.

Signed-off-by: Keith Busch <keith.busch@intel.com>
7 years agoDon't print non-existent command line options
Keith Busch [Fri, 2 Mar 2018 15:29:33 +0000 (08:29 -0700)]
Don't print non-existent command line options

Link: https://github.com/linux-nvme/nvme-cli/issues/309
Signed-off-by: Keith Busch <keith.busch@intel.com>
7 years agoMerge pull request #312 from xahmad/master
Keith Busch [Fri, 2 Mar 2018 14:58:03 +0000 (07:58 -0700)]
Merge pull request #312 from xahmad/master

Fixed a bug where cdw11 is being overwritten by cdw12

7 years agoFixed a bug where cdw11 was being overwritten by cdw12
Muhammad Ahmad [Fri, 2 Mar 2018 06:07:57 +0000 (00:07 -0600)]
Fixed a bug where cdw11 was being overwritten by cdw12

7 years agoRegenerate documentation
Keith Busch [Thu, 1 Mar 2018 17:06:52 +0000 (10:06 -0700)]
Regenerate documentation

Signed-off-by: Keith Busch <keith.busch@intel.com>
7 years agoAdd manpage for endurance log
Keith Busch [Thu, 1 Mar 2018 17:00:10 +0000 (10:00 -0700)]
Add manpage for endurance log

Signed-off-by: Keith Busch <keith.busch@intel.com>
7 years agonvme-cli: fix typo in 'disconnect' docs
Daniel Verkamp [Thu, 1 Mar 2018 16:50:44 +0000 (09:50 -0700)]
nvme-cli: fix typo in 'disconnect' docs

Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Signed-off-by: Keith Busch <keith.busch@intel.com>
7 years agoFix fabrics property commands
Keith Busch [Fri, 23 Feb 2018 12:04:11 +0000 (05:04 -0700)]
Fix fabrics property commands

The code was casting pointers to fundamentally different types.

Link: https://github.com/linux-nvme/nvme-cli/issues/310
Signed-off-by: Keith Busch <keith.busch@intel.com>
7 years agoMerge pull request #305 from minwooim/v1.6/sanitize_helper
Keith Busch [Thu, 22 Feb 2018 16:22:25 +0000 (09:22 -0700)]
Merge pull request #305 from minwooim/v1.6/sanitize_helper

nvme-cli: add helper for sanitize command

7 years agoMerge pull request #306 from minwooim/v1.6/update_identify_data_size_macro
Keith Busch [Wed, 21 Feb 2018 19:00:02 +0000 (12:00 -0700)]
Merge pull request #306 from minwooim/v1.6/update_identify_data_size_macro

nvme-cli: make it use NVME_IDENTIFY_DATA_SIZE

7 years agoMerge pull request #308 from tim-oleksii/master
Keith Busch [Wed, 21 Feb 2018 18:59:53 +0000 (11:59 -0700)]
Merge pull request #308 from tim-oleksii/master

nvme-cli: fix endianess in WDC plugin.

7 years agoFix endianess in WDC plugin.
Oleksii Timofieiev [Wed, 21 Feb 2018 15:45:50 +0000 (18:45 +0300)]
Fix endianess in WDC plugin.

Signed-off-by: Oleksii Timofieiev <tim.oleksii@gmail.com>
7 years agoMerge pull request #307 from minwooim/v1.6/apply_json_uint
Keith Busch [Mon, 19 Feb 2018 21:41:58 +0000 (14:41 -0700)]
Merge pull request #307 from minwooim/v1.6/apply_json_uint

nvme-cli: adjust json print according to uint format

7 years agoIgnore cscope files
Keith Busch [Sun, 18 Feb 2018 17:44:20 +0000 (10:44 -0700)]
Ignore cscope files

Signed-off-by: Keith Busch <keith.busch@gmail.com>
7 years agoAdd read-recover level feature decoding
Keith Busch [Sat, 17 Feb 2018 21:13:13 +0000 (14:13 -0700)]
Add read-recover level feature decoding

Signed-off-by: Keith Busch <keith.busch@gmail.com>
7 years agoAdd support for NVMe Sets log page
Keith Busch [Sat, 17 Feb 2018 18:09:01 +0000 (11:09 -0700)]
Add support for NVMe Sets log page

Implemented from ratified TP4018

Signed-off-by: Keith Busch <keith.busch@gmail.com>
7 years agoAdd support for decoding IO Determinism features
Keith Busch [Sun, 4 Feb 2018 00:12:06 +0000 (17:12 -0700)]
Add support for decoding IO Determinism features

This patch adds support for setting and getting the IO determinisitic
windows and configuration, as defined by TP4003.

Signed-off-by: Keith Busch <keith.busch@gmail.com>
7 years agoAdd decoding for new controller attributes
Keith Busch [Sat, 3 Feb 2018 17:56:49 +0000 (10:56 -0700)]
Add decoding for new controller attributes

Attributes added in 1.3 and TP4003: non-operational powerstates and
IO determinism.

Signed-off-by: Keith Busch <keith.busch@gmail.com>
7 years agoUpdate makefile dependencies
Keith Busch [Sat, 17 Feb 2018 20:51:21 +0000 (13:51 -0700)]
Update makefile dependencies

Most object files use some of the nvme APIs, so make the dependency
explicit to avoid any build errors.

Signed-off-by: Keith Busch <keith.busch@gmail.com>
7 years agonvme-cli: add netapp smdevices man page
Schremmer, Steven [Mon, 12 Feb 2018 19:31:11 +0000 (19:31 +0000)]
nvme-cli: add netapp smdevices man page

Signed-off-by: Steve Schremmer <steve.schremmer@netapp.com>
7 years agonvme-cli: add NetApp plugin
Schremmer, Steven [Mon, 12 Feb 2018 19:27:32 +0000 (19:27 +0000)]
nvme-cli: add NetApp plugin

Add smdevices command for NetApp E-Series devices.

Signed-off-by: Steve Schremmer <steve.schremmer@netapp.com>
7 years agoFix freeing wrong address
Keith Busch [Mon, 12 Feb 2018 15:03:26 +0000 (08:03 -0700)]
Fix freeing wrong address

We increment the pointer for the firmware buffer as we read it, so we
can't free that value. This patch saves the original address so it may
be freed later.

Link: https://github.com/linux-nvme/nvme-cli/issues/304
Fixes: 7151acc
Signed-off-by: Keith Busch <keith.busch@intel.com>
7 years agonvme-cli: make it use NVME_IDENTIFY_DATA_SIZE
Minwoo Im [Thu, 8 Feb 2018 13:27:06 +0000 (22:27 +0900)]
nvme-cli: make it use NVME_IDENTIFY_DATA_SIZE

Update 0x1000 hard coding magic value to NVME_IDENTIFY_DATA_SIZE which
was added in linux-nvme driver commit 0add5e8e588c.

Signed-off-by: Minwoo Im <minwoo.im.dev@gmail.com>
7 years agonvme-cli: adjust json print according to uint format
Minwoo Im [Thu, 8 Feb 2018 12:10:55 +0000 (21:10 +0900)]
nvme-cli: adjust json print according to uint format

Adjust JSON print format according to uint format which has recently been
added with no functional change.

Signed-off-by: Minwoo Im <minwoo.im.dev@gmail.com>
7 years agonvme-cli: add helper for sanitize command
Minwoo Im [Thu, 8 Feb 2018 11:39:54 +0000 (20:39 +0900)]
nvme-cli: add helper for sanitize command

Add helper function for sanitize command just like other commands with few
error returning from wrong options.

Signed-off-by: Minwoo Im <minwoo.im.dev@gmail.com>