]> www.infradead.org Git - users/hch/nvme-cli.git/log
users/hch/nvme-cli.git
4 years agoCapitalize LBA in descriptions within the ZNS plugin
Matias Bjørling [Mon, 22 Jun 2020 13:13:14 +0000 (13:13 +0000)]
Capitalize LBA in descriptions within the ZNS plugin

Signed-off-by: Matias Bjørling <matias.bjorling@wdc.com>
4 years ago[NVMe-CLI] WDC Plugin update documentation for vs-smart-add-log command
Jeff Lien [Mon, 22 Jun 2020 14:45:48 +0000 (09:45 -0500)]
[NVMe-CLI] WDC Plugin update documentation for vs-smart-add-log command

4 years ago[NVME CLI] WDC Plugin Command Updates
Jeff Lien [Mon, 22 Jun 2020 14:39:48 +0000 (09:39 -0500)]
[NVME CLI] WDC Plugin Command Updates
Add support for using uuid index when retrieving the 0xC2 Log Page
Add support for parsing the 0xC0 log page

4 years agoVarious cleanups in the ZNS plugin
Matias Bjørling [Mon, 22 Jun 2020 12:25:10 +0000 (12:25 +0000)]
Various cleanups in the ZNS plugin

Changed verbose option to be the human readable option, such that it
aligns with the behavior of NVM id-ns and NVM id-ctrl.

Fix typos.

Signed-off-by: Matias Bjørling <matias.bjorling@wdc.com>
4 years agoAdd really pretty print for ZNS Command Set specific Identify Namespace data structure
Matias Bjørling [Fri, 19 Jun 2020 15:24:59 +0000 (15:24 +0000)]
Add really pretty print for ZNS Command Set specific Identify Namespace data structure

Updated the printing of the zone list to be a lot prettier.

Also added extension support.

Signed-off-by: Matias Bjørling <matias.bjorling@wdc.com>
Signed-off-by: Aravind Ramesh <aravind.ramesh@wdc.com>
4 years agoAllow 0 value of ctrl_loss_tmo.
Aleksei Marov [Fri, 19 Jun 2020 15:10:07 +0000 (18:10 +0300)]
Allow 0 value of ctrl_loss_tmo.

4 years agoAdd warning if not all zone changed list entries are retrieved.
Hans Holmberg [Fri, 19 Jun 2020 13:52:32 +0000 (13:52 +0000)]
Add warning if not all zone changed list entries are retrieved.

The Changed Zone List only support reporting of a maximum of 511 entries.

Signed-off-by: Hans Holmberg <hans.holmberg@wdc.com>
Signed-off-by: Matias Bjørling <matias.bjorling@wdc.com>
4 years agoAdded new namespace list command on list-ns, 4056 modification added
Steven Seungcheol Lee [Fri, 19 Jun 2020 02:12:27 +0000 (11:12 +0900)]
Added new namespace list command on list-ns, 4056 modification added

feature added for I/O Command Set Profile
create ns need to use command set identifier
nvscc renamed as icsvscc

Spec : NVMe - TP 4056 Namespace Types 2020.06.15 - Ratified

Signed-off-by: Steven Seungcheol Lee <sc108.lee@samsung.com>
Co-authored-by: Klaus Jensen <k.jensen@samsung.com>
4 years agoIdentify I/O Command Set data structure command added
Steven Seungcheol Lee [Fri, 19 Jun 2020 01:54:56 +0000 (10:54 +0900)]
Identify I/O Command Set data structure command added

Spec : NVMe - TP 4056 Namespace Types 2020.06.15 - Ratified

Signed-off-by: Steven Seungcheol Lee <sc108.lee@samsung.com>
Co-authored-by: Klaus Jensen <k.jensen@samsung.com>
4 years agoPrevent compiler from optimizing mmio_read64 to single 64b read
Adam Judge [Tue, 9 Jun 2020 19:58:49 +0000 (15:58 -0400)]
Prevent compiler from optimizing mmio_read64 to single 64b read

4 years agoAdd support for DUI data header version 4.
Jian Ding [Wed, 20 May 2020 14:14:23 +0000 (07:14 -0700)]
Add support for DUI data header version 4.

4 years agoDRV-1050 Update SN730 to support DUI data header version 4
Jeff Lien [Thu, 11 Jun 2020 20:35:14 +0000 (15:35 -0500)]
DRV-1050 Update SN730 to support DUI data header version 4
  Added version 4 structs and version checking logic

4 years agoioctl: fix missing addrof
Klaus Jensen [Wed, 17 Jun 2020 22:03:40 +0000 (00:03 +0200)]
ioctl: fix missing addrof

Submit the address, not the value in the zone append ioctl.

Signed-off-by: Klaus Jensen <k.jensen@samsung.com>
4 years agofix manpage name
Keith Busch [Wed, 17 Jun 2020 17:13:43 +0000 (02:13 +0900)]
fix manpage name

Signed-off-by: Keith Busch <keith.busch@wdc.com>
4 years agoadd missing manpage to repo
Keith Busch [Wed, 17 Jun 2020 16:58:38 +0000 (09:58 -0700)]
add missing manpage to repo

Signed-off-by: Keith Busch <kbusch@kernel.org>
4 years agoreport all zones if no user override
Keith Busch [Tue, 16 Jun 2020 20:57:46 +0000 (13:57 -0700)]
report all zones if no user override

default to report all zones if the user didn't request a specific number
of descriptors.

Signed-off-by: Keith Busch <kbusch@kernel.org>
4 years agozns id-ns json output
Keith Busch [Tue, 16 Jun 2020 20:40:29 +0000 (13:40 -0700)]
zns id-ns json output

Signed-off-by: Keith Busch <kbusch@kernel.org>
4 years agofix print for zns id ns
Keith Busch [Tue, 16 Jun 2020 20:26:47 +0000 (13:26 -0700)]
fix print for zns id ns

newlines

Signed-off-by: Keith Busch <kbusch@kernel.org>
4 years agofix zns csn identify values
Keith Busch [Tue, 16 Jun 2020 20:24:45 +0000 (13:24 -0700)]
fix zns csn identify values

Signed-off-by: Keith Busch <kbusch@kernel.org>
4 years agoadd zns documentation
Keith Busch [Tue, 16 Jun 2020 15:06:09 +0000 (08:06 -0700)]
add zns documentation

Signed-off-by: Keith Busch <kbusch@kernel.org>
4 years agosupport for zoned command set
Keith Busch [Mon, 8 Jun 2020 23:13:50 +0000 (16:13 -0700)]
support for zoned command set

Signed-off-by: Keith Busch <kbusch@kernel.org>
4 years agorelease v1.12 v1.12
Keith Busch [Tue, 16 Jun 2020 15:10:33 +0000 (08:10 -0700)]
release v1.12

We're about to introduce major updates from new TPs, so now seems a good time
to tag a new release. Shortlog below.

Adam Judge (1):
      Fix PMRMSC.CMSE bitmask

Brandon Paupore (2):
      Updated/Added device IDs for SN440, ZN440, and SN640
      Corrected text output in FW activation history

Chaitanya Kulkarni (2):
      nvme: fix compiler warnings
      nvme: allow addr family to recognize loop

James Yang (1):
      Adding ScaleFlux subcommands

Jian Ding (1):
      fix apsrintf return check

KLZ-0 (3):
      controller list argument is required in attach-ns/detach-ns commands Empty controller-id list in the ioctl call for attach/detach of namespace results effectively in no operation, yet the nvme cli reports falsely success. The controller id list must be specified with at least 1 controller in the list.
      Emit a warning message when no controller-id is specified
      Improve error message

Keith Busch (5):
      Tag release with broken build fixes
      fixes for 32-bits
      fix uninitialized value warning
      fix id-ctrl power printa
      release v1.12

Martin George (1):
      fabrics: write reconnect_delay to fabrics device on connect

Martin Wilck (6):
      connect-all: add -m/--matching option
      nvmf-connect@.service: use nvme connect-all --matching
      doc: nvme-connect-all: document -m / --matching
      doc: nvme-connect-all: document -p / --persistent
      doc: nvme-connect-all: document -q / --quiet
      doc: nvme-connect-all: regenerate HTML and man pages

Randy (1):
      Add log page CA parsing

Randy Bates (4):
      Bug fixes
      Fix segmentation if invalid customer id
      Update systemd required version.
      Add customer id 0x101

Steven Seungcheol Lee (2):
      nvme.c: remove side effects from older commit
      format: skipping re-read partition for same lbaf or All NS

Tokunori Ikegami (1):
      MAINT: nvme-cli: Add LF code into error messages

Tomasz Kulasek (1):
      remove block device checking for namespace

Wu Bo (2):
      nvme-cli:lightnvm:fix fd leak when do ioctl failed
      nvme-cli:nvme:fix fd leak when an error occurs

Yi Zhang (1):
      nvme-print: nvme list -o json fix

Zhouhua Liu (1):
      nvme-cli: Add huawei vendor id as filter in command "nvme huawei list"

丁剑 (2):
      [memblaze] add select-download command
      [SMART] add more smart info

Signed-off-by: Keith Busch <kbusch@kernel.org>
4 years agoCorrected text output in FW activation history
Brandon Paupore [Wed, 10 Jun 2020 20:32:45 +0000 (15:32 -0500)]
Corrected text output in FW activation history

4 years agonvme: allow addr family to recognize loop
Chaitanya Kulkarni [Tue, 21 Apr 2020 21:12:54 +0000 (14:12 -0700)]
nvme: allow addr family to recognize loop

This adds ability to decode discovery log page address family
when NVMeOF configured as loop.

Signed-off-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Signed-off-by: Keith Busch <keith.busch@wdc.com>
4 years agoUpdated/Added device IDs for SN440, ZN440, and SN640
Brandon Paupore [Thu, 11 Jun 2020 16:12:15 +0000 (11:12 -0500)]
Updated/Added device IDs for SN440, ZN440, and SN640

4 years agofix id-ctrl power printa
Keith Busch [Wed, 10 Jun 2020 20:19:23 +0000 (05:19 +0900)]
fix id-ctrl power printa

Link: https://github.com/linux-nvme/nvme-cli/issues/735
Signed-off-by: Keith Busch <keith.busch@wdc.com>
4 years agoFix PMRMSC.CMSE bitmask
Adam Judge [Tue, 9 Jun 2020 19:35:27 +0000 (15:35 -0400)]
Fix PMRMSC.CMSE bitmask

4 years agofix uninitialized value warning
Keith Busch [Thu, 28 May 2020 20:44:58 +0000 (13:44 -0700)]
fix uninitialized value warning

Link: https://github.com/linux-nvme/nvme-cli/issues/728
Signed-off-by: Keith Busch <kbusch@kernel.org>
4 years agoAdding ScaleFlux subcommands
James Yang [Tue, 26 May 2020 23:45:36 +0000 (16:45 -0700)]
Adding ScaleFlux subcommands

Signed-off-by: James Yang <james.yang@scaleflux.com>
4 years agoAdd customer id 0x101
Randy Bates [Wed, 27 May 2020 22:50:18 +0000 (17:50 -0500)]
Add customer id 0x101

Signed-off-by: Randy Bates <randall.bates@wdc.com>
4 years agonvme-cli: Add huawei vendor id as filter in command "nvme huawei list"
Zhouhua Liu [Fri, 22 May 2020 03:40:40 +0000 (11:40 +0800)]
nvme-cli: Add huawei vendor id as filter in command "nvme huawei list"

Add huawei vendor id as filter in command "nvme huawei list".

Signed-off-by: Zhouhua Liu <liuzhouhua@huawei.com>
4 years agoUpdate systemd required version.
Randy Bates [Tue, 26 May 2020 18:14:02 +0000 (13:14 -0500)]
Update systemd required version.

A change to fabrics.c - commit 48c10dbf requires systemd version 242 or later.

Signed-off-by: Randy Bates <randall.bates@wdc.com>
4 years agoFix segmentation if invalid customer id
Randy Bates [Fri, 22 May 2020 18:21:53 +0000 (13:21 -0500)]
Fix segmentation if invalid customer id

Attempting to free  unallocated memory

4 years agoBug fixes
Randy Bates [Thu, 21 May 2020 17:24:24 +0000 (12:24 -0500)]
Bug fixes

Signed-off-by: Randy Bates <rbates@web-site.com>
4 years agofixes for 32-bits
Keith Busch [Thu, 21 May 2020 15:18:36 +0000 (08:18 -0700)]
fixes for 32-bits

Signed-off-by: Keith Busch <kbusch@kernel.org>
4 years ago[SMART] add more smart info
丁剑 [Tue, 10 Mar 2020 07:16:32 +0000 (15:16 +0800)]
[SMART] add more smart info

1. memblaze vu command, smart-log-add;
2. add five SMART logs:
    program_fail_count
    erase_fail_count
    wear_leveling
    nand_bytes_written
    host_bytes_written
3. only add for special device, checked the firmware version "2.13";

Signed-off-by: 丁剑 <jian.ding@memblaze.com>
4 years agofix apsrintf return check
Jian Ding [Wed, 20 May 2020 14:14:23 +0000 (07:14 -0700)]
fix apsrintf return check

Signed-off-by: 丁剑 <jian.ding@memblaze.com>
Signed-off-by: Keith Busch <kbusch@kernel.org>
4 years agoAdd log page CA parsing
Randy [Mon, 18 May 2020 15:31:57 +0000 (10:31 -0500)]
Add log page CA parsing

Add parsing version for 0xCA

Changes from review.

Change customer ids

4 years agoMAINT: nvme-cli: Add LF code into error messages
Tokunori Ikegami [Tue, 19 May 2020 15:01:05 +0000 (00:01 +0900)]
MAINT: nvme-cli: Add LF code into error messages

Some error mesages are output without LF code so add it.

Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com>
4 years agoformat: skipping re-read partition for same lbaf or All NS
Steven Seungcheol Lee [Fri, 15 May 2020 09:54:53 +0000 (18:54 +0900)]
format: skipping re-read partition for same lbaf or All NS

Signed-off-by: Steven Seungcheol Lee <sc108.lee@samsung.com>
4 years agonvme.c: remove side effects from older commit
Steven Seungcheol Lee [Fri, 15 May 2020 07:13:02 +0000 (16:13 +0900)]
nvme.c: remove side effects from older commit

If there is given nsid by user, no need to set using nvme_get_nsid.
(e770466615096a6d41f038a28819b00bc3078e1d)

Format for All namespace not using prev_lbaf.
(62ae3bea42cb3a81cc77492568747a330f783100)

Signed-off-by: Steven Seungcheol Lee <sc108.lee@samsung.com>
4 years agofabrics: write reconnect_delay to fabrics device on connect
Martin George [Mon, 11 May 2020 14:37:15 +0000 (20:07 +0530)]
fabrics: write reconnect_delay to fabrics device on connect

Though '--reconnect-delay' option is defined for connect, it
wasn't passed down to the kernel in connect_ctrl().

Signed-off-by: Martin George <marting@netapp.com>
Signed-off-by: Keith Busch <keith.busch@wdc.com>
4 years ago[memblaze] add select-download command
丁剑 [Tue, 12 May 2020 03:49:09 +0000 (11:49 +0800)]
[memblaze] add select-download command

1. This performs a selective firmware download;
2. Please power cycle for changes to take effect, after the update successful.

Signed-off-by: 丁剑 <jian.ding@memblaze.com>
4 years ago Improve error message
KLZ-0 [Fri, 1 May 2020 22:09:23 +0000 (00:09 +0200)]
 Improve error message

4 years agoEmit a warning message when no controller-id is specified
KLZ-0 [Fri, 1 May 2020 21:49:33 +0000 (23:49 +0200)]
Emit a warning message when no controller-id is specified

4 years agocontroller list argument is required in attach-ns/detach-ns commands
KLZ-0 [Fri, 1 May 2020 19:22:40 +0000 (21:22 +0200)]
controller list argument is required in attach-ns/detach-ns commands
Empty controller-id list in the ioctl call for attach/detach of namespace results effectively in no operation, yet the nvme cli reports falsely success. The controller id list must be specified with at least 1 controller in the list.

4 years agonvme-cli:nvme:fix fd leak when an error occurs
Wu Bo [Wed, 6 May 2020 03:26:54 +0000 (11:26 +0800)]
nvme-cli:nvme:fix fd leak when an error occurs

4 years agoremove block device checking for namespace
Tomasz Kulasek [Fri, 20 Sep 2019 08:29:03 +0000 (10:29 +0200)]
remove block device checking for namespace

In SPDK project (see spdk.io) we have implemented the ability
to set up devices via CUSE device exposing controller and
namespaces as character devices.

Namespace devices are also exposed as character devices, so
nvme-cli tools will not recognize them as valid devices.

To allow to use nvme-cli tool with SPDK NVMe CUSE devices
we can't assume that namespaces are block devices.

Change-Id: I52aa79d24002b8dec10e6fdd0cb9a71bb6750358
Signed-off-by: Tomasz Kulasek <tomaszx.kulasek@intel.com>
4 years agonvme-print: nvme list -o json fix
Yi Zhang [Fri, 1 May 2020 07:42:10 +0000 (15:42 +0800)]
nvme-print: nvme list -o json fix

Bellow error log will be triggered on non pcie transport, so only print the
ProductName for pcie transport, also add print "\n" and json_free_object fix

Failed to open /sys/class/nvme/nvme1/device/subsystem_vendor with errno No such file or directory
Failed to open /sys/class/nvme/nvme1/device/subsystem_device with errno No such file or directory
Failed to open /sys/class/nvme/nvme1/device/vendor with errno No such file or directory
Failed to open /sys/class/nvme/nvme1/device/device with errno No such file or directory
Failed to open /sys/class/nvme/nvme1/device/class with errno No such file or directory
{
  "Devices" : [
    {
      "NameSpace" : 1,
      "DevicePath" : "/dev/nvme1n1",
      "Firmware" : "4.18.0-1",
      "Index" : 1,
      "ModelNumber" : "Linux",
      "ProductName" : "NULL",
      "SerialNumber" : "eb4695bf0da275a3",
      "UsedBytes" : 268435456000,
      "MaximumLBA" : 524288000,
      "PhysicalSize" : 268435456000,
      "SectorSize" : 512
    }
  ]
}

Reported-by: Justin Tee <justin.tee@broadcom.com>
Signed-off-by: Yi Zhang <yi.zhang@redhat.com>
Signed-off-by: Keith Busch <kbusch@kernel.org>
4 years agodoc: nvme-connect-all: regenerate HTML and man pages
Martin Wilck [Wed, 29 Apr 2020 20:33:14 +0000 (22:33 +0200)]
doc: nvme-connect-all: regenerate HTML and man pages

4 years agodoc: nvme-connect-all: document -q / --quiet
Martin Wilck [Wed, 29 Apr 2020 20:30:14 +0000 (22:30 +0200)]
doc: nvme-connect-all: document -q / --quiet

4 years agodoc: nvme-connect-all: document -p / --persistent
Martin Wilck [Wed, 29 Apr 2020 20:26:39 +0000 (22:26 +0200)]
doc: nvme-connect-all: document -p / --persistent

4 years agodoc: nvme-connect-all: document -m / --matching
Martin Wilck [Wed, 29 Apr 2020 20:21:11 +0000 (22:21 +0200)]
doc: nvme-connect-all: document -m / --matching

4 years agonvmf-connect@.service: use nvme connect-all --matching
Martin Wilck [Wed, 29 Apr 2020 17:09:58 +0000 (19:09 +0200)]
nvmf-connect@.service: use nvme connect-all --matching

Use the --matching option from the autoconnect service to avoid
attempting connections multiple times.

4 years agoconnect-all: add -m/--matching option
Martin Wilck [Wed, 29 Apr 2020 17:03:57 +0000 (19:03 +0200)]
connect-all: add -m/--matching option

Discovery controllers often return discovery records that belong
to a different traddr than the discovery controller itself, like here:

nvme discover -t fc \
   --host-traddr=nn-0x20000090fae06325:pn-0x10000090fae06325 \
   --traddr=nn-0x200900a09890f5bf:pn-0x200a00a09890f5bf

Discovery Log Number of Records 2, Generation counter 25
=====Discovery Log Entry 0======
trtype:  fc
adrfam:  fibre-channel
subtype: nvme subsystem
treq:    not specified
portid:  0
trsvcid: none
subnqn:  nqn...
traddr:  nn-0x200900a09890f5bf:pn-0x200b00a09890f5bf
=====Discovery Log Entry 1======
trtype:  fc
adrfam:  fibre-channel
subtype: nvme subsystem
treq:    not specified
portid:  1
trsvcid: none
subnqn:  nqn...
traddr:  nn-0x200900a09890f5bf:pn-0x200a00a09890f5bf

Note that the traddr of record 0 matches the traddr used for the
discovery, while that of record 1 does not.

For NVMeoF-autoconnect, this means that connection attempts will
be made multiple times (the two records above will also be returned
for a discovery on nn-0x200900a09890f5bf:pn-0x200b00a09890f5bf),
which is unnecessary and leads to lots of confusing error messages
in the system log.

Add an option "-m / --matching" to the "nvme connect-all" command
that causes nvme to connect only those discovery entries that match
the traddr given on the command line.

4 years agonvme-cli:lightnvm:fix fd leak when do ioctl failed
Wu Bo [Mon, 27 Apr 2020 13:12:25 +0000 (21:12 +0800)]
nvme-cli:lightnvm:fix fd leak when do ioctl failed

5 years agoTag release with broken build fixes v1.11.1
Keith Busch [Fri, 24 Apr 2020 14:43:14 +0000 (23:43 +0900)]
Tag release with broken build fixes

Signed-off-by: Keith Busch <kbusch@kernel.org>
5 years agonvme: fix compiler warnings
Chaitanya Kulkarni [Fri, 24 Apr 2020 01:14:53 +0000 (18:14 -0700)]
nvme: fix compiler warnings

This patch fixes the following errors :-

nvme-topology.c: In function ‘verify_legacy_ns’:
nvme-topology.c:361:32: error: format not a string literal and no format arguments [-Werror=format-security]
  361 |    asprintf(&n->ctrl->address, tmp_address);
      |                                ^~~~~~~~~~~
nvme-topology.c:360:4: error: ignoring return value of ‘asprintf’, declared with attribute warn_unused_result [-Werror=unused-result]
  360 |    asprintf(&n->ctrl->transport, "pcie");
      |    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
nvme-topology.c:361:4: error: ignoring return value of ‘asprintf’, declared with attribute warn_unused_result [-Werror=unused-result]
  361 |    asprintf(&n->ctrl->address, tmp_address);
      |    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
make: *** [Makefile:96: nvme-topology.o] Error 1

This can be easily re produced on the gcc version :-
(Ubuntu 9.2.1-9ubuntu2) 9.2.1 20191008

Signed-off-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
5 years agonvme-cli: Release version 1.11 v1.11
Keith Busch [Thu, 23 Apr 2020 20:19:06 +0000 (05:19 +0900)]
nvme-cli: Release version 1.11

Signed-off-by: Keith Busch <kbusch@kernel.org>
5 years agofabrics: allow traddr to be host name for ip based transports
Sagi Grimberg [Wed, 1 Apr 2020 21:53:44 +0000 (14:53 -0700)]
fabrics: allow traddr to be host name for ip based transports

Some users would like to use well known hostnames instead of remembering
ip addresses. So, allow users to set traddr to be a host name and we will
attempt to resolve against a DNS.

This applies for IP based transports only (e.g. tcp, rdma) while fc and
loop will ignore this distinction.

Signed-off-by: Sagi Grimberg <sagi@grimberg.me>
5 years agofabrics: add fabrics_ prefix to fabrics operations
Sagi Grimberg [Wed, 1 Apr 2020 21:53:43 +0000 (14:53 -0700)]
fabrics: add fabrics_ prefix to fabrics operations

discover/connect/disconnect are generic names which might
clash with other external included libraries.

Signed-off-by: Sagi Grimberg <sagi@grimberg.me>
5 years agoregen documentation
Keith Busch [Thu, 23 Apr 2020 20:25:24 +0000 (05:25 +0900)]
regen documentation

Signed-off-by: Keith Busch <kbusch@kernel.org>
5 years agolist-subsys: when running on old kernels, get PCIe B:D.f address from sysfs
Yair Elharrar [Thu, 23 Jan 2020 12:16:39 +0000 (14:16 +0200)]
list-subsys: when running on old kernels, get PCIe B:D.f address from sysfs

Signed-off-by: Yair Elharrar <yair@excelero.com>
5 years agolist-subsys: fix NULL dereference when trying to use -o json on older kernels
Yair Elharrar [Thu, 23 Jan 2020 11:33:46 +0000 (13:33 +0200)]
list-subsys: fix NULL dereference when trying to use -o json on older kernels

Signed-off-by: Yair Elharrar <yair@excelero.com>
5 years agofabrics: fix potential memory leaks
Yair Elharrar [Mon, 29 Jul 2019 18:47:17 +0000 (21:47 +0300)]
fabrics: fix potential memory leaks
See issue #505

Signed-off-by: Yair Elharrar <yair@excelero.com>
5 years agoUpdate Makefile to remove old destination folder
Randy [Mon, 9 Mar 2020 16:13:03 +0000 (11:13 -0500)]
Update Makefile to remove old destination folder

5 years agoMerge branch 'master' of https://github.com/linux-nvme/nvme-cli
Keith Busch [Thu, 23 Apr 2020 20:15:17 +0000 (05:15 +0900)]
Merge branch 'master' of https://github.com/linux-nvme/nvme-cli

5 years agoCommiting for dera plugin
Keith Busch [Thu, 23 Apr 2020 20:14:51 +0000 (05:14 +0900)]
Commiting for dera plugin

Squashed for https://github.com/linux-nvme/nvme-cli/pull/695

Signed-off-by: Keith Busch <kbusch@kernel.org>
5 years ago[Memblaze] modify SMART info
丁剑 [Tue, 10 Mar 2020 07:16:32 +0000 (15:16 +0800)]
[Memblaze] modify SMART info

1. Modify SMART info fellow Intel format;
2. Add Memblaze private SMART info;
3. Compatible with both new and old formats;

Signed-off-by: 丁剑 <jian.ding@memblaze.com>
5 years ago[Add] Transcend plugin command
victor_chen [Thu, 19 Mar 2020 07:48:51 +0000 (15:48 +0800)]
[Add] Transcend plugin command

5 years agoPT-4572 - fix incorrect logic
Randy [Fri, 20 Mar 2020 15:58:50 +0000 (10:58 -0500)]
PT-4572 - fix incorrect logic

test for enabled was incorrect in wdc_do_cap_telemetry_log

5 years agoTP-4574 - fix invalid type option
Randy [Fri, 20 Mar 2020 13:50:09 +0000 (08:50 -0500)]
TP-4574 - fix invalid type option

5 years agovs-telemetry-controller-option - fix invalid options reporting
Randy [Thu, 19 Mar 2020 14:42:44 +0000 (09:42 -0500)]
vs-telemetry-controller-option - fix invalid options reporting

5 years agoAllow only one option value at a time
Randy [Wed, 18 Mar 2020 18:44:59 +0000 (13:44 -0500)]
Allow only one option value at a time

5 years agonvme: refactoring unnecessary functions
Steven Seungcheol Lee [Fri, 17 Apr 2020 11:34:21 +0000 (20:34 +0900)]
nvme: refactoring unnecessary functions

Signed-off-by: Steven Seungcheol Lee <sc108.lee@samsung.com>
5 years agoUpdate shannon plugin(add SRAM Error Cnt).
Tonyongxing [Thu, 16 Apr 2020 07:30:55 +0000 (15:30 +0800)]
Update shannon plugin(add SRAM Error Cnt).

5 years agonvme-print: fix namespace descriptor human printing
Klaus Jensen [Mon, 6 Apr 2020 07:06:36 +0000 (09:06 +0200)]
nvme-print: fix namespace descriptor human printing

9b2ce6ca3ba7 fixed the len accumulation, but only for the JSON printing.
Fix it for human output as well.

Reported-by: Narae Park <narae7.park@samsung.com>
Signed-off-by: Klaus Jensen <k.jensen@samsung.com>
5 years agonvme-print: fix offset calculation in NS ID Descriptor list
Saar Gross [Wed, 8 Apr 2020 00:24:47 +0000 (17:24 -0700)]
nvme-print: fix offset calculation in NS ID Descriptor list

The offset for the next entry in the list is based on the length (len)
of the previous entry, but len is erroneously accumulated instead of
being set. This works fine for the first and second entry in the list
but will fail to reach the correct offset for the 3rd entry and beyond.

Signed-off-by: Saar Gross <saarg@amazon.com>
5 years agonvme.spec: rpmbuild error fix (missing file)
Steven Seungcheol Lee [Fri, 3 Apr 2020 10:39:12 +0000 (19:39 +0900)]
nvme.spec: rpmbuild error fix (missing file)

Signed-off-by: Steven Seungcheol Lee <sc108.lee@samsung.com>
5 years agonvmf: use discovery controller host identifiers for persistent controllers
Sagi Grimberg [Tue, 24 Mar 2020 08:53:28 +0000 (01:53 -0700)]
nvmf: use discovery controller host identifiers for persistent controllers

It is possible that the user will create a persistent discovery controller
with a specific host identifiers (hostnqn and/or hostid). If we get a discovery
change log event on this discovery controller we need to use the same host
identifiers that otherwise we will may not see what the discovery change log
event intended us to see (as we connect with a different hostnqn for example).

Note that we take these identifiers only if they exist in sysfs which gives us
backward compatibility (as hostnqn and hostid are still new).

Reported-by: Yogev Cohen <yogev@lightbitslabs.com>
Signed-off-by: Sagi Grimberg <sagi@grimberg.me>
Signed-off-by: Keith Busch <kbusch@kernel.org>
5 years agonvme-print: list also hostnqn and hostid for verbose
Sagi Grimberg [Tue, 24 Mar 2020 08:53:27 +0000 (01:53 -0700)]
nvme-print: list also hostnqn and hostid for verbose

Add it to the json output as the normal display is crowded enough as it is.
Note that we print them only if they exist in sysfs which gives us backward
compatibility (as hostnqn and hostid are still new).

Signed-off-by: Sagi Grimberg <sagi@grimberg.me>
Signed-off-by: Keith Busch <kbusch@kernel.org>
5 years agosuppress missing attribute warnings
Keith Busch [Tue, 31 Mar 2020 18:11:17 +0000 (03:11 +0900)]
suppress missing attribute warnings

Attribute existence is dependent on kernel versions. Don't automatically
warn if we fail to find the attribute, let the caller decide how to deal
with it.

Reported-by: Jeffrey Lien <Jeff.Lien@wdc.com>
Signed-off-by: Keith Busch <kbusch@kernel.org>
5 years agonvme-status: update return val for new status code
Steven Seungcheol Lee [Fri, 27 Mar 2020 10:28:07 +0000 (19:28 +0900)]
nvme-status: update return val for new status code

5 years agonvme status code updates based nvme spec v1.4
Steven Seungcheol Lee [Fri, 27 Mar 2020 10:27:18 +0000 (19:27 +0900)]
nvme status code updates based nvme spec v1.4

5 years agoFixing Empty Fields of Intel VU id-ctrl
Ben Reese [Fri, 20 Mar 2020 21:41:59 +0000 (14:41 -0700)]
Fixing Empty Fields of Intel VU id-ctrl

Fixing empty fields in Intel VU id-ctrl introduced in
44755ae6869ab2a9dc6ac976fb43f4f2d746336c.

Signed-off-by: Ben Reese <5884008+benreese0@users.noreply.github.com>
5 years agoFixed malformed json output from sanitize-log.
Gregory C. Oakes [Thu, 12 Mar 2020 17:36:56 +0000 (12:36 -0500)]
Fixed malformed json output from sanitize-log.

5 years agoAdd function to list power descriptor, and show vendor specific log
Quyen Truong [Tue, 17 Mar 2020 04:43:59 +0000 (11:43 +0700)]
Add function to list power descriptor, and show vendor specific log
Fix spelling mistake

5 years agoFixing compile error introduced by #580
Ben Reese [Tue, 10 Mar 2020 23:53:17 +0000 (16:53 -0700)]
Fixing compile error introduced by #580

Fixing incompatibility between #580 and
e5786ad7ffa4734249c99bede2323a4d4cbb51ab.

Signed-off-by: Ben Reese <5884008+benreese0@users.noreply.github.com>
5 years agointel: Add enable-lat-stats function.
Kevin Chau [Thu, 19 Sep 2019 01:22:35 +0000 (18:22 -0700)]
intel: Add enable-lat-stats function.
This adds the cli function for lat-stats-tracking. Enabling it allows
the drive to start tracking latency statistics during i/o.

5 years agoFixing Alignment Error In intel smart-log-add
Ben Reese [Tue, 3 Mar 2020 21:41:41 +0000 (13:41 -0800)]
Fixing Alignment Error In intel smart-log-add

Fixing alignment in nvme_additional_smart_log_item introduced by switch
from '#pragma pack' semantics to '__attribute__((pack))'.

Per https://gcc.gnu.org/onlinedocs/gcc/Common-Type-Attributes.html each
union or struct requires it's own '__attribute__((pack))'.

Signed-off-by: Ben Reese <5884008+benreese0@users.noreply.github.com>
5 years agoFixed where libsystem is needed, not just systemd
Muhammad Ahmad [Sat, 29 Feb 2020 15:16:44 +0000 (09:16 -0600)]
Fixed where libsystem is needed, not just systemd

5 years agoAdd documentation files for new wdc plugin command - vs-drive-info
Jeff Lien [Fri, 21 Feb 2020 16:48:19 +0000 (10:48 -0600)]
Add documentation files for new wdc plugin command - vs-drive-info

5 years agoAdd new wdc plugin command - vs-drive-info
Jeff Lien [Fri, 21 Feb 2020 16:19:16 +0000 (10:19 -0600)]
Add new wdc plugin command - vs-drive-info

5 years agoNVMe get features test fix
Narasimhan V [Thu, 27 Feb 2020 10:31:37 +0000 (16:01 +0530)]
NVMe get features test fix

For One of the mandatory feature "Interrupt Vector Configuration",
the parameter cdw11 value should be equal to or less than the
number of interrupt vectors. Current implementaion uses the
IRQ number instead. This commit fixes it.

Signed-off-by: Narasimhan V <sim@linux.vnet.ibm.com>
5 years agoEncoding for subprocess and typecast fixes
Narasimhan V [Tue, 25 Feb 2020 18:35:58 +0000 (00:05 +0530)]
Encoding for subprocess and typecast fixes

Encoding, string handling fixes for subprocess.
Also some related typecast fixes.

Signed-off-by: Narasimhan V <sim@linux.vnet.ibm.com>
5 years agonvme-cli fix nvme_show_id_ctrl 'anacn' field
Engel [Tue, 25 Feb 2020 13:14:49 +0000 (15:14 +0200)]
nvme-cli fix nvme_show_id_ctrl 'anacn' field

5 years agoioctl: Remove duplicated header files
Minwoo Im [Tue, 18 Feb 2020 09:14:59 +0000 (18:14 +0900)]
ioctl: Remove duplicated header files

Remove duplicated included header files in a file (nvme-ioctl.c)

Signed-off-by: Minwoo Im <minwoo.im@samsung.com>
5 years agouapi: Sync up nvme_ioctl.h with kernel
Minwoo Im [Tue, 18 Feb 2020 07:35:53 +0000 (16:35 +0900)]
uapi: Sync up nvme_ioctl.h with kernel

Kernel has already updated 0x47 and 0x48 ioctl commands for 64bits
support.  This patch synced up the header file between kernel and
nvme-cli.

Signed-off-by: Minwoo Im <minwoo.im@samsung.com>
5 years agoREADME: Fix include file location for plugin
Minwoo Im [Tue, 18 Feb 2020 06:55:00 +0000 (15:55 +0900)]
README: Fix include file location for plugin

If the CMD_INC_FILE is defined with file name without location, the
following error will happen.

In file included from plugins/foo/foo-nvme.h:17:0,
                 from plugins/foo/foo-nvme.c:4:
./define_cmd.h:12:34: fatal error: foo-nvme.h: No such file or directory
 #include CMD_INCLUDE(CMD_INC_FILE)
                                  ^

Signed-off-by: Minwoo Im <minwoo.im@samsung.com>
5 years agoREADME: Include nvme.h in plugin template
Minwoo Im [Tue, 18 Feb 2020 06:52:08 +0000 (15:52 +0900)]
README: Include nvme.h in plugin template

The newly made plugin must have nvme.h file include, otherwise the
following errors will happen.

    CC plugins/samsung/samsung-nvme.o
make: *** No rule to make target 'NVME-VERSION-FILE', needed by 'nvme'.  Stop.
make: *** Waiting for unfinished jobs....
In file included from ./define_cmd.h:14:0,
                 from plugins/samsung/samsung-nvme.h:17,
                 from plugins/samsung/samsung-nvme.c:3:
./cmd_handler.h:75:2: error: ‘NULL’ undeclared here (not in a function)
  NULL,    \
  ^
./cmd_handler.h:79:28: note: in definition of macro ‘PLUGIN’
 #define PLUGIN(name, cmds) cmds
                            ^~~~
./plugins/samsung/samsung-nvme.h:11:5: note: in expansion of macro ‘COMMAND_LIST’
     COMMAND_LIST(
     ^~~~~~~~~~~~
In file included from ./define_cmd.h:14:0,
                 from plugins/samsung/samsung-nvme.h:17,
                 from plugins/samsung/samsung-nvme.c:3:
./plugins/samsung/samsung-nvme.h: In function ‘init’:
./cmd_handler.h:105:2: error: implicit declaration of function ‘register_extension’ [-Werror=implicit-function-declaration]
  register_extension(&plugin);   \
  ^
./plugins/samsung/samsung-nvme.h:10:1: note: in expansion of macro ‘PLUGIN’
 PLUGIN(NAME("samsung", "samsung"),
 ^~~~~~
cc1: all warnings being treated as errors
Makefile:92: recipe for target 'plugins/samsung/samsung-nvme.o' failed
make: *** [plugins/samsung/samsung-nvme.o] Error 1

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