]> www.infradead.org Git - users/hch/nvme-cli.git/log
users/hch/nvme-cli.git
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 agoMerge pull request #268 from minwooim/v1.6/fix_typo_in_get_feature_test
Keith Busch [Mon, 15 Jan 2018 08:18:48 +0000 (01:18 -0700)]
Merge pull request #268 from minwooim/v1.6/fix_typo_in_get_feature_test

nvme-cli: tests: fix typo in get_feature_test

7 years agonvme-cli: tests: fix typo in get_feature_test
Minwoo Im [Sun, 14 Jan 2018 08:37:25 +0000 (17:37 +0900)]
nvme-cli: tests: fix typo in get_feature_test

Comment and function name typo will directly reflect document which
will be generated by Makefile.

Fix typos like below.
    1. Typo in feature lists in the global comment.
    2. Mandetory -> Mandatory

Signed-off-by: Minwoo Im <minwoo.im.dev@gmail.com>
7 years agoMerge pull request #262 from minwooim/v1.6/intel_smart_log_add
Keith Busch [Sun, 14 Jan 2018 01:37:05 +0000 (18:37 -0700)]
Merge pull request #262 from minwooim/v1.6/intel_smart_log_add

nvme-cli: intel: fix smart-log-add documentation

7 years agoMerge pull request #263 from minwooim/v1.6/intel_add_return_fd
Keith Busch [Sun, 14 Jan 2018 01:36:32 +0000 (18:36 -0700)]
Merge pull request #263 from minwooim/v1.6/intel_add_return_fd

nvme-cli: intel: add check for fd after open to intel commands

7 years agoMerge pull request #264 from minwooim/v1.6/intel_add_const_to_desc
Keith Busch [Sun, 14 Jan 2018 01:36:10 +0000 (18:36 -0700)]
Merge pull request #264 from minwooim/v1.6/intel_add_const_to_desc

nvme-cli: intel: add const to descriptions of subcommand option

7 years agoMerge pull request #266 from minwooim/v1.6/effects_log_update
Keith Busch [Sun, 14 Jan 2018 01:35:40 +0000 (18:35 -0700)]
Merge pull request #266 from minwooim/v1.6/effects_log_update

nvme-cli: add support for options to effect-log subcommand

7 years agoMerge pull request #267 from minwooim/v1.6/remove_nsid_in_error_log
Keith Busch [Sun, 14 Jan 2018 01:34:38 +0000 (18:34 -0700)]
Merge pull request #267 from minwooim/v1.6/remove_nsid_in_error_log

nvme-cli: tests: remove nsid parameter in a testcase of error-log

7 years agoMerge pull request #261 from javigon/master
Keith Busch [Sun, 14 Jan 2018 01:22:24 +0000 (18:22 -0700)]
Merge pull request #261 from javigon/master

lightnvm: enable to set OP on target creation

7 years agonvme-cli: tests: remove nsid parameter in a testcase of error-log
Minwoo Im [Sat, 13 Jan 2018 17:03:06 +0000 (02:03 +0900)]
nvme-cli: tests: remove nsid parameter in a testcase of error-log

Remove nsid parameter in a testcase of error-log subcommand.

This parameter has been removed by a commit 98ffd4b on the master branch
of linux-nvme/nvme-cli.

Signed-off-by: Minwoo Im <minwoo.im.dev@gmail.com>
7 years agonvme-cli: update documentation of effects-log
Minwoo Im [Sat, 13 Jan 2018 12:22:53 +0000 (21:22 +0900)]
nvme-cli: update documentation of effects-log

Update documentation of effects-log subcommand with descriptions of
option. Also add an example of --raw-binary option to the document.

Signed-off-by: Minwoo Im <minwoo.im.dev@gmail.com>
7 years agonvme-cli: add support for options to effects-log subcommand
Minwoo Im [Sat, 13 Jan 2018 12:20:52 +0000 (21:20 +0900)]
nvme-cli: add support for options to effects-log subcommand

Add support for options below to to effects-log subcommand.
    --output-format=<fmt>, -o <fmt>    normal|json|binary
    --human-readable, -H
    --raw-binary, -b

Signed-off-by: Minwoo Im <minwoo.im.dev@gmail.com>
7 years agonvme-cli: intel: add const to descriptions of subcommand option
Minwoo Im [Fri, 12 Jan 2018 13:27:17 +0000 (22:27 +0900)]
nvme-cli: intel: add const to descriptions of subcommand option

Add const to descriptions of subcommand option.

Signed-off-by: Minwoo Im <minwoo.im.dev@gmail.com>
7 years agonvme-cli: intel: add check for fd after open to intel commands
Minwoo Im [Fri, 12 Jan 2018 13:21:06 +0000 (22:21 +0900)]
nvme-cli: intel: add check for fd after open to intel commands

Make it return negative error value when file open is failed to intel
commands.

Signed-off-by: Minwoo Im <minwoo.im.dev@gmail.com>
7 years agonvme-cli: intel: fix smart-log-add documentation
Minwoo Im [Fri, 12 Jan 2018 13:10:26 +0000 (22:10 +0900)]
nvme-cli: intel: fix smart-log-add documentation

tim-oleksii has reported that intel smart-log-add help differs from man
page.

Update man, html, and txt documentation to follow output of below
command.
    ./nvme intel smart-log-add

Signed-off-by: Minwoo Im <minwoo.im.dev@gmail.com>
7 years agolightnvm: enable to set OP on target creation
Javier González [Mon, 30 Oct 2017 13:01:07 +0000 (14:01 +0100)]
lightnvm: enable to set OP on target creation

On target creation, allow to define the over-provision (OP). Since OP
area has a direct impact on write amplification, users can optimize the
OCSSD behavior for their workloads.

Support in the kernel has been upstreamed in 4.16

Signed-off-by: Javier González <javier@cnexlabs.com>
7 years agoMerge pull request #259 from minwooim/v1.6/intel_smart_log_add_doc_update
Keith Busch [Thu, 11 Jan 2018 21:42:12 +0000 (14:42 -0700)]
Merge pull request #259 from minwooim/v1.6/intel_smart_log_add_doc_update

nvme-cli: intel: update smart-log-add command documentation

7 years agoMerge pull request #258 from minwooim/v1.6/lnvm_id_ns
Keith Busch [Thu, 11 Jan 2018 21:42:01 +0000 (14:42 -0700)]
Merge pull request #258 from minwooim/v1.6/lnvm_id_ns

nvme-cli: lnvm: update ns-id subcommand

7 years agoMerge pull request #257 from minwooim/v1.6/add_bps_field_to_cap
Keith Busch [Thu, 11 Jan 2018 21:41:12 +0000 (14:41 -0700)]
Merge pull request #257 from minwooim/v1.6/add_bps_field_to_cap

nvme-cli: add BPS bit field to CAP controller register

7 years agoMerge pull request #255 from minwooim/v1.6/add_sanitize_log_json_print
Keith Busch [Thu, 11 Jan 2018 21:40:35 +0000 (14:40 -0700)]
Merge pull request #255 from minwooim/v1.6/add_sanitize_log_json_print

nvme-cli: add support for json output format of sanitize-log command

7 years agoMerge pull request #254 from minwooim/v1.6/remove_nsid_in_error_log
Keith Busch [Thu, 11 Jan 2018 21:39:50 +0000 (14:39 -0700)]
Merge pull request #254 from minwooim/v1.6/remove_nsid_in_error_log

nvme-cli: Remove nsid param in error-log

7 years agoMerge pull request #256 from minwooim/v1.6/update_alias_desc_readme_md
Keith Busch [Thu, 11 Jan 2018 21:39:12 +0000 (14:39 -0700)]
Merge pull request #256 from minwooim/v1.6/update_alias_desc_readme_md

nvme-cli: update subcommand alias description in README.md

7 years agonvme-cli: intel: update smart-log-add command documentation
Minwoo Im [Wed, 10 Jan 2018 16:35:09 +0000 (01:35 +0900)]
nvme-cli: intel: update smart-log-add command documentation

Update smart-log-add command documentation in intel plugin with
output-format parameter description.

In github issue #175, tim-oleksii reported that descriptions of
output-format whose implementation was added in Pull request #178 was
not added in documentation.

Signed-off-by: Minwoo Im <minwoo.im.dev@gmail.com>
7 years agonvme-cli: update error-log documentation
Minwoo Im [Wed, 10 Jan 2018 15:52:17 +0000 (00:52 +0900)]
nvme-cli: update error-log documentation

Update error-log documentation with removing nsid parameter.

Signed-off-by: Minwoo Im <minwoo.im.dev@gmail.com>
7 years agonvme-cli: lnvm: add human-readable print format to ns-id subcommand
Minwoo Im [Wed, 10 Jan 2018 15:17:25 +0000 (00:17 +0900)]
nvme-cli: lnvm: add human-readable print format to ns-id subcommand

Add human-readable print format to _ns-id_ subcommand of lnvm.
-H option had been used nowhere. Make it possible to see in this format.

Signed-off-by: Minwoo Im <minwoo.im.dev@gmail.com>
7 years agonvme-cli: lnvm: add check for fd after open operation
Minwoo Im [Wed, 10 Jan 2018 15:15:56 +0000 (00:15 +0900)]
nvme-cli: lnvm: add check for fd after open operation

Make it return negative error value when file open operation is failed.

Signed-off-by: Minwoo Im <minwoo.im.dev@gmail.com>
7 years agonvme-cli: lnvm: remove unnecessary force parameter of ns-id in lnvm
Minwoo Im [Wed, 10 Jan 2018 15:13:33 +0000 (00:13 +0900)]
nvme-cli: lnvm: remove unnecessary force parameter of ns-id in lnvm

If identify geometry is failed, then nvme-cli is not to print out
information of namespace.
Also no one uses this _force_ flag in this subcommand.
So, remove this unnecessary parameter.

Signed-off-by: Minwoo Im <minwoo.im.dev@gmail.com>
7 years agonvme-cli: lnvm: add whitespace between words in a description
Minwoo Im [Wed, 10 Jan 2018 15:11:57 +0000 (00:11 +0900)]
nvme-cli: lnvm: add whitespace between words in a description

Add an whitespace between words in a description for ns-id of lightnvm
subcommand.

Signed-off-by: Minwoo Im <minwoo.im.dev@gmail.com>
7 years agonvme-cli: add BPS bit field to CAP controller register
Minwoo Im [Fri, 15 Dec 2017 16:12:06 +0000 (01:12 +0900)]
nvme-cli: add BPS bit field to CAP controller register

NVMe 1.3 spec introduced BPS(Boot Partition Support) bit field in CAP of
controller register.
Add this bit field to "struct nvme_bar_cap" by changing
"css_nssrs_dstrd" field to "bps_css_nssrs_dstrd".
Also add a print for BPS bit field to print CAP properly when show-regs
command with human-readable.

Signed-off-by: Minwoo Im <minwoo.im.dev@gmail.com>
7 years agoUpdate subcommand alias description in README.md
Minwoo Im [Wed, 10 Jan 2018 12:09:36 +0000 (21:09 +0900)]
Update subcommand alias description in README.md

Update description of alias for subcommand.

7 years agonvme-cli: add support for json output format of sanitize-log command
Minwoo Im [Wed, 10 Jan 2018 11:59:29 +0000 (20:59 +0900)]
nvme-cli: add support for json output format of sanitize-log command

Add support for json output format of sanitize-log command.

Signed-off-by: Minwoo Im <minwoo.im.dev@gmail.com>
7 years agonvme-cli: Remove unnecessary nsid field in error-log
Minwoo Im [Wed, 10 Jan 2018 11:04:45 +0000 (20:04 +0900)]
nvme-cli: Remove unnecessary nsid field in error-log

Error information log page is global to controller.

Signed-off-by: Minwoo Im <minwoo.im.dev@gmail.com>
7 years agoMerge pull request #251 from minwooim/v1.6/update_print_sanitize
Keith Busch [Mon, 8 Jan 2018 15:59:44 +0000 (08:59 -0700)]
Merge pull request #251 from minwooim/v1.6/update_print_sanitize

nvme-cli: update print for sanitize-log command with output-format

7 years agoMerge pull request #250 from minwooim/v1.6/make_sanitize_desc_const
Keith Busch [Mon, 8 Jan 2018 15:57:03 +0000 (08:57 -0700)]
Merge pull request #250 from minwooim/v1.6/make_sanitize_desc_const

nvme-cli: make sanitize description const

7 years agoMerge pull request #249 from minwooim/v1.6/add_log_page_field_to_error_log
Keith Busch [Mon, 8 Jan 2018 15:55:30 +0000 (08:55 -0700)]
Merge pull request #249 from minwooim/v1.6/add_log_page_field_to_error_log

nvme-cli: add print for command specific info field of error log page

7 years agonvme-cli: add print for command specific info field of error log page
Minwoo Im [Sun, 7 Jan 2018 07:33:09 +0000 (16:33 +0900)]
nvme-cli: add print for command specific info field of error log page

Add print line for Command Specific Information[39:32] in Error
Information Log Entry.

Signed-off-by: Minwoo Im <minwoo.im.dev@gmail.com>
7 years agonvme-cli: update print for sanitize-log command with output-format
Minwoo Im [Sun, 7 Jan 2018 07:30:47 +0000 (16:30 +0900)]
nvme-cli: update print for sanitize-log command with output-format

Update print for sanitize-log command with normal and binary
output-format. Also move origin print code to nvme-print.c. with
human-readable option.

Make sanitize-log command call nvme_sanitize_log() so that
it looks more consistent with other XXX-log commands.

Signed-off-by: Minwoo Im <minwoo.im.dev@gmail.com>
7 years agonvme-cli: make sanitize description const
Minwoo Im [Sun, 7 Jan 2018 07:23:59 +0000 (16:23 +0900)]
nvme-cli: make sanitize description const

Make description in sanitize() const.

Signed-off-by: Minwoo Im <minwoo.im.dev@gmail.com>
7 years agoFix verbose decoding for coalescing aggregation time
Keith Busch [Fri, 5 Jan 2018 23:48:57 +0000 (16:48 -0700)]
Fix verbose decoding for coalescing aggregation time

https://github.com/linux-nvme/nvme-cli/issues/246

Signed-off-by: Keith Busch <keith.busch@intel.com>
7 years agoAllow hierarchy of similiarly named plugins
Keith Busch [Wed, 3 Jan 2018 23:03:36 +0000 (16:03 -0700)]
Allow hierarchy of similiarly named plugins

For historical reasons, we allow the user to write their command line
executing "vendor" plugin "command" as one of two ways:

  nvme vendor command

And

  nvme vendor-command

This was conflicting if a hierarchy of vendor additions exists, like
"vendor-oem".

So, this patch fixes that by first searching the entire builtin vendor
plugins before searching for matching substrings.

Signed-off-by: Keith Busch <keith.busch@intel.com>
7 years agoRelease v1.5 v1.5
Keith Busch [Wed, 3 Jan 2018 15:37:02 +0000 (08:37 -0700)]
Release v1.5

It's been a while since the previous release, and we've accumulated
enough updates to warrant a new tag. Shortlog below.

There are printing fixes and improvements to output, documentation
updates, enhancements to vendor plugins, updates for the NVMe 1.3
Specification, a new command for listing subsystems, a new way to alias
sub-commands in case old ones need to be deprecated, fabrics fixes,
and resource leak fixes. Thank you to everyone who contributed!

Andrew Maier (2):
      Nitpicked a printing alignment issue with the id-ns vendor specific field
      Updated the human readable printing for the SGLS field in the id-ctrl command to be compliant with NVMe 1.3

David Manouchehri (1):
      Avoid unnecessary abbreviation.

Guan Junxiong (2):
      nvme-cli: add support to get properties for NVMe over Fabric
      nvme-cli: support to set the property for NVMe over Fabric

James Smart (2):
      nvme-cli: add duplicate_connect parameter support
      nvme-cli: add duplicate_connect parameter support

Jeff Lien (2):
      NVMe-CLI : WDC-Plugin Updated Smart Log Command
      NVMe-CLI : WDC-Plugin Documentation for Updated Smart Log Command

Johannes Thumshirn (2):
      fabrics: also set queue_size and nr_io_queues on connect-all connects
      nvme: Introduce new 'list-subsys' command

Keith Busch (28):
      Add AEN decoder helper to get-log
      Regen documentation
      Merge pull request #228 from primeos/nixos
      intel-nvme: Fix compiler errors and warnings
      Merge pull request #229 from steve-gh/master
      Add command effects log page
      Increase default format timeout
      Revert "nvme-cli: add duplicate_connect parameter support"
      Merge pull request #230 from liangxiao1/upstream
      Fix typo in previous commit
      Fix long suffix parse on 32-bit machines
      Merge pull request #232 from Manouchehri/verbose
      nvme/flush: explicitely close file descriptor
      Merge pull request #233 from cleandever/master
      Add 'DEAC' support to write-zeroes command
      Rebuild documentation
      Regenerate documentation
      Update get-feature help text
      Improve code alignment on intel plugin
      Update intel internal log man page.
      nvme-cli/intel: Return if arg parsing returns error
      nvme: add options for write command directives
      Update documentation
      Merge pull request #238 from Eideticom/andrew-dev
      Reorder command list
      Documentation fixes
      Update documentation to use aliases
      Merge pull request #243 from ScottyBauer/fix_mem_leak

Michael Weiss (2):
      Add Nix(OS) install instructions to the README
      Fix the Markdown code for the Alpine install instructions

Minwoo Im (11):
      nvme-cli: make address print format more human-readable
      nvme-cli: fix wrong bitmask in number of rpmb units.
      nvme-cli: make command description const
      nvme-cli: resync nvme.h with the kernel's
      nvme-cli: update show_registers_cc() to use nvme.h
      nvme-cli: replace values of all namespaces with NVME_NSID_ALL
      nvme-cli: add prints for new HMB identify fields of TP 4002
      nvme-cli: add support alias command with Firmware Activate
      nvme-cli: update Firmware Commit with boot partition feature
      nvme-cli: add command specific status of Firmware Commit
      nvme-cli: add prints of boot partition feature to show-regs

Scott Bauer (1):
      nvme-cli: Fix small mem leak.

Steve (2):
      Include sizing data in json output that's already included in the non-json results.
      Cleanup variable definitions

Xiao Liang (1):
      nvme/id-ns: do not try to get namespace id from non-block device.

cleandever (1):
      Fix memory leak

jeffreyalien (1):
      nvme-cli : wdc-plugin Add support for WDC SN100 and SN200 devices.

Signed-off-by: Keith Busch <keith.busch@intel.com>
7 years agoMerge pull request #243 from ScottyBauer/fix_mem_leak
Keith Busch [Thu, 21 Dec 2017 21:53:58 +0000 (14:53 -0700)]
Merge pull request #243 from ScottyBauer/fix_mem_leak

nvme-cli: Fix small mem leak.

7 years agonvme-cli: Fix small mem leak.
Scott Bauer [Thu, 21 Dec 2017 21:21:59 +0000 (14:21 -0700)]
nvme-cli: Fix small mem leak.

Internally some people are building with asan which complains
that we're leaking that memory. So we'll fix it for them.

Signed-off-by: Scott Bauer <scott.bauer@intel.com>
7 years agonvme-cli: add prints of boot partition feature to show-regs
Minwoo Im [Fri, 15 Dec 2017 15:17:59 +0000 (00:17 +0900)]
nvme-cli: add prints of boot partition feature to show-regs

Add prints of Boot Partition feature.

Signed-off-by: Minwoo Im <minwoo.im.dev@gmail.com>
7 years agoUpdate documentation to use aliases
Keith Busch [Tue, 19 Dec 2017 20:33:49 +0000 (13:33 -0700)]
Update documentation to use aliases

Firmware activate is now called 'fw-commit', so this patch updates the
documentation, documents the options, and renames the man page. The firmware
activate will alias to the new man page if requested.

Signed-off-by: Keith Busch <keith.busch@intel.com>
7 years agonvme-cli: add command specific status of Firmware Commit
Minwoo Im [Sun, 17 Dec 2017 09:58:53 +0000 (18:58 +0900)]
nvme-cli: add command specific status of Firmware Commit

NVMe 1.3 spec introduced Boot Partition feature with Boot Partition
Write Prohibited status code for Firmware Commit command.

Add this status code and print statement when parsing error code.

Signed-off-by: Minwoo Im <minwoo.im.dev@gmail.com>
7 years agonvme-cli: update Firmware Commit with boot partition feature
Minwoo Im [Sun, 17 Dec 2017 09:58:41 +0000 (18:58 +0900)]
nvme-cli: update Firmware Commit with boot partition feature

NVMe 1.3 spec introduced boot partition feature to Firmware Commit
command.

Make it support boot partition feature in Firmware Commit command.

Signed-off-by: Minwoo Im <minwoo.im.dev@gmail.com>
7 years agonvme-cli: add support alias command with Firmware Activate
Minwoo Im [Sun, 17 Dec 2017 09:58:28 +0000 (18:58 +0900)]
nvme-cli: add support alias command with Firmware Activate

Firmware Activate command were known as "Firmware Activate" in NVMe 1.0
and 1.1. It has been changed to "Firmware Commit" since 1.2.

This patch will make it support a single alias for every subcommands.
Also make "fw-activate" command to be registered in "fw-commit" as an
alias for backward compatibility.

Signed-off-by: Minwoo Im <minwoo.im.dev@gmail.com>
7 years agoDocumentation fixes
Keith Busch [Wed, 13 Dec 2017 15:32:49 +0000 (08:32 -0700)]
Documentation fixes

Fixed asciidoc errors in set-properties, regenerated remaining documentation
files for latest updates.

Signed-off-by: Keith Busch <keith.busch@intel.com>
7 years agoReorder command list
Keith Busch [Wed, 13 Dec 2017 15:29:38 +0000 (08:29 -0700)]
Reorder command list

Puts list commands at the top.

Signed-off-by: Keith Busch <keith.busch@intel.com>
7 years agonvme-cli: support to set the property for NVMe over Fabric
Guan Junxiong [Wed, 13 Dec 2017 02:11:31 +0000 (10:11 +0800)]
nvme-cli: support to set the property for NVMe over Fabric

Signed-off-by: Guan Junxiong <guanjunxiong@huawei.com>
7 years agonvme-cli: add support to get properties for NVMe over Fabric
Guan Junxiong [Wed, 13 Dec 2017 02:11:30 +0000 (10:11 +0800)]
nvme-cli: add support to get properties for NVMe over Fabric

Signed-off-by: Guan Junxiong <guanjunxiong@huawei.com>
7 years agonvme: Introduce new 'list-subsys' command
Johannes Thumshirn [Wed, 13 Dec 2017 14:34:17 +0000 (15:34 +0100)]
nvme: Introduce new 'list-subsys' command

Introduce a 'nvme list-subsys' command to give basic information about
connected NVMe subsystems.

Here's an example output of a host connected to two subsystems on the
target with two paths to each subsystem:
root@host# nvme list-subsys
nvme-subsys0 - NQN=nvmf-test
\
 +- nvme0 rdma traddr=1.1.1.3 trsvcid=4420 host_traddr=1.1.1.1
 +- nvme1 rdma traddr=1.1.1.3 trsvcid=4420 host_traddr=1.1.1.2
nvme-subsys1 - NQN=nvmf-test2
\
 +- nvme2 rdma traddr=1.1.1.3 trsvcid=4420 host_traddr=1.1.1.2
 +- nvme3 rdma traddr=1.1.1.3 trsvcid=4420 host_traddr=1.1.1.1

Signed-off-by: Johannes Thumshirn <jthumshirn@suse.de>
7 years agoMerge pull request #238 from Eideticom/andrew-dev
Keith Busch [Tue, 12 Dec 2017 23:53:22 +0000 (16:53 -0700)]
Merge pull request #238 from Eideticom/andrew-dev

Update human readable for SGLS field in identify controller to NVMe 1.3

7 years agoUpdated the human readable printing for the SGLS field in the id-ctrl command to...
Andrew Maier [Tue, 12 Dec 2017 23:14:39 +0000 (16:14 -0700)]
Updated the human readable printing for the SGLS field in the id-ctrl command to be compliant with NVMe 1.3

7 years agoUpdate documentation
Keith Busch [Sun, 10 Dec 2017 16:46:15 +0000 (09:46 -0700)]
Update documentation

Spinning docs to include the nvme write directives.

Signed-off-by: Keith Busch <keith.busch@gmail.com>
7 years agonvme: add options for write command directives
Keith Busch [Sun, 10 Dec 2017 16:42:09 +0000 (09:42 -0700)]
nvme: add options for write command directives

This patch includes options to specify the directive type and directive
specific. The field is meant to be used for write commands, but since
the code reuse for read, write, and compare currently exists, the options
will appear available to commands other than write.

Since the directive specific is part of the larger DSM field, this patch
also incorporates an option for the non-directive specific portion of
the DSM field.

https://github.com/linux-nvme/nvme-cli/issues/235

Signed-off-by: Keith Busch <keith.busch@gmail.com>
7 years agonvme-cli/intel: Return if arg parsing returns error
Keith Busch [Thu, 7 Dec 2017 18:03:39 +0000 (11:03 -0700)]
nvme-cli/intel: Return if arg parsing returns error

Signed-off-by: Keith Busch <keith.busch@intel.com>
7 years agoUpdate intel internal log man page.
Keith Busch [Thu, 30 Nov 2017 22:58:21 +0000 (15:58 -0700)]
Update intel internal log man page.

Signed-off-by: Keith Busch <keith.busch@intel.com>
7 years agoImprove code alignment on intel plugin
Keith Busch [Thu, 30 Nov 2017 22:48:07 +0000 (15:48 -0700)]
Improve code alignment on intel plugin

Signed-off-by: Keith Busch <keith.busch@intel.com>
7 years agoUpdate get-feature help text
Keith Busch [Thu, 30 Nov 2017 21:57:42 +0000 (14:57 -0700)]
Update get-feature help text

Signed-off-by: Keith Busch <keith.busch@intel.com>
7 years agonvme-cli: add prints for new HMB identify fields of TP 4002
Minwoo Im [Thu, 30 Nov 2017 14:20:01 +0000 (23:20 +0900)]
nvme-cli: add prints for new HMB identify fields of TP 4002

Add prints to __show_nvme_id_ctrl() for fields which were
added in TP 4002 which is "HMB Enhancements".

Signed-off-by: Minwoo Im <minwoo.im.dev@gmail.com>
7 years agonvme-cli: replace values of all namespaces with NVME_NSID_ALL
Minwoo Im [Thu, 30 Nov 2017 14:49:19 +0000 (23:49 +0900)]
nvme-cli: replace values of all namespaces with NVME_NSID_ALL

Replace all magic numbers(0xffffffff) which means all namespaces
with NVME_NSID_ALL applied by a commit
c5a1120("nvme-cli: resync nvme.h with the kernel's").

Signed-off-by: Minwoo Im <minwoo.im.dev@gmail.com>
7 years agonvme-cli: update show_registers_cc() to use nvme.h
Minwoo Im [Thu, 30 Nov 2017 15:49:17 +0000 (00:49 +0900)]
nvme-cli: update show_registers_cc() to use nvme.h

Replace constants for shift in show_register_cc() with macros defined.
Also clean up a small typo (IOSQES to IOCQES).

Signed-off-by: Minwoo Im <minwoo.im.dev@gmail.com>
7 years agoRegenerate documentation
Keith Busch [Tue, 28 Nov 2017 15:45:10 +0000 (08:45 -0700)]
Regenerate documentation

Signed-off-by: Keith Busch <keith.busch@intel.com>
7 years agoNVMe-CLI : WDC-Plugin Documentation for Updated Smart Log Command
Jeff Lien [Tue, 28 Nov 2017 15:43:40 +0000 (08:43 -0700)]
NVMe-CLI : WDC-Plugin Documentation for Updated Smart Log Command

Signed-off-by: Jeff Lien <jeff.lien@wdc.com>
[Split html and man pages from txt]
Signed-off-by: Keith Busch <keith.busch@intel.com>
7 years agoNVMe-CLI : WDC-Plugin Updated Smart Log Command
Jeff Lien [Tue, 28 Nov 2017 14:28:56 +0000 (08:28 -0600)]
NVMe-CLI : WDC-Plugin Updated Smart Log Command

Added the capability to get the CA Log Page data for the WDC SN200
drive along with the C1 Log Page data. Only the C1 Log Page data will
be retrieve for the HGST SN100 drive.

Signed-off-by: Jeff Lien <jeff.lien@wdc.com>
[Fixed subject and whitespace]
Signed-off-by: Keith Busch <keith.busch@intel.com>
7 years agonvme-cli: resync nvme.h with the kernel's
Minwoo Im [Tue, 28 Nov 2017 14:41:17 +0000 (23:41 +0900)]
nvme-cli: resync nvme.h with the kernel's

Copy over nvme.h from for-4.15/block tree to a current one in nvme-cli
and fix a few build errors.

7 years agoRebuild documentation
Keith Busch [Mon, 27 Nov 2017 15:58:14 +0000 (08:58 -0700)]
Rebuild documentation

Signed-off-by: Keith Busch <keith.busch@intel.com>
7 years agoAdd 'DEAC' support to write-zeroes command
Keith Busch [Mon, 27 Nov 2017 15:55:58 +0000 (08:55 -0700)]
Add 'DEAC' support to write-zeroes command

https://github.com/linux-nvme/nvme-cli/issues/234

Signed-off-by: Keith Busch <keith.busch@intel.com>
7 years agoMerge pull request #233 from cleandever/master
Keith Busch [Mon, 27 Nov 2017 15:06:55 +0000 (08:06 -0700)]
Merge pull request #233 from cleandever/master

Fix memory leak

7 years agoFix memory leak
cleandever [Thu, 23 Nov 2017 13:19:11 +0000 (22:19 +0900)]
Fix memory leak

7 years agonvme/flush: explicitely close file descriptor
Keith Busch [Mon, 20 Nov 2017 20:18:51 +0000 (13:18 -0700)]
nvme/flush: explicitely close file descriptor

Was alread closed implicitly immediately after this function returns,
but there's no reason to leave it open either.

Reported-by: Thomas Tai <thomas.tai@oracle.com>
Signed-off-by: Keith Busch <keith.busch@intel.com>
7 years agoMerge pull request #232 from Manouchehri/verbose
Keith Busch [Mon, 13 Nov 2017 15:09:00 +0000 (08:09 -0700)]
Merge pull request #232 from Manouchehri/verbose

Avoid unnecessary abbreviation

7 years agoAvoid unnecessary abbreviation.
David Manouchehri [Sat, 11 Nov 2017 23:29:58 +0000 (18:29 -0500)]
Avoid unnecessary abbreviation.

7 years agoNitpicked a printing alignment issue with the id-ns vendor specific field
Andrew Maier [Fri, 10 Nov 2017 16:58:03 +0000 (09:58 -0700)]
Nitpicked a printing alignment issue with the id-ns vendor specific field

7 years agoFix long suffix parse on 32-bit machines
Keith Busch [Mon, 6 Nov 2017 21:10:08 +0000 (14:10 -0700)]
Fix long suffix parse on 32-bit machines

https://github.com/linux-nvme/nvme-cli/issues/231

Signed-off-by: Keith Busch <keith.busch@intel.com>
7 years agoFix typo in previous commit
Keith Busch [Mon, 6 Nov 2017 21:09:14 +0000 (14:09 -0700)]
Fix typo in previous commit

A previous commit had a stray mark that was missed in review, and broke compiling.

Signed-off-by: Keith Busch <keith.busch@intel.com>
7 years agoMerge pull request #230 from liangxiao1/upstream
Keith Busch [Mon, 6 Nov 2017 21:01:42 +0000 (14:01 -0700)]
Merge pull request #230 from liangxiao1/upstream

nvme/id-ns: do not try to get namespace id from non-block device.

7 years agonvme/id-ns: do not try to get namespace id from non-block device.
Xiao Liang [Wed, 1 Nov 2017 14:49:32 +0000 (22:49 +0800)]
nvme/id-ns: do not try to get namespace id from non-block device.

namespace id's default value is 0 and changed to 15 by get_nsid()
when device is not a block device.

With this change:
# ./nvme id-ns /dev/nvme0 -n 0
Error: requesting namespace-id from non-block device
NVMe Status:INVALID_NS(b) NSID:0
                               ^^
Without this change:
Missleading output when user passed 0 or 15 as namespace id.
# nvme id-ns /dev/nvme0
Error: requesting namespace-id from non-block device
NVMe Status:INVALID_NS(b) NSID:15
                               ^^
# nvme id-ns /dev/nvme0 -n 0
Error: requesting namespace-id from non-block device
NVMe Status:INVALID_NS(b) NSID:15
                               ^^
# nvme id-ns /dev/nvme0 -n 15
NVMe Status:INVALID_NS(b) NSID:15

Signed-off-by: Xiao Liang <xiliang@redhat.com>
7 years agonvme-cli: make command description const
Minwoo Im [Sat, 28 Oct 2017 18:26:33 +0000 (03:26 +0900)]
nvme-cli: make command description const

Make desc in sanitize_log() const.

Signed-off-by: Minwoo Im <minwoo.im.dev@gmail.com>
7 years agonvme-cli: fix wrong bitmask in number of rpmb units.
Minwoo Im [Sat, 28 Oct 2017 18:01:52 +0000 (03:01 +0900)]
nvme-cli: fix wrong bitmask in number of rpmb units.

Number of RPMB Units is a 3-bit field[02:00].
Bitmask should be 0111b(7h) to get this field.

Signed-off-by: Minwoo Im <minwoo.im.dev@gmail.com>
7 years agonvme-cli: add duplicate_connect parameter support
James Smart [Fri, 20 Oct 2017 23:18:15 +0000 (16:18 -0700)]
nvme-cli: add duplicate_connect parameter support

Add support for the duplicate_connect parameter for the fabrics
device.

Rather than add yet another 6-line code block, created a small helper
routine invoked for each argument option.

Signed-off-by: James Smart <james.smart@broadcom.com>
Signed-off-by: Keith Busch <keith.busch@intel.com>
7 years agoRevert "nvme-cli: add duplicate_connect parameter support"
Keith Busch [Fri, 27 Oct 2017 16:37:55 +0000 (10:37 -0600)]
Revert "nvme-cli: add duplicate_connect parameter support"

This reverts commit 6d0325499981b3418624b6ff9c2d43285c711d3c.

7 years agoIncrease default format timeout
Keith Busch [Fri, 27 Oct 2017 16:35:51 +0000 (10:35 -0600)]
Increase default format timeout

Some formats take a while, and that's okay. Don't make users remember
to increase the timeout size for it.

Signed-off-by: Keith Busch <keith.busch@intel.com>
7 years agoAdd command effects log page
Keith Busch [Fri, 27 Oct 2017 16:09:52 +0000 (10:09 -0600)]
Add command effects log page

This prints out the nvme command effects log page for all commands the
log reports to be supported.

Signed-off-by: Keith Busch <keith.busch@intel.com>
7 years agoMerge pull request #229 from steve-gh/master
Keith Busch [Mon, 23 Oct 2017 20:57:31 +0000 (14:57 -0600)]
Merge pull request #229 from steve-gh/master

Include sizing data in json output that's included in the non-json results

7 years agoCleanup variable definitions
Steve [Mon, 23 Oct 2017 20:55:33 +0000 (16:55 -0400)]
Cleanup variable definitions

7 years agoInclude sizing data in json output that's already included in the non-json results.
Steve [Mon, 23 Oct 2017 20:46:32 +0000 (16:46 -0400)]
Include sizing data in json output that's already included in the non-json results.

7 years agointel-nvme: Fix compiler errors and warnings
Keith Busch [Mon, 23 Oct 2017 19:13:01 +0000 (13:13 -0600)]
intel-nvme: Fix compiler errors and warnings

This initializes the intel log specific structures to offsets from
dynamically allocated structure to avoid gcc casting errors.

Signed-off-by: Keith Busch <keith.busch@intel.com>
7 years agoMerge pull request #228 from primeos/nixos
Keith Busch [Mon, 23 Oct 2017 14:58:09 +0000 (08:58 -0600)]
Merge pull request #228 from primeos/nixos

README: Add Nix(OS) install instructions and fix some minor Markdown mistakes

7 years agonvme-cli: make address print format more human-readable
Minwoo Im [Sat, 21 Oct 2017 04:23:16 +0000 (13:23 +0900)]
nvme-cli: make address print format more human-readable

Memory address would be great in hexadecimal format to be read easily.

Signed-off-by: Minwoo Im <minwoo.im.dev@gmail.com>
Signed-off-by: Keith Busch <keith.busch@intel.com>
7 years agoFix the Markdown code for the Alpine install instructions
Michael Weiss [Sat, 21 Oct 2017 20:23:38 +0000 (22:23 +0200)]
Fix the Markdown code for the Alpine install instructions

And remove some trailing whitespaces.

7 years agoAdd Nix(OS) install instructions to the README
Michael Weiss [Sat, 21 Oct 2017 20:14:14 +0000 (22:14 +0200)]
Add Nix(OS) install instructions to the README

7 years agoRegen documentation
Keith Busch [Fri, 20 Oct 2017 21:12:19 +0000 (15:12 -0600)]
Regen documentation

Signed-off-by: Keith Busch <keith.busch@intel.com>
7 years agoAdd AEN decoder helper to get-log
Keith Busch [Fri, 20 Oct 2017 21:11:18 +0000 (15:11 -0600)]
Add AEN decoder helper to get-log

This is a convenience helper for retreiving logs from an AEN result.

Signed-off-by: Keith Busch <keith.busch@intel.com>
7 years agonvme-cli : wdc-plugin Add support for WDC SN100 and SN200 devices.
jeffreyalien [Tue, 17 Oct 2017 16:56:43 +0000 (11:56 -0500)]
nvme-cli : wdc-plugin Add support for WDC SN100 and SN200 devices.

Update the checking for the wdc-plugin commands so that a
"Device not supported" message will be displayed for non-WDC
devices.

Signed-off-by: jeffreyalien <jeff.lien@wdc.com>
7 years agonvme-cli: add duplicate_connect parameter support
James Smart [Wed, 11 Oct 2017 00:35:36 +0000 (17:35 -0700)]
nvme-cli: add duplicate_connect parameter support

Add support for the duplicate_connect parameter for the fabrics
device.

Rather than add yet another 6-line code block, created a small helper
routine invoked for each argument option.

Signed-off-by: James Smart <james.smart@broadcom.com>
7 years agofabrics: also set queue_size and nr_io_queues on connect-all connects
Johannes Thumshirn [Tue, 17 Oct 2017 08:48:38 +0000 (10:48 +0200)]
fabrics: also set queue_size and nr_io_queues on connect-all connects

Although nvme connect-all -Q does set the queue_size parameter for the initial
discovery connection, it does not set it for the subsequent connections to the
discovered targets.

An
yields the following:

write(3, "nqn=nqn.2014-08.org.nvmexpress.d"..., 180) = 180
 | 00000  6e 71 6e 3d 6e 71 6e 2e  32 30 31 34 2d 30 38 2e  nqn=nqn.2014-08. |
 | 00010  6f 72 67 2e 6e 76 6d 65  78 70 72 65 73 73 2e 64  org.nvmexpress.d |
 | 00020  69 73 63 6f 76 65 72 79  2c 74 72 61 6e 73 70 6f  iscovery,transpo |
 | 00030  72 74 3d 72 64 6d 61 2c  74 72 61 64 64 72 3d 31  rt=rdma,traddr=1 |
 | 00040  2e 31 2e 31 2e 33 2c 74  72 73 76 63 69 64 3d 34  .1.1.3,trsvcid=4 |
 | 00050  34 32 30 2c 68 6f 73 74  6e 71 6e 3d 6e 71 6e 2e  420,hostnqn=nqn. |
 | 00060  32 30 31 34 2d 30 38 2e  6f 72 67 2e 6e 76 6d 65  2014-08.org.nvme |
 | 00070  78 70 72 65 73 73 3a 4e  56 4d 66 3a 75 75 69 64  xpress:NVMf:uuid |
 | 00080  3a 64 34 35 32 39 37 64  34 2d 38 38 62 31 2d 34  :d45297d4-88b1-4 |
 | 00090  34 65 63 2d 61 37 36 33  2d 61 61 30 37 32 39 35  4ec-a763-aa07295 |
 | 000a0  36 34 32 37 33 0a 2c 71  75 65 75 65 5f 73 69 7a  64273.,queue_siz |
 | 000b0  65 3d 36 34                                       e=64             |
write(3, "1", 1)                        = 1
 | 00000  31                                                1                |
write(3, "nqn=nvmf-test,hostnqn=nqn.2014-0"..., 139) = 139
 | 00000  6e 71 6e 3d 6e 76 6d 66  2d 74 65 73 74 2c 68 6f  nqn=nvmf-test,ho |
 | 00010  73 74 6e 71 6e 3d 6e 71  6e 2e 32 30 31 34 2d 30  stnqn=nqn.2014-0 |
 | 00020  38 2e 6f 72 67 2e 6e 76  6d 65 78 70 72 65 73 73  8.org.nvmexpress |
 | 00030  3a 4e 56 4d 66 3a 75 75  69 64 3a 64 34 35 32 39  :NVMf:uuid:d4529 |
 | 00040  37 64 34 2d 38 38 62 31  2d 34 34 65 63 2d 61 37  7d4-88b1-44ec-a7 |
 | 00050  36 33 2d 61 61 30 37 32  39 35 36 34 32 37 33 0a  63-aa0729564273. |
 | 00060  2c 74 72 61 6e 73 70 6f  72 74 3d 72 64 6d 61 2c  ,transport=rdma, |
 | 00070  74 72 61 64 64 72 3d 31  2e 31 2e 31 2e 33 2c 74  traddr=1.1.1.3,t |
 | 00080  72 73 76 63 69 64 3d 34  34 32 30                 rsvcid=4420      |
+++ exited with 0 +++

So set the size parameter requested needed as well and while we're add it also
propagate the nr_io_queues down.

Signed-off-by: Johannes Thumshirn <jthumshirn@suse.de>
Reviewed-by: Sagi Grimberg <sagi@grimber.me>
7 years agoVersion 1.4 Release v1.4
Keith Busch [Fri, 22 Sep 2017 22:11:02 +0000 (18:11 -0400)]
Version 1.4 Release

Some new features from the NVMe 1.3 Specification are starting to be
incorporated with this release with new field decoding and commands,
including sanitize and directives. Lots of other bug fixes, documentation
updates, and output format. Thank you to everyone who contributed. More
updates from the latest specifcation will be incorporated in the next
release.

Shortlog:

Aaron Miller (1):
      fix use-after-free in pci.ids parsing

Baruch Siach (1):
      Makefile: allow linker override for cross uuid test

Chaitanya Kulkarni (7):
      nvme-cli: add error message for nvme list.
      nvme-cli : add support for sanitize command.
      nvme-cli : add sanitize command documentation.
      nvme-cli : add support for retrieving sanitize log.
      nvme-cli : add sanitize-log command documentation.
      nvme-cli : wdc-plug-in : return on invalid input device.
      nvme-cli : only print help text and return for nvme list -h option.

Charlesworth, Thomas J (1):
      nvme-cli: Fix nvme ns desc

Christoph Hellwig (2):
      resync nvme.h with the kernel nvme.h
      fix build without libuuid

Daniel Verkamp (1):
      nvme-cli: generate spec-compliant UUID NQNs

Guan Junxiong (8):
      nvme-cli: add fields into identify controller data structure
      nvme-cli: show more fields for id-ctrl
      nvme-cli: add thermal management fields for smart-log
      nvme-cli: add temperature sensor fields in json_smart_log
      nvme-cli: add output-format discription for smart-log
      nvme-cli/list-ns: fix identifying active or allocated namespaces list
      nvme-cli/list: fix when nvme device can not be open
      nvme-cli: fix connecting failure due to invalid uuid format of hostid

Guilherme G. Piccoli (1):
      nvme-cli: Fix typo in Intel plugin and improve generic help text

Gwendal Grignou (1):
      nvme-cli: Describe action 3 of nvme activate

Jeff Lien (2):
      NVMe-CLI Fix Sanitize Command Parameter Types
      NVMe-CLI Fixed Status Code check for reset type on fw-activate.

Johannes Thumshirn (2):
      fabrics: add hostid option to connect command
      nvme-cli: add ns-descs subcommand

Jon Derrick (2):
      Show help when no or an invalid device is given
      Show help for nvme reset and subsystem-reset

Keith Busch (7):
      nvme-print: Free only top-level json objects
      Formatting update
      Regenerate documentation
      Show help for get-ns-id
      Update docs
      Fix app tag and mask setting
      Fix app tag field sizes

Kwan (Hingkwan) Huen-SSI (2):
      nvme-cli: add nvme directive command support
      nvme-cli: add documentation for directive commands

Mandar Thorat (1):
      Update nvme.c

Mete Balci (3):
      fix for issue 219, show-regs reports AQA.ACQS and AQA.ASQS as bytes
      new bit fields (6, 7, and 8) for OACS from NVMe rev 1.3
      added new bit field (6) to ONCS from NVMe rev 1.3

Michael Davis (1):
      Fixed get_internal_log to parse the entire nlog and allow selection of specific regions to be parsed.

Narasimhan V (1):
      Fix typo of flbas in nvme_create_max_ns_test

Nitzan Carmi (1):
      nvme-cli/fabrics: Add ctrl-loss-tmo param to connect cmd

Rodrigo R. Galvão (1):
      Fix spelling errors

Schremmer, Steven (3):
      nvme-cli: id-ctrl: display additional fields
      nvme-cli: Get Feature support for Extended Host Id
      nvme-cli: Extended Data Structure in resv-report

Scott Bauer (1):
      Implement Intel Vendor specific logs

Xiao Liang (1):
      nvme-cli/list: change fd returned by open operation from unsigned to signed.

Zou (1):
      nvme-cli: add id-ctrl for nvme-huawei plug-in.

jeffreyalien (2):
      nvme-cli : Add Namespace Rescan Command
      nvme-cli : Add man documentation files for ns-rescan command.

mandarcthorat (2):
      Fixing macro definitions to avoid issues when these are used in expressions
      Added handling for temperature threshold values below 0C(273K) and removed buffer check for human readable output as Temperature threshold feature does not use Memory Buffer for Attributes

Signed-off-by: Keith Busch <keith.busch@intel.com>