]> www.infradead.org Git - users/hch/nvme-cli.git/log
users/hch/nvme-cli.git
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>
7 years agonvme-cli : Add man documentation files for ns-rescan command.
jeffreyalien [Fri, 22 Sep 2017 21:52:27 +0000 (16:52 -0500)]
nvme-cli : Add man documentation files for ns-rescan command.

Signed-off-by: jeffreyalien <jeff.lien@wdc.com>
Signed-off-by: Keith Busch <keith.busch@intel.com>
7 years agonvme-cli : Add Namespace Rescan Command
jeffreyalien [Fri, 22 Sep 2017 21:51:45 +0000 (16:51 -0500)]
nvme-cli : Add Namespace Rescan Command

Signed-off-by: jeffreyalien <jeff.lien@wdc.com>
Signed-off-by: Keith Busch <keith.busch@intel.com>
7 years agoMerge pull request #224 from mandarcthorat/master
Keith Busch [Thu, 14 Sep 2017 16:08:24 +0000 (10:08 -0600)]
Merge pull request #224 from mandarcthorat/master

Added handling for temperature threshold values below 0C(273K)

7 years agoUpdate nvme.c
Mandar Thorat [Wed, 13 Sep 2017 20:34:38 +0000 (02:04 +0530)]
Update nvme.c

Reverting the cdw11 bit masking with cdw0 result as per review discussion

7 years agoAdded handling for temperature threshold values below 0C(273K) and removed buffer...
mandarcthorat [Wed, 13 Sep 2017 19:00:51 +0000 (00:30 +0530)]
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

7 years agoNVMe-CLI Fixed Status Code check for reset type on fw-activate.
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>
7 years agonvme-cli: generate spec-compliant UUID NQNs
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>
7 years agonvme-cli: Describe action 3 of nvme activate
Gwendal Grignou [Sun, 27 Aug 2017 01:25:40 +0000 (18:25 -0700)]
nvme-cli: Describe action 3 of nvme activate

Action 3 is not reserved, it is allowed by NVMe 1.3 to upgrade firmware
without reset.

Check it works on a NVMe device.

Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
7 years agoMerge pull request #222 from metebalci/improvement_for_1.3_oncs_fields
Keith Busch [Wed, 23 Aug 2017 18:12:34 +0000 (12:12 -0600)]
Merge pull request #222 from metebalci/improvement_for_1.3_oncs_fields

new bit field (6) to ONCS from NVMe rev 1.3

7 years agoMerge pull request #221 from metebalci/improvement_for_1.3_oacs_fields
Keith Busch [Wed, 23 Aug 2017 18:12:13 +0000 (12:12 -0600)]
Merge pull request #221 from metebalci/improvement_for_1.3_oacs_fields

new bit fields (6, 7, and 8) for OACS from NVMe rev 1.3

7 years agoadded new bit field (6) to ONCS from NVMe rev 1.3
Mete Balci [Wed, 23 Aug 2017 07:21:58 +0000 (09:21 +0200)]
added new bit field (6) to ONCS from NVMe rev 1.3

7 years agonew bit fields (6, 7, and 8) for OACS from NVMe rev 1.3
Mete Balci [Wed, 23 Aug 2017 07:05:11 +0000 (09:05 +0200)]
new bit fields (6, 7, and 8) for OACS from NVMe rev 1.3

7 years agonvme-cli: Fix nvme ns desc
Charlesworth, Thomas J [Tue, 22 Aug 2017 13:26:14 +0000 (09:26 -0400)]
nvme-cli: Fix nvme ns desc

Signed-off-by: Keith Busch <keith.busch@intel.com>
7 years agoMerge pull request #220 from metebalci/fix-reporting-of-AQA-as-bytes
Keith Busch [Tue, 22 Aug 2017 13:00:09 +0000 (07:00 -0600)]
Merge pull request #220 from metebalci/fix-reporting-of-AQA-as-bytes

fix for issue 219, show-regs reports AQA.ACQS and AQA.ASQS as bytes

7 years agofix for issue 219, show-regs reports AQA.ACQS and AQA.ASQS as bytes
Mete Balci [Tue, 22 Aug 2017 08:07:03 +0000 (10:07 +0200)]
fix for issue 219, show-regs reports AQA.ACQS and AQA.ASQS as bytes

7 years agonvme-cli: add documentation for directive commands
Kwan (Hingkwan) Huen-SSI [Fri, 11 Aug 2017 02:54:11 +0000 (19:54 -0700)]
nvme-cli: add documentation for directive commands

Signed-off-by: Kwan (Hingkwan) Huen-SSI <kwan.huen@samsung.com>
Signed-off-by: Keith Busch <keith.busch@intel.com>
7 years agonvme-cli: add nvme directive command support
Kwan (Hingkwan) Huen-SSI [Fri, 11 Aug 2017 02:54:10 +0000 (19:54 -0700)]
nvme-cli: add nvme directive command support

Signed-off-by: Kwan (Hingkwan) Huen-SSI <kwan.huen@samsung.com>
Signed-off-by: Keith Busch <keith.busch@intel.com>
7 years agoMerge pull request #218 from mandarcthorat/master
Keith Busch [Tue, 15 Aug 2017 16:08:38 +0000 (10:08 -0600)]
Merge pull request #218 from mandarcthorat/master

Fixing macro definitions to avoid issues when these are used in expression

7 years agoFixing macro definitions to avoid issues when these are used in expressions
mandarcthorat [Tue, 15 Aug 2017 15:44:11 +0000 (21:14 +0530)]
Fixing macro definitions to avoid issues when these are used in expressions

7 years agonvme-cli/fabrics: Add ctrl-loss-tmo param to connect cmd
Nitzan Carmi [Sun, 13 Aug 2017 15:45:04 +0000 (18:45 +0300)]
nvme-cli/fabrics: Add ctrl-loss-tmo param to connect cmd

Added 'ctrl-loss-tmo' to 'connect' command so users can specify the
controller lost timeout period.

usage examples:
nvme connect --ctrl-loss-tmo=0 --transport=rdma --traddr=10.0.1.1 --nqn=test-nvme
nvme connect -l 0 -t rdma -a 10.0.1.1 -n test_nvme

Signed-off-by: Nitzan Carmi <nitzanc@mellanox.com>
Reviewed-by: Max Gurtovoy <maxg@mellanox.com>
Signed-off-by: Keith Busch <keith.busch@intel.com>
7 years agoMerge pull request #207 from mdavis36/master
Keith Busch [Thu, 10 Aug 2017 18:01:00 +0000 (12:01 -0600)]
Merge pull request #207 from mdavis36/master

Fixed get_internal_log

7 years agoMerge pull request #215 from liangxiao1/master
Keith Busch [Thu, 10 Aug 2017 18:00:26 +0000 (12:00 -0600)]
Merge pull request #215 from liangxiao1/master

nvme-cli/list: change fd returned by open operation from unsigned to signed.

7 years agonvme-cli: fix connecting failure due to invalid uuid format of hostid
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>
7 years agoMerge pull request #216 from baruchsiach/fix-cross-compile-uuid-test
Keith Busch [Thu, 10 Aug 2017 16:56:43 +0000 (10:56 -0600)]
Merge pull request #216 from baruchsiach/fix-cross-compile-uuid-test

Makefile: allow linker override for cross uuid test

7 years agoMakefile: allow linker override for cross uuid test
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.

Signed-off-by: Baruch Siach <baruch@tkos.co.il>
7 years agonvme-cli/list: change fd returned by open operation from unsigned to signed.
Xiao Liang [Tue, 8 Aug 2017 15:55:23 +0000 (23:55 +0800)]
nvme-cli/list: change fd returned by open operation from unsigned to signed.

In case it is a negative value when user has no permisson to open file.

Signed-off-by: Xiao Liang <xiliang@redhat.com>
8 years agonvme-cli/list: fix when nvme device can not be open
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>
8 years agoFix app tag field sizes
Keith Busch [Tue, 1 Aug 2017 01:30:02 +0000 (21:30 -0400)]
Fix app tag field sizes

These are all 16-bit values.

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

Signed-off-by: Keith Busch <keith.busch@intel.com>
8 years agoFix app tag and mask setting
Keith Busch [Tue, 1 Aug 2017 01:24:57 +0000 (21:24 -0400)]
Fix app tag and mask setting

These were being set to each other's value.

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

Signed-off-by: Keith Busch <keith.busch@intel.com>
8 years agoMerge pull request #208 from jeffreyalien/master
Keith Busch [Fri, 21 Jul 2017 22:25:33 +0000 (16:25 -0600)]
Merge pull request #208 from jeffreyalien/master

NVMe-CLI Fix Sanitize Command Parameter Types

8 years agoNVMe-CLI Fix Sanitize Command Parameter Types
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.

8 years agoFixed get_internal_log to parse the entire nlog and allow selection of specific regio...
Michael Davis [Thu, 20 Jul 2017 02:32:21 +0000 (19:32 -0700)]
Fixed get_internal_log to parse the entire nlog and allow selection of specific regions to be parsed.

8 years agonvme-cli/list-ns: fix identifying active or allocated namespaces list
Guan Junxiong [Mon, 10 Jul 2017 07:56:07 +0000 (15:56 +0800)]
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>
8 years agoMerge pull request #189 from ScottyBauer/intel-cd-patch
Keith Busch [Thu, 6 Jul 2017 21:11:05 +0000 (15:11 -0600)]
Merge pull request #189 from ScottyBauer/intel-cd-patch

Implement Intel Vendor specific logs

8 years agonvme-cli : only print help text and return for nvme list -h option.
Chaitanya Kulkarni [Tue, 4 Jul 2017 18:58:46 +0000 (11:58 -0700)]
nvme-cli : only print help text and return for nvme list -h option.

For " nvme list -h " don't print list after help text,
only print help text and return.

Signed-off-by: Chaitanya Kulkarni <chaitanya.kulkarni@hgst.com>
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Signed-off-by: Keith Busch <keith.busch@intel.com>
8 years agonvme-cli : wdc-plug-in : return on invalid input device.
Chaitanya Kulkarni [Tue, 4 Jul 2017 16:56:46 +0000 (09:56 -0700)]
nvme-cli : wdc-plug-in : return on invalid input device.

Signed-off-by: Chaitanya Kulkarni <chaitanya.kulkarni@hgst.com>
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Signed-off-by: Keith Busch <keith.busch@intel.com>
8 years agofix build without libuuid
Christoph Hellwig [Wed, 28 Jun 2017 23:09:12 +0000 (16:09 -0700)]
fix build without libuuid

Signed-off-by: Christoph Hellwig <hch@lst.de>
8 years agonvme-cli : add sanitize-log command documentation.
Chaitanya Kulkarni [Thu, 29 Jun 2017 02:19:28 +0000 (19:19 -0700)]
nvme-cli : add sanitize-log command documentation.

Signed-off-by: Chaitanya Kulkarni <chaitanya.kulkarni@hgst.com>
Signed-off-by: Keith Busch <keith.busch@intel.com>
8 years agonvme-cli : add support for retrieving sanitize log.
Chaitanya Kulkarni [Thu, 29 Jun 2017 02:19:27 +0000 (19:19 -0700)]
nvme-cli : add support for retrieving sanitize log.

This adds support for retrieving and printing NVMe sanitize log
page. For more details please look into NVM Express 1.3
specification.

Signed-off-by: Chaitanya Kulkarni <chaitanya.kulkarni@hgst.com>
Signed-off-by: Keith Busch <keith.busch@intel.com>
8 years agonvme-cli : add sanitize command documentation.
Chaitanya Kulkarni [Thu, 29 Jun 2017 02:19:26 +0000 (19:19 -0700)]
nvme-cli : add sanitize command documentation.

Signed-off-by: Chaitanya Kulkarni <chaitanya.kulkarni@hgst.com>
Signed-off-by: Keith Busch <keith.busch@intel.com>
8 years agonvme-cli : add support for sanitize command.
Chaitanya Kulkarni [Thu, 29 Jun 2017 02:19:25 +0000 (19:19 -0700)]
nvme-cli : add support for sanitize command.

This adds support for NVMe sanitize command execution including
NVMe status codes, command opcode and help text.

For more details please refer to NVM Express 1.3 specification.

Signed-off-by: Chaitanya Kulkarni <chaitanya.kulkarni@hgst.com>
Signed-off-by: Keith Busch <keith.busch@intel.com>
8 years agoresync nvme.h with the kernel nvme.h
Christoph Hellwig [Wed, 28 Jun 2017 18:27:57 +0000 (11:27 -0700)]
resync nvme.h with the kernel nvme.h

Copy over the current nvme.h from the for-4.13 block tree, and adjust
a few callers.  The biggest tweak is that we can't use the kernel uuid.h
and either need to use libuuid or our own definition.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Keith Busch <keith.busch@intel.com>
8 years agoUpdate docs
Keith Busch [Wed, 28 Jun 2017 19:54:19 +0000 (15:54 -0400)]
Update docs

Regenerate for recent changes.

Signed-off-by: Keith Busch <keith.busch@intel.com>
8 years agonvme-cli: Extended Data Structure in resv-report
Schremmer, Steven [Wed, 28 Jun 2017 19:40:02 +0000 (19:40 +0000)]
nvme-cli: Extended Data Structure in resv-report

Allow user to specify cdw11 value to request Extended Data
Structure. Update resv_report show and json functions to decode
the returned data.

Signed-off-by: Steve Schremmer <steve.schremmer@netapp.com>
8 years agoMerge pull request #199 from jderrick/reset.1
Keith Busch [Wed, 28 Jun 2017 19:24:34 +0000 (13:24 -0600)]
Merge pull request #199 from jderrick/reset.1

Show help for nvme reset and subsystem-reset

8 years agoShow help for nvme reset and subsystem-reset
Jon Derrick [Wed, 28 Jun 2017 19:15:07 +0000 (13:15 -0600)]
Show help for nvme reset and subsystem-reset

Remove unused clear_args()

Signed-off-by: Jon Derrick <jonathan.derrick@intel.com>
8 years agoShow help for get-ns-id
Keith Busch [Tue, 27 Jun 2017 20:25:16 +0000 (16:25 -0400)]
Show help for get-ns-id

https://github.com/linux-nvme/nvme-cli/pull/196

Signed-off-by: Keith Busch <keith.busch@intel.com>
8 years agoMerge pull request #197 from narasimhan-v/flbas_typo_fix
Keith Busch [Tue, 27 Jun 2017 13:29:36 +0000 (07:29 -0600)]
Merge pull request #197 from narasimhan-v/flbas_typo_fix

Fix typo of flbas in nvme_create_max_ns_test

8 years agoFix typo of flbas in nvme_create_max_ns_test
Narasimhan V [Tue, 27 Jun 2017 13:06:56 +0000 (18:36 +0530)]
Fix typo of flbas in nvme_create_max_ns_test

Fix typo of flbas in nvme_create_max_ns_test

Signed-off-by: Narasimhan V <sim@linux.vnet.ibm.com>
8 years agoMerge pull request #195 from CKulkarni1111/master
Keith Busch [Mon, 26 Jun 2017 21:34:27 +0000 (15:34 -0600)]
Merge pull request #195 from CKulkarni1111/master

nvme-cli: add error message for nvme list.

8 years agonvme-cli: add error message for nvme list.
Chaitanya Kulkarni [Mon, 26 Jun 2017 20:59:08 +0000 (13:59 -0700)]
nvme-cli: add error message for nvme list.

Print error message for "nvme list" command when NVMe device(s)
is not present.

8 years agoRegenerate documentation
Keith Busch [Mon, 26 Jun 2017 20:00:08 +0000 (16:00 -0400)]
Regenerate documentation

Signed-off-by: Keith Busch <keith.busch@intel.com>
8 years agoFormatting update
Keith Busch [Mon, 26 Jun 2017 19:59:22 +0000 (15:59 -0400)]
Formatting update

Use of appropriate spaces and variable names.

Signed-off-by: Keith Busch <keith.busch@intel.com>
8 years agonvme-cli: add output-format discription for smart-log
Guan Junxiong [Wed, 21 Jun 2017 05:09:24 +0000 (13:09 +0800)]
nvme-cli: add output-format discription for smart-log

The nvme smart-log command has implemented output-format option,
but the documentation of the command doesn't reflect this. This
patch synchronizes the documentation with the implemenation.

Signed-off-by: Guan Junxiong <guanjunxiong@huawei.com>
Signed-off-by: Keith Busch <keith.busch@intel.com>
8 years agonvme-cli: add temperature sensor fields in json_smart_log
Guan Junxiong [Wed, 21 Jun 2017 05:09:23 +0000 (13:09 +0800)]
nvme-cli: add temperature sensor fields in json_smart_log

Signed-off-by: Guan Junxiong <guanjunxiong@huawei.com>
8 years agonvme-cli: add thermal management fields for smart-log
Guan Junxiong [Wed, 21 Jun 2017 05:09:22 +0000 (13:09 +0800)]
nvme-cli: add thermal management fields for smart-log

NVMe 1.3 introduce new thermal management temperature related
fields into the smart log page. Those fileds include
two temperature transition counts and two total time.

Signed-off-by: Guan Junxiong <guanjunxiong@huawei.com>
8 years agoImplement Intel Vendor specific logs
Scott Bauer [Fri, 16 Jun 2017 19:19:04 +0000 (13:19 -0600)]
Implement Intel Vendor specific logs

This adds support for pulling Assert/Event/Nlogs on
All current Intel drives including 900p/P4600/P3700.

Signed-off-by: Scott Bauer <scott.bauer@intel.com>
8 years agoMerge pull request #194 from guilhermepiccoli/master
Keith Busch [Mon, 26 Jun 2017 18:55:32 +0000 (12:55 -0600)]
Merge pull request #194 from guilhermepiccoli/master

nvme-cli: Fix typo in Intel plugin and improve generic help text

8 years agonvme-cli: Fix typo in Intel plugin and improve generic help text
Guilherme G. Piccoli [Mon, 26 Jun 2017 18:25:05 +0000 (15:25 -0300)]
nvme-cli: Fix typo in Intel plugin and improve generic help text

Signed-off-by: Guilherme G. Piccoli <gpiccoli@linux.vnet.ibm.com>
8 years agonvme-cli: Get Feature support for Extended Host Id
Schremmer, Steven [Fri, 23 Jun 2017 16:18:25 +0000 (16:18 +0000)]
nvme-cli: Get Feature support for Extended Host Id

Enable Extended Host Identifier flag is specified in cdw11.
Also added the feature string for kato.

Signed-off-by: Keith Busch <keith.busch@intel.com>
8 years agonvme-cli: add ns-descs subcommand
Johannes Thumshirn [Fri, 23 Jun 2017 07:36:35 +0000 (09:36 +0200)]
nvme-cli: add ns-descs subcommand

NVMe 1.3 defines the "Namespace Identification Descriptor" command in
NVMe Identify NS. This command returns a list of so called Namespace
Identificastion Descriptors which currently can either be a EUI-64,
a NGUID or a UUID.

Signed-off-by: Johannes Thumshirn <jthumshirn@suse.de>
Signed-off-by: Keith Busch <keith.busch@intel.com>
8 years agofabrics: add hostid option to connect command
Johannes Thumshirn [Tue, 20 Jun 2017 12:42:26 +0000 (14:42 +0200)]
fabrics: add hostid option to connect command

Add an option to pass in the hostid either via command line or a new config
file /etc/nvme/hostid.

Signed-off-by: Johannes Thumshirn <jthumshirn@suse.de>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Signed-off-by: Keith Busch <keith.busch@intel.com>
8 years agoMerge pull request #192 from rrosatti/fix-spelling-error
Keith Busch [Tue, 20 Jun 2017 14:09:20 +0000 (08:09 -0600)]
Merge pull request #192 from rrosatti/fix-spelling-error

Fix spelling errors

8 years agoFix spelling errors
Rodrigo R. Galvão [Tue, 20 Jun 2017 13:39:50 +0000 (10:39 -0300)]
Fix spelling errors

Spelling errors were corrected in some documentation files. They were
showing up when trying to run the Lintian tool.

8 years agonvme-cli: add id-ctrl for nvme-huawei plug-in.
Zou [Fri, 16 Jun 2017 07:12:52 +0000 (07:12 +0000)]
nvme-cli: add id-ctrl for nvme-huawei plug-in.

add  Vendor unique command id-ctrl for Huawei devices.
Signed-off-by: Zou Ming <zouming.zouming@huawei.com>
Signed-off-by: Keith Busch <keith.busch@intel.com>
8 years agoMerge pull request #188 from jderrick/show-help
Keith Busch [Thu, 15 Jun 2017 16:22:27 +0000 (10:22 -0600)]
Merge pull request #188 from jderrick/show-help

Show help when no or an invalid device is given

8 years agoShow help when no or an invalid device is given
Jon Derrick [Thu, 15 Jun 2017 16:03:39 +0000 (10:03 -0600)]
Show help when no or an invalid device is given

Signed-off-by: Jon Derrick <jonathan.derrick@intel.com>
8 years agoMerge pull request #186 from apage43/pciids-use-after-free
Keith Busch [Mon, 12 Jun 2017 16:23:14 +0000 (10:23 -0600)]
Merge pull request #186 from apage43/pciids-use-after-free

fix use-after-free in pci.ids parsing

8 years agoMerge branch 'master' of https://github.com/linux-nvme/nvme-cli
Keith Busch [Mon, 12 Jun 2017 14:31:54 +0000 (10:31 -0400)]
Merge branch 'master' of https://github.com/linux-nvme/nvme-cli

8 years agonvme-cli: id-ctrl: display additional fields
Schremmer, Steven [Wed, 7 Jun 2017 21:24:26 +0000 (21:24 +0000)]
nvme-cli: id-ctrl: display additional fields

Additional fields displayed: ctratt, maxcmd, ioccsz, iorcsz, icdoff,
ctrattr, msdbd
Additional human-readable decode for lpa and sgls fields.

Signed-off-by: Keith Busch <keith.busch@intel.com>
8 years agonvme-cli: show more fields for id-ctrl
Guan Junxiong [Fri, 2 Jun 2017 07:18:19 +0000 (15:18 +0800)]
nvme-cli: show more fields for id-ctrl

NVMe 1.3 inctrodues new fields such as EDSTT, DSTO, FWUG, HCTMA, MNTMT,
MXTMT, SANICAP into the idenfity controller data structure. The id-ctrl
command should print them or write them into json format. Note that
although KAS field is included in the previous NVMe 1.2.1 spec, this
patch also supports this field.

Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Signed-off-by: Keith Busch <keith.busch@intel.com>
8 years agonvme-cli: add fields into identify controller data structure
Guan Junxiong [Fri, 2 Jun 2017 07:18:18 +0000 (15:18 +0800)]
nvme-cli: add fields into identify controller data structure

NVMe 1.3 inctrodues new fields such as EDSTT, DSTO, FWUG, HCTMA, MNTMT, MXTMT, SANICAP
into the idenfity controller data structure. So we add them. Note that KAS field is
included in the previous NVMe 1.2.1 spec, but not itemized in the nvme-cli.

Signed-off-by: Keith Busch <keith.busch@intel.com>
8 years agofix use-after-free in pci.ids parsing
Aaron Miller [Tue, 6 Jun 2017 02:02:50 +0000 (19:02 -0700)]
fix use-after-free in pci.ids parsing

If a device that is not in pci.ids has its name looked up after a device
that *was* present in pci.ids, these pointers are still set even though
they've been free'd, and then get passed to snprintf resulting in a
use-after-free.

8 years agonvme-print: Free only top-level json objects
Keith Busch [Thu, 25 May 2017 12:01:13 +0000 (06:01 -0600)]
nvme-print: Free only top-level json objects

We only need to free the root json object as it already frees everything
below it. This patch fixes a double free that results in a segfault.

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

Signed-off-by: Keith Busch <keith.busch@intel.com>
8 years agoRelease v1.3 v1.3
Keith Busch [Thu, 18 May 2017 15:17:45 +0000 (11:17 -0400)]
Release v1.3

Tagging v1.3 for release:

  * Fixes compiler errors and warnings for some architectures
  * Fixes to the security commands
  * Updates and fixes to output formats
  * New vendor plugin from Huawei
  * Minor updates to fabrics and lightnvm
  * Fixes for package generation

Signed-off-by: Keith Busch <keith.busch@intel.com>
8 years agoRegenerate man-pages
Keith Busch [Thu, 18 May 2017 14:22:49 +0000 (10:22 -0400)]
Regenerate man-pages

Signed-off-by: Keith Busch <keith.busch@intel.com>
8 years agofabrics: add option to override drivers queue depth also for connect-all command
Johannes Thumshirn [Thu, 11 May 2017 17:48:37 +0000 (19:48 +0200)]
fabrics: add option to override drivers queue depth also for connect-all command

Currently it is not possible to override the fabrics drivers default
queue depth with the nvme userspace utility's 'connect-all' command,
but only when using the 'connect' command.

Add an option to override the drivers default queue depth for NVMe
over fabrics with the 'connect-all' command as we did previouslt with the
'connect' command.

Signed-off-by: Johannes Thumshirn <jthumshirn@suse.de>
Signed-off-by: Keith Busch <keith.busch@intel.com>
8 years agoMerge pull request #181 from tasleson/dev_string_truncation
Keith Busch [Wed, 17 May 2017 20:29:50 +0000 (14:29 -0600)]
Merge pull request #181 from tasleson/dev_string_truncation

Fix potential device string truncation

8 years agoFix potential device string truncation
Tony Asleson [Wed, 17 May 2017 19:59:01 +0000 (14:59 -0500)]
Fix potential device string truncation

While compiling using gcc 7.1.1 I ran into compile errors, eg.

nvme.c: In function ‘scan_dev_filter.part.5’:
nvme.c:797:35: error: ‘%s’ directive output may be truncated writing " \
   "up to 255 bytes into a region of size 251 [-Werror=format-truncation=]
   snprintf(path, sizeof(path), "%s%s", dev, d->d_name);

This is caused because the buffer on the stack is only 256 bytes and the
dirent.d_name is 256 and the constant string is "/dev/", so  256 + 5,
but I've rounded up to nearest 4/8 byte alignment of 264.

Signed-off-by: Tony Asleson <tasleson@redhat.com>
8 years agoMerge pull request #179 from ScottyBauer/noiob
Keith Busch [Mon, 15 May 2017 16:56:52 +0000 (10:56 -0600)]
Merge pull request #179 from ScottyBauer/noiob

nvme-cli: Add parsing support for noiob

8 years agonvme-cli: Add parsing support for noiob
Scott Bauer [Mon, 15 May 2017 16:40:47 +0000 (10:40 -0600)]
nvme-cli: Add parsing support for noiob

Signed-off-by: Scott Bauer <scott.bauer@intel.com>
8 years agoMerge pull request #178 from ScottyBauer/jsonify-nvme-intel
Keith Busch [Fri, 12 May 2017 22:15:24 +0000 (16:15 -0600)]
Merge pull request #178 from ScottyBauer/jsonify-nvme-intel

nvme-cli: nvme-intel implement json output for smart-log

8 years agonvme-cli: nvme-intel implement json output for smart-log
Scott Bauer [Fri, 12 May 2017 21:54:24 +0000 (15:54 -0600)]
nvme-cli: nvme-intel implement json output for smart-log

./nvme intel smart-log-add --json /dev/nvme0n1

Signed-off-by: Scott Bauer <scott.bauer@intel.com>
8 years agofabrics: add option to override drivers queue depth
Johannes Thumshirn [Wed, 10 May 2017 09:04:12 +0000 (11:04 +0200)]
fabrics: add option to override drivers queue depth

Currently it is not possible to override the fabrics drivers default queue
depth with the nvme userspace utility, but only when manually writing the
parameters to the /dev/nvme-fabrics character device.

Add an option to override the drivers default queue depth for NVMe over
fabrics.

Signed-off-by: Johannes Thumshirn <jthumshirn@suse.de>
Signed-off-by: Keith Busch <keith.busch@intel.com>
8 years agonvme-list: print empty lists when no devices are present
Keith Busch [Mon, 8 May 2017 20:48:12 +0000 (16:48 -0400)]
nvme-list: print empty lists when no devices are present

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

Signed-off-by: Keith Busch <keith.busch@intel.com>
8 years agoid-ctrl: remove new lines from json output
Keith Busch [Fri, 5 May 2017 20:07:16 +0000 (14:07 -0600)]
id-ctrl: remove new lines from json output

This patch removes the ending newlines from json strings, and skips
printing the optional subsysnqn if the controller does not implement it.

Reported-by: Krishna Dhulipala <krishnad@fb.com>
Signed-off-by: Keith Busch <keith.busch@intel.com>
8 years agonvme-print: Fix line spacing on -H option
Stephen Bates [Mon, 1 May 2017 21:22:45 +0000 (15:22 -0600)]
nvme-print: Fix line spacing on -H option

Add newlines to make the ASQ and ACQ human readable output consistent
with other fields.

Signed-off-by: Stephen Bates <sbates@raithlin.com>
Signed-off-by: Keith Busch <keith.busch@intel.com>
8 years agonvme-cli: Huawei plug-in.
Zou Ming [Thu, 27 Apr 2017 08:05:01 +0000 (08:05 +0000)]
nvme-cli: Huawei plug-in.

This patch adds support for Vendor unique commands for Huawei devices.
Following commands are supported in current version of this extension:

1.list  List addition info (such as namespace name and array name) for Huawei devices

8 years agonvme-cli: Fix build on aarch64-linux-android-4.9
Rakesh Pandit [Mon, 24 Apr 2017 07:44:17 +0000 (10:44 +0300)]
nvme-cli: Fix build on aarch64-linux-android-4.9

Need to include sys/stat.h to fix:
fabrics.c:414:45: error: 'S_IRUSR' undeclared (first use in this function)
fabrics.c:414:53: error: 'S_IWUSR' undeclared (first use in this function)

Also fix warning:
common.h:4:0:
warning: "offsetof" redefined #define offsetof(x, y)
__builtin_offsetof(x, y) ^

Fix this trivial warning by including stddef.h and removing this
definition.

Signed-off-by: Rakesh Pandit <rakesh@tuxera.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Keith Busch <keith.busch@intel.com>
8 years agoFix compile for 32-bit
Keith Busch [Fri, 21 Apr 2017 15:27:10 +0000 (11:27 -0400)]
Fix compile for 32-bit

Incomplete pointer cast to 64-bit failed to compile. Fixing.

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

Signed-off-by: Keith Busch <keith.busch@intel.com>
8 years agonvme-cli: return 0 if disconnect operation with cfg.nqn successfully
Yi Zhang [Tue, 18 Apr 2017 09:20:24 +0000 (17:20 +0800)]
nvme-cli: return 0 if disconnect operation with cfg.nqn successfully

disconnect_by_nqn function will return the number of controllers
successfully disconnected, so change ret = 0 if disconnect operation
with nqn successfully.

$ ./nvme disconnect -n testnqn
NQN:testnqn disconnected 1 controller(s)
$ echo $?
1

Signed-off-by: Yi Zhang <yizhan@redhat.com>
Signed-off-by: Keith Busch <keith.busch@intel.com>
8 years agoMerge pull request #170 from javigon/master
Keith Busch [Tue, 11 Apr 2017 14:14:45 +0000 (08:14 -0600)]
Merge pull request #170 from javigon/master

lightnvm: allow to init target on factory mode

8 years agoMerge pull request #169 from ScottyBauer/fixup-secsend2
Keith Busch [Thu, 6 Apr 2017 16:25:57 +0000 (10:25 -0600)]
Merge pull request #169 from ScottyBauer/fixup-secsend2

Fixed problem with security-recv binary output not working correctly

8 years agoFixed problem with security-recv binary output not working correctly
Thomas Bowen [Tue, 14 Mar 2017 19:58:14 +0000 (12:58 -0700)]
Fixed problem with security-recv binary output not working correctly

Security Receive sent the wrong pointer, specifically a pointer to a
stack location. When using the Dump raw command we would dump stack
contents, not the buffer received from the controller.

Signed-off-by: Thomas Bowen <thomas.r.bowen@intel.com>
Signed-off-by: Scott Bauer <Scott.Bauer@intel.com>
8 years agolightnvm: allow to init target on factory mode
Javier González [Wed, 5 Apr 2017 10:10:27 +0000 (12:10 +0200)]
lightnvm: allow to init target on factory mode

Allow to drop the target recovery mechanism when creating a target in
order to start in factory mode. This facilitates development and makes
it possible to evaluate an OCSSD in different states.

Signed-off-by: Javier González <javier@cnexlabs.com>
8 years agoMerge pull request #167 from lsgunth/master
Keith Busch [Tue, 28 Mar 2017 20:00:51 +0000 (14:00 -0600)]
Merge pull request #167 from lsgunth/master

fabrics: Fix disconnect_by_device from disconnecting instance 0 on error

8 years agofabrics: Fix disconnect_by_device from disconnecting instance 0 on error
Logan Gunthorpe [Tue, 28 Mar 2017 19:26:41 +0000 (13:26 -0600)]
fabrics: Fix disconnect_by_device from disconnecting instance 0 on error

I was a bit surprised that running:

nvme disconnect -d /dev/nvme1

actually disconnected nvme0 and I could never disconnect nvme1. Turns
out the code was not expecting a full path and silently used instance
zero if it failed to parse any arguments.

This patch fixes it so that it ignores any path component and fails if
sscanf doesn't match any items.

8 years agoMerge pull request #166 from jasperla/rpm
Keith Busch [Fri, 17 Mar 2017 14:16:03 +0000 (08:16 -0600)]
Merge pull request #166 from jasperla/rpm

Unbreak RPM build after bash completion files were moved in 7e4c7596

8 years agoUnbreak RPM build after bash completion files were moved in 7e4c7596
Jasper Lievisse Adriaanse [Fri, 17 Mar 2017 09:25:48 +0000 (10:25 +0100)]
Unbreak RPM build after bash completion files were moved in 7e4c7596