]> www.infradead.org Git - users/hch/nvme-cli.git/log
users/hch/nvme-cli.git
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>
7 years agonvme-cli: telemetry-log add controller initiated log gathering
Scott Bauer [Mon, 5 Feb 2018 21:26:23 +0000 (14:26 -0700)]
nvme-cli: telemetry-log add controller initiated log gathering

If the controller has a controller initiated log (0x8) available,
we can now retrieve it.

Signed-off-by: Scott Bauer <scott.bauer@intel.com>
Signed-off-by: Keith Busch <keith.busch@intel.com>
7 years agoMerge pull request #297 from minwooim/v1.6/iekey_to_no_argu
Keith Busch [Mon, 5 Feb 2018 21:11:33 +0000 (14:11 -0700)]
Merge pull request #297 from minwooim/v1.6/iekey_to_no_argu

nvme-cli: convert iekey into a no_argument parameter

7 years agoMerge branch 'master' into v1.6/iekey_to_no_argu
Keith Busch [Mon, 5 Feb 2018 21:11:21 +0000 (14:11 -0700)]
Merge branch 'master' into v1.6/iekey_to_no_argu

7 years agoMerge pull request #296 from minwooim/v1.6/return_neg_val_get_nsid
Keith Busch [Mon, 5 Feb 2018 21:09:49 +0000 (14:09 -0700)]
Merge pull request #296 from minwooim/v1.6/return_neg_val_get_nsid

nvme-cli: make return negative value in nvme_get_nsid() when not blkdev

7 years agoMerge pull request #295 from minwooim/v1.6/update_doc
Keith Busch [Mon, 5 Feb 2018 21:08:57 +0000 (14:08 -0700)]
Merge pull request #295 from minwooim/v1.6/update_doc

nvme-cli: update documentations to sync up with subcommands

7 years agoMerge pull request #294 from minwooim/v1.6/move_print_to_nvme_print
Keith Busch [Mon, 5 Feb 2018 21:08:40 +0000 (14:08 -0700)]
Merge pull request #294 from minwooim/v1.6/move_print_to_nvme_print

nvme-cli: move print-function to nvme-print

7 years agoMerge pull request #293 from minwooim/v1.6/fix_leaks_in_commands
Keith Busch [Mon, 5 Feb 2018 21:08:04 +0000 (14:08 -0700)]
Merge pull request #293 from minwooim/v1.6/fix_leaks_in_commands

nvme-cli: fix leaks in subcommands

7 years agoMerge pull request #292 from minwooim/v1.6/add_print_cname_effects_log
Keith Busch [Mon, 5 Feb 2018 21:07:12 +0000 (14:07 -0700)]
Merge pull request #292 from minwooim/v1.6/add_print_cname_effects_log

nvme-cli: add print for command name to effects-log

7 years agoMerge pull request #291 from minwooim/v1.6/bpid_cdw10_fw_commit
Keith Busch [Mon, 5 Feb 2018 21:06:02 +0000 (14:06 -0700)]
Merge pull request #291 from minwooim/v1.6/bpid_cdw10_fw_commit

nvme-cli: make it have bpid in cdw10 for fw-commit

7 years agoMerge pull request #290 from minwooim/v1.6/add_cs_field_to_json_error_log
Keith Busch [Mon, 5 Feb 2018 21:04:23 +0000 (14:04 -0700)]
Merge pull request #290 from minwooim/v1.6/add_cs_field_to_json_error_log

nvme-cli: add command specific field to json output of error-log

7 years agoflush: Use device NSID if issuing through block device
Keith Busch [Mon, 5 Feb 2018 20:19:40 +0000 (13:19 -0700)]
flush: Use device NSID if issuing through block device

Signed-off-by: Keith Busch <keith.busch@intel.com>
7 years agoNVMe-CLI Fix fw_log Command json output
Jeff Lien [Mon, 5 Feb 2018 16:35:59 +0000 (10:35 -0600)]
NVMe-CLI Fix fw_log Command json output

Currently, the json output for the fw_log command slot number
is zero based while the normal output is one based.  This patch
will change the json output to one based.  It will also only
print the revisions for the valid slots.

Signed-off-by: Jeff Lien <jeff.lien@wdc.com>
[fixed whitespace formatting]
Signed-off-by: Keith Busch <keith.busch@intel.com>
7 years agoMerge pull request #303 from pborzenkov/intel-smart
Keith Busch [Mon, 5 Feb 2018 16:14:54 +0000 (09:14 -0700)]
Merge pull request #303 from pborzenkov/intel-smart

nvme-cli: fix typo in Intel SMART json output

7 years agonvme-cli: fix typo in Intel SMART json output
Pavel Borzenkov [Mon, 5 Feb 2018 11:22:06 +0000 (14:22 +0300)]
nvme-cli: fix typo in Intel SMART json output

Signed-off-by: Pavel Borzenkov <pavel.borzenkov@gmail.com>
7 years agonvme-cli: update documentations to sync up with subcommands
Minwoo Im [Tue, 30 Jan 2018 10:36:49 +0000 (19:36 +0900)]
nvme-cli: update documentations to sync up with subcommands

Update all documentations to sync up with built-in plugin subcommands.
Not only options supported by subcommands, But few descriptions have not
been updated with implementations.

Sync-up documentation with subcommands implementations.

Signed-off-by: Minwoo Im <minwoo.im.dev@gmail.com>
7 years agonvme-cli: convert iekey into a no_argument parameter
Minwoo Im [Tue, 30 Jan 2018 10:11:42 +0000 (19:11 +0900)]
nvme-cli: convert iekey into a no_argument parameter

IEKEY(Ignore Existing Key) option is used widely in Reservation Acquire,
Reservation Register, and Reservation Release in a type of bool(1-bit).

Only resv_release() uses iekey field as a required_argument parameter.
It seems unnecessary because it will not be checked if this parameter
is given or not by a following condition because default value is 0.

        if (cfg.iekey > 1)

So remove unnecessary if-statement and convert this field to a
no_argument type option.

Signed-off-by: Minwoo Im <minwoo.im.dev@gmail.com>
7 years agonvme-cli: make return negative value in nvme_get_nsid() when not blkdev
Minwoo Im [Tue, 30 Jan 2018 10:10:27 +0000 (19:10 +0900)]
nvme-cli: make return negative value in nvme_get_nsid() when not blkdev

If caller invokes get_nsid() with character device without checking
whether a given device is block device or not, ENOTBLK is returned from
nvme_get_nsid() which is a positive value, so that caller may treat this
value as a valid nsid.

Make it return a negative vaelue with -ENOTBLK and add error checking to
callers.

Signed-off-by: Minwoo Im <minwoo.im.dev@gmail.com>
7 years agonvme-cli: move print-function to nvme-print
Minwoo Im [Fri, 26 Jan 2018 15:36:19 +0000 (00:36 +0900)]
nvme-cli: move print-function to nvme-print

Code clean-up by moving print-functions for list and list-subsys
commands to nvme-print.c with no functional changes.

Signed-off-by: Minwoo Im <minwoo.im.dev@gmail.com>
7 years agonvme-cli: fix leaks in subcommands
Minwoo Im [Fri, 26 Jan 2018 15:36:01 +0000 (00:36 +0900)]
nvme-cli: fix leaks in subcommands

Fix leaks(a single memory leak, file descriptors leaks) in subcommands
by adding explicit close for opened things.

Signed-off-by: Minwoo Im <minwoo.im.dev@gmail.com>
7 years agonvme-cli: add print for command name to effects-log
Minwoo Im [Fri, 26 Jan 2018 15:35:44 +0000 (00:35 +0900)]
nvme-cli: add print for command name to effects-log

Commands Supported and Effects log page describes commands supported and
effects of commands. It would be better if command names are printed out
with their opcodes.

So, Add the command names following NVMe 1.3a specification to
effects-log command to both normal mode and json mode.

Example of commands output
========
Admin Command Set
ACS0     [Delete I/O Submission Queue     ] 00000001
ACS1     [Create I/O Submission Queue     ] 00000001
ACS2     [Get Log Page                    ] 00000001
ACS4     [Delete I/O Completion Queue     ] 00000001
ACS5     [Create I/O Completion Queue     ] 00000001
ACS6     [Identify                        ] 00000001
ACS8     [Abort                           ] 00000001
ACS9     [Set Features                    ] 00000001
ACS10    [Get Features                    ] 00000001
ACS12    [Asynchronous Event Request      ] 00000001
ACS16    [Firmware Commit                 ] 00000001
ACS17    [Firmware Image Download         ] 00000001
ACS128   [Format NVM                      ] 00020003
ACS129   [Security Send                   ] 00020003
ACS130   [Security Receive                ] 00010001

NVM Command Set
IOCS0    [Flush                           ] 00010001
IOCS1    [Write                           ] 00000003
IOCS2    [Read                            ] 00000001
IOCS4    [Write Uncorrectable             ] 00000003
IOCS5    [Compare                         ] 00000001
IOCS8    [Write Zeroes                    ] 00000003
IOCS9    [Dataset Management              ] 00010003
=======

Signed-off-by: Minwoo Im <minwoo.im.dev@gmail.com>
7 years agonvme-cli: make it have bpid in cdw10 for fw-commit
Minwoo Im [Tue, 30 Jan 2018 09:56:46 +0000 (18:56 +0900)]
nvme-cli: make it have bpid in cdw10 for fw-commit

_bpid_ was added as a parameter in commit d52c9988 without any being
used.
Make it have inside of cdw10 before submitting a command.

Fixes: d52c9988 ("nvme-cli: update Firmware Commit with boot partition
feature")
Signed-off-by: Minwoo Im <minwoo.im.dev@gmail.com>
7 years agonvme-cli: add command specific field to json output of error-log
Minwoo Im [Tue, 30 Jan 2018 09:55:27 +0000 (18:55 +0900)]
nvme-cli: add command specific field to json output of error-log

Add command specific field to json output of error-log command.
This field was added in commit 662c1618 without considering json output
format.

Fixes: 662c1618("nvme-cli: add print for command specific info field of
error log page")
Signed-off-by: Minwoo Im <minwoo.im.dev@gmail.com>
7 years agoMerge pull request #289 from tim-oleksii/master
Keith Busch [Mon, 29 Jan 2018 16:13:31 +0000 (09:13 -0700)]
Merge pull request #289 from tim-oleksii/master

nvme-cli: Fixed incosistency of error handling in intel plugin

7 years agonvme-cli: Fixed incosistency of error handling in intel plugin
Oleksii Timofieiev [Mon, 29 Jan 2018 16:10:04 +0000 (19:10 +0300)]
nvme-cli: Fixed incosistency of error handling in intel plugin
Signed-off-by: Oleksii Timofieiev <tim.oleksii@gmail.com>
7 years agoUse '-' for compounded word telemetry-log subcommand
Keith Busch [Thu, 25 Jan 2018 17:31:55 +0000 (10:31 -0700)]
Use '-' for compounded word telemetry-log subcommand

Just for consistency.

Signed-off-by: Keith Busch <keith.busch@intel.com>
7 years agoUse NSID all for error log
Keith Busch [Thu, 25 Jan 2018 17:29:39 +0000 (10:29 -0700)]
Use NSID all for error log

At least some controllers return error if using 0 for the namespace. This
is essentially reverting to the previous behavior before 3ec5ae78c.

Signed-off-by: Keith Busch <keith.busch@intel.com>
7 years agonvme-cli: Implement nvme_get_log13
Scott Bauer [Mon, 22 Jan 2018 20:35:34 +0000 (13:35 -0700)]
nvme-cli: Implement nvme_get_log13

This fixes a portion of 722c71bb:
nvme/vendor: Add get log LSP/LSO fields from 1.3 spec

This fixes up the code so it can use the same interface
log we've had for awhile. People who wish to pass log
specific parameters can use the new API.

Signed-off-by: Scott Bauer <scott.bauer@intel.com>
Signed-off-by: Keith Busch <keith.busch@intel.com>
7 years agoMerge pull request #286 from tim-oleksii/master
Keith Busch [Wed, 24 Jan 2018 17:28:36 +0000 (10:28 -0700)]
Merge pull request #286 from tim-oleksii/master

nvme-cli: wdc: Removed superfluous output in WDC plugin

7 years agonvme-cli: handle long commands in help message by adjusting minimal padding
Oleksii Timofieiev [Wed, 24 Jan 2018 10:49:13 +0000 (13:49 +0300)]
nvme-cli: handle long commands in help message by adjusting minimal padding
Signed-off-by: Oleksii Timofieiev <tim.oleksii@gmail.com>
7 years agonvme-cli: wdc: Removed superfluous output in WDC plugin
Oleksii Timofieiev [Tue, 23 Jan 2018 10:16:22 +0000 (13:16 +0300)]
nvme-cli: wdc: Removed superfluous output in WDC plugin

Signed-off-by: Oleksii Timofieiev <tim.oleksii@gmail.com>
7 years agoMerge pull request #283 from tim-oleksii/master
Keith Busch [Mon, 22 Jan 2018 18:40:40 +0000 (11:40 -0700)]
Merge pull request #283 from tim-oleksii/master

nvme-cli: Add support of unsigned long long to json routines

7 years agoNVMe-CLI WDC-Plugin Update drive essentials code with review comments.
Jeff Lien [Fri, 19 Jan 2018 18:00:53 +0000 (12:00 -0600)]
NVMe-CLI WDC-Plugin Update drive essentials code with review comments.

Signed-off-by: Jeff Lien <jeff.lien@wdc.com>
7 years agonvme-cli: Add support of unsigned long long to json routines
Oleksii Timofieiev [Sat, 20 Jan 2018 10:34:44 +0000 (13:34 +0300)]
nvme-cli: Add support of unsigned long long to json routines
Signed-off-by: Oleksii Timofieiev <tim.oleksii@gmail.com>
7 years agoMerge pull request #279 from minwooim/for-1.6
Keith Busch [Fri, 19 Jan 2018 02:54:34 +0000 (19:54 -0700)]
Merge pull request #279 from minwooim/for-1.6

nvme-cli: memblaze: update memblaze plugin

7 years agoNVMe-CLI WDC-Plugin Add clear-pcie-corr documentation.
Jeff Lien [Thu, 18 Jan 2018 21:01:38 +0000 (15:01 -0600)]
NVMe-CLI WDC-Plugin Add clear-pcie-corr documentation.

Signed-off-by: Jeff Lien <jeff.lien@wdc.com>
7 years agoNVMe-CLI WDC-Plugin Add clear-pcie-corr command
Jeff Lien [Thu, 18 Jan 2018 21:01:00 +0000 (15:01 -0600)]
NVMe-CLI WDC-Plugin Add clear-pcie-corr command

Signed-off-by: Jeff Lien <jeff.lien@wdc.com>
[Merged to account for recent API changes]
Signed-off-by: Keith Busch <keith.busch@intel.com>
7 years agoNVMe-CLI WDC-Plugin Add drive-essentials documentation
Jeff Lien [Thu, 18 Jan 2018 19:22:22 +0000 (13:22 -0600)]
NVMe-CLI WDC-Plugin Add drive-essentials documentation

Signed-off-by: Jeff Lien <jeff.lien@wdc.com>
7 years agoNVMe-CLI WDC-Plugin Add drive-essentials command
Jeff Lien [Thu, 18 Jan 2018 19:21:38 +0000 (13:21 -0600)]
NVMe-CLI WDC-Plugin Add drive-essentials command

Signed-off-by: Jeff Lien <jeff.lien@wdc.com>
7 years agoMerge branch 'v1.6/update_memblaze' of https://github.com/minwooim/nvme-cli into...
Minwoo Im [Fri, 19 Jan 2018 00:25:19 +0000 (09:25 +0900)]
Merge branch 'v1.6/update_memblaze' of https://github.com/minwooim/nvme-cli into for-1.6

7 years agonvme-cli: memblaze: add error return after parse_and_open()
Minwoo Im [Thu, 18 Jan 2018 09:16:31 +0000 (18:16 +0900)]
nvme-cli: memblaze: add error return after parse_and_open()

Add returning error when it fails.

Signed-off-by: Minwoo Im <minwoo.im.dev@gmail.com>
7 years agonvme-cli: memblaze: fix memory leak in memblaze-nvme.c
Minwoo Im [Thu, 18 Jan 2018 09:12:58 +0000 (18:12 +0900)]
nvme-cli: memblaze: fix memory leak in memblaze-nvme.c

Once _buf_ is allocted by posix_memalign(), all return statement
should check if _buf_ is allocated and, if so, free it.

Make it jump to free: to free _buf_ if allocted.

Signed-off-by: Minwoo Im <minwoo.im.dev@gmail.com>
7 years agoMerge pull request #276 from minwooim/v1.6/update_wdc
Keith Busch [Thu, 18 Jan 2018 08:41:27 +0000 (01:41 -0700)]
Merge pull request #276 from minwooim/v1.6/update_wdc

nvme-cli: wdc: update wdc plugin

7 years agoMerge pull request #275 from minwooim/v1.6/fix_memory_leak
Keith Busch [Thu, 18 Jan 2018 08:40:49 +0000 (01:40 -0700)]
Merge pull request #275 from minwooim/v1.6/fix_memory_leak

nvme-cli: fix memory leak in nvme.c

7 years agoMerge pull request #274 from minwooim/v1.6/handle_error_for_malloc
Keith Busch [Thu, 18 Jan 2018 08:39:31 +0000 (01:39 -0700)]
Merge pull request #274 from minwooim/v1.6/handle_error_for_malloc

nvme-cli: add error handling for a failure of malloc

7 years agoMerge pull request #278 from ScottyBauer/implement_telemetry3
Keith Busch [Thu, 18 Jan 2018 02:24:33 +0000 (19:24 -0700)]
Merge pull request #278 from ScottyBauer/implement_telemetry3

nvme-cli: Implement get_telemetry_log from 1.3 spec

7 years agoMerge pull request #277 from minwooim/v1.6/update_lnvm
Keith Busch [Thu, 18 Jan 2018 02:01:41 +0000 (19:01 -0700)]
Merge pull request #277 from minwooim/v1.6/update_lnvm

nvme-cli: lnvm: Make it return error status when argconfig_parse fails

7 years agonvme/vendor: Add get log LSP/LSO fields from 1.3 spec
Scott Bauer [Tue, 16 Jan 2018 17:46:50 +0000 (10:46 -0700)]
nvme/vendor: Add get log LSP/LSO fields from 1.3 spec

Signed-off-by: Scott Bauer <scott.bauer@intel.com>
[Fixed param descriptions and short opt]
Signed-off-by: Keith Busch <keith.busch@intel.com>
7 years agonvme-cli: Implement get_telemetry_log from 1.3 spec
Scott Bauer [Wed, 17 Jan 2018 17:39:20 +0000 (10:39 -0700)]
nvme-cli: Implement get_telemetry_log from 1.3 spec

Signed-off-by: Scott Bauer <scott.bauer@intel.com>
7 years agonvme-cli: lnvm: Make it return error status when argconfig_parse fails
Minwoo Im [Wed, 17 Jan 2018 15:26:16 +0000 (00:26 +0900)]
nvme-cli: lnvm: Make it return error status when argconfig_parse fails

The return value of argconfig_parse() should be returned if it fails.
Make lnvm commands return when it fails.

Signed-off-by: Minwoo Im <minwoo.im.dev@gmail.com>
7 years agonvme-cli: fix memory leak in passthru()
Minwoo Im [Wed, 17 Jan 2018 12:28:56 +0000 (21:28 +0900)]
nvme-cli: fix memory leak in passthru()

If _metadata_ is allocated with metadata_len in fail case of
posix_memalign() for _data_, it should be freed properly.

Add freeing _metadata_ if _data_ is failed to be allocated.

Signed-off-by: Minwoo Im <minwoo.im.dev@gmail.com>
7 years agonvme-cli: wdc: fix mismatch in document for smart-add-log
Minwoo Im [Wed, 17 Jan 2018 11:49:41 +0000 (20:49 +0900)]
nvme-cli: wdc: fix mismatch in document for smart-add-log

Fix mistype in document for smart-add-log in _wdc_ plugin.
Human readable output mode is nor supported by this command.

Replace it with normal.

Reported in github issue #270.

Reported-by: Oleksii Timofieiev <tim.oleksii@gmail.com>
Signed-off-by: Minwoo Im <minwoo.im.dev@gmail.com>
7 years agonvme-cli: wdc: add const to descriptions
Minwoo Im [Wed, 17 Jan 2018 11:42:43 +0000 (20:42 +0900)]
nvme-cli: wdc: add const to descriptions

Add const to descriptions.

Signed-off-by: Minwoo Im <minwoo.im.dev@gmail.com>
7 years agonvme-cli: fix memory leak in dir_receive()
Minwoo Im [Wed, 17 Jan 2018 11:29:41 +0000 (20:29 +0900)]
nvme-cli: fix memory leak in dir_receive()

Fix memory leak for _buf_.

==10014== HEAP SUMMARY:
==10014==     in use at exit: 16 bytes in 1 blocks
==10014==   total heap usage: 52 allocs, 51 frees, 15,638 bytes
allocated
==10014==
==10014== Searching for pointers to 1 not-freed blocks
==10014== Checked 70,656 bytes
==10014==
==10014== 16 bytes in 1 blocks are definitely lost in loss record 1 of 1
==10014==    at 0x4C2FFC6: memalign (in
/usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==10014==    by 0x4C300D1: posix_memalign (in
/usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==10014==    by 0x402733: dir_receive (nvme.c:3531)
==10014==    by 0x4192A7: handle_plugin (plugin.c:150)
==10014==    by 0x401890: main (nvme.c:3825)
==10014==
==10014== LEAK SUMMARY:
==10014==    definitely lost: 16 bytes in 1 blocks
==10014==    indirectly lost: 0 bytes in 0 blocks
==10014==      possibly lost: 0 bytes in 0 blocks
==10014==    still reachable: 0 bytes in 0 blocks
==10014==         suppressed: 0 bytes in 0 blocks
==10014==
==10014== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0)

Signed-off-by: Minwoo Im <minwoo.im.dev@gmail.com>
7 years agonvme-cli: fix memory leak in sec_recv()
Minwoo Im [Wed, 17 Jan 2018 11:26:37 +0000 (20:26 +0900)]
nvme-cli: fix memory leak in sec_recv()

Fix memory leak for _sec_buf_.

==7670== HEAP SUMMARY:
==7670==     in use at exit: 4,096 bytes in 1 blocks
==7670==   total heap usage: 31 allocs, 30 frees, 8,046 bytes allocated
==7670==
==7670== Searching for pointers to 1 not-freed blocks
==7670== Checked 70,656 bytes
==7670==
==7670== 4,096 bytes in 1 blocks are definitely lost in loss record 1 of
1
==7670==    at 0x4C2FFC6: memalign (in
/usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==7670==    by 0x4C300D1: posix_memalign (in
/usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==7670==    by 0x4056F3: sec_recv (nvme.c:3391)
==7670==    by 0x419587: handle_plugin (plugin.c:150)
==7670==    by 0x401890: main (nvme.c:3799)
==7670==
==7670== LEAK SUMMARY:
==7670==    definitely lost: 4,096 bytes in 1 blocks
==7670==    indirectly lost: 0 bytes in 0 blocks
==7670==      possibly lost: 0 bytes in 0 blocks
==7670==    still reachable: 0 bytes in 0 blocks
==7670==         suppressed: 0 bytes in 0 blocks
==7670==
==7670== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0)

Signed-off-by: Minwoo Im <minwoo.im.dev@gmail.com>
7 years agonvme-cli: fix memory leak in dir_send()
Minwoo Im [Wed, 17 Jan 2018 11:25:14 +0000 (20:25 +0900)]
nvme-cli: fix memory leak in dir_send()

Fix memory leak for _buf_.

==9566== HEAP SUMMARY:
==9566==     in use at exit: 1,024 bytes in 1 blocks
==9566==   total heap usage: 52 allocs, 51 frees, 16,681 bytes allocated
==9566==
==9566== Searching for pointers to 1 not-freed blocks
==9566== Checked 70,656 bytes
==9566==
==9566== 1,024 bytes in 1 blocks are definitely lost in loss record 1 of
1
==9566==    at 0x4C2FFC6: memalign (in
/usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==9566==    by 0x4C300D1: posix_memalign (in
/usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==9566==    by 0x402174: dir_send (nvme.c:2535)
==9566==    by 0x419317: handle_plugin (plugin.c:150)
==9566==    by 0x401890: main (nvme.c:3818)
==9566==
==9566== LEAK SUMMARY:
==9566==    definitely lost: 1,024 bytes in 1 blocks
==9566==    indirectly lost: 0 bytes in 0 blocks
==9566==      possibly lost: 0 bytes in 0 blocks
==9566==    still reachable: 0 bytes in 0 blocks
==9566==         suppressed: 0 bytes in 0 blocks
==9566==
==9566== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0)

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