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>
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>
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>
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>
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>
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>
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>
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>
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>
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
Changes to be committed:
modified: nvme-print.c
modified: nvme.c
Jeff Lien [Tue, 12 Sep 2017 17:37:05 +0000 (12:37 -0500)]
NVMe-CLI Fixed Status Code check for reset type on fw-activate.
If a device returns a fw-activate status with the More or DNR bit
set, the CLI code will return a message indicating an Admin command
error instead of succesful status. With this patch, the More and
DNR bits will be masked off and not affect the returned message.
Signed-off-by: Keith Busch <keith.busch@intel.com>
Daniel Verkamp [Wed, 30 Aug 2017 22:25:16 +0000 (15:25 -0700)]
nvme-cli: generate spec-compliant UUID NQNs
The gen-hostnqn command previously generated UUID NQNs in a format that
does not match the NVMe specification.
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Keith Busch <keith.busch@intel.com>
Guan Junxiong [Thu, 3 Aug 2017 13:38:16 +0000 (21:38 +0800)]
nvme-cli: fix connecting failure due to invalid uuid format of hostid
When we connect or discover a target with --hostid option via the
/etc/nvme/hostid file, we fails this operation because the hostid
is only 35 not 36 bytes which doesn't pass the uuid checking in the
kernel.The last character is overridden with null bytes because fgets
reads at most one less than sizeof of buffer characters.
Signed-off-by: Guan Junxiong <guanjunxiong@huawei.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Keith Busch <keith.busch@intel.com>
Baruch Siach [Wed, 9 Aug 2017 06:43:12 +0000 (09:43 +0300)]
Makefile: allow linker override for cross uuid test
The test to determine whether libuuid is installed uses the host 'ld' utility.
This breaks when cross compiling, since target libraries are often different
than host libraries.
Use $(LD) instead. This allows to easily use the cross compiler linker.
Guan Junxiong [Wed, 2 Aug 2017 07:51:09 +0000 (15:51 +0800)]
nvme-cli/list: fix when nvme device can not be open
This patch checks the validity of fd returned by open operation on
the nvme divices. For example, when a user who doesn't have the
permission to open the device trys to use nvme list command to list
nvme devices, the fd is returned as -1 and errno indicates permission
denied.
In addition,this patch closes the current open device before
processing the next device.
Signed-off-by: Guan Junxiong <guanjunxiong@huawei.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Keith Busch <keith.busch@intel.com>
Jeff Lien [Fri, 21 Jul 2017 20:43:56 +0000 (15:43 -0500)]
NVMe-CLI Fix Sanitize Command Parameter Types
The current parameter types will cause the sanitize action value to
be set to 0 and "Invalid Sanitize Action" errors. Setting them to
the correct types resolves the issues.
nvme-cli/list-ns: fix identifying active or allocated namespaces list
The logic of the CNS field of identify namespace list is wrong.
For example, nvme list-ns /dev/nvme0 -n 0 should return active
namespaces list starting with id 1 (including), but currently this
script command returns INVALID_OPCODE if the target doesn't support
listing allocated namespaces or all the allocated attached namespaces
id. So fix it by swaping the CNS flags of active and allocated list.
Signed-off-by: Guan Junxiong <guanjunxiong@huawei.com> Reviewed-by: Sagi Grimberg <sagi at grimberg.me> Signed-off-by: Keith Busch <keith.busch@intel.com>