]> www.infradead.org Git - users/sagi/nvme-cli.git/log
users/sagi/nvme-cli.git
3 years agorelease v1.16 v1.16
Keith Busch [Thu, 11 Nov 2021 21:09:06 +0000 (13:09 -0800)]
release v1.16

This should be the last release on the legacy branch. New development
should switch to the split libnvme backend tree.

Signed-off-by: Keith Busch <kbusch@kernel.org>
3 years agoregen documentation
Keith Busch [Thu, 11 Nov 2021 21:07:20 +0000 (13:07 -0800)]
regen documentation

3 years agoMerge pull request #1229 from maurizio-lombardi/ctrl_loss_tmo_fix
Daniel Wagner [Tue, 9 Nov 2021 10:26:24 +0000 (11:26 +0100)]
Merge pull request #1229 from maurizio-lombardi/ctrl_loss_tmo_fix

nvme-cli: ctrl-loss-tmo should accept -1 as value

3 years agonvme-cli: ctrl-loss-tmo should accept -1 as value
Maurizio Lombardi [Mon, 8 Nov 2021 13:26:56 +0000 (14:26 +0100)]
nvme-cli: ctrl-loss-tmo should accept -1 as value

When passing the parameter --ctrl-loss-tmo=-1
nvme-cli silently drops it and replaces its value with the
default one (600) despite the fact that -1 is valid
and accepted by the kernel.
ctrl_loss_tmo < 0 means that it will try to reconnect forever

This is due to the fact that -1 is treated like "variable unset"
by nvme-cli and the add_int_argument() function ignores
all arguments with such a value if allow_zero is true (the latter seems
to be completely unintended).

This patch fixes the bug by:

1) removing the "arg == -1" condition from add_int_argument() and letting
   the caller take care of checking if -1 is an acceptable value
   for a particular argument.

2) initializing ctrl_loss_tmo to its default value instead of -1.

Signed-off-by: Maurizio Lombardi <mlombard@redhat.com>
3 years agoMerge pull request #1227 from linux-nvme/origin/nvme-cli-monolithic
Daniel Wagner [Mon, 8 Nov 2021 09:30:14 +0000 (10:30 +0100)]
Merge pull request #1227 from linux-nvme/origin/nvme-cli-monolithic

Build fixes

3 years agofabrics: Only free initialized valued on exit
Daniel Wagner [Mon, 8 Nov 2021 09:22:17 +0000 (10:22 +0100)]
fabrics: Only free initialized valued on exit

ctrl_matches_connectargs() bails out if addr, subsysnqn or transport
are not valid. If this is the case only attempt to free those pointers
as these pointers are properly inialized, e.g. either NULL or a valid.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
3 years agonvme: Add json_array_add_value_string helper
Daniel Wagner [Mon, 8 Nov 2021 09:17:01 +0000 (10:17 +0100)]
nvme: Add json_array_add_value_string helper

Commit 225e38f45899 ("add json support for zns report zones")
introduced a dependency to json_array_add_value_string(). This
function is not defined if the json-c is used. Let's add the missing
wrapper to fix the build.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
3 years agoworkflows: Add nvme-cli-monolithic to CI build
Daniel Wagner [Mon, 8 Nov 2021 08:48:03 +0000 (09:48 +0100)]
workflows: Add nvme-cli-monolithic to CI build

nvme-cli-monolithic is currently maintained and thus should also be
added to the CI build.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
3 years agoMerge pull request #1220 from martin-gpy/discover_crash
Daniel Wagner [Tue, 2 Nov 2021 09:57:51 +0000 (10:57 +0100)]
Merge pull request #1220 from martin-gpy/discover_crash

fabrics: fix 'nvme discover' segfault if sysfs path is not available

3 years agofabrics: fix 'nvme discover' segfault if sysfs path is not available
Martin George [Sat, 30 Oct 2021 09:43:22 +0000 (15:13 +0530)]
fabrics: fix 'nvme discover' segfault if sysfs path is not available

Avoid dereferencing connect_args strings if the corresponding nvme
sysfs paths are not available.

Signed-off-by: Martin George <marting@netapp.com>
3 years agoMerge pull request #1217 from martin-gpy/add_discovery_field
Daniel Wagner [Wed, 27 Oct 2021 09:37:34 +0000 (11:37 +0200)]
Merge pull request #1217 from martin-gpy/add_discovery_field

nvme-print: add discovery async event config field

3 years agonvme-print: add discovery async event config field
Martin George [Wed, 27 Oct 2021 09:00:24 +0000 (14:30 +0530)]
nvme-print: add discovery async event config field

Add a new async event config field for discovery log page
change notices.

Signed-off-by: Martin George <marting@netapp.com>
3 years agoMerge pull request #1212 from jeffreyalien/nvme-cli-monolithic2
Daniel Wagner [Mon, 25 Oct 2021 07:57:37 +0000 (09:57 +0200)]
Merge pull request #1212 from jeffreyalien/nvme-cli-monolithic2

Add namespace id parm to wdc plugin command vs-smart-add-log

3 years ago[nvme-cli] Add documentation files for get-latency-monitor-log
Jeff Lien [Fri, 22 Oct 2021 21:50:52 +0000 (16:50 -0500)]
[nvme-cli] Add documentation files for get-latency-monitor-log

3 years ago[nvme-cli] Update documentation files for vs-smart-add-log change
Jeff Lien [Fri, 22 Oct 2021 17:47:08 +0000 (12:47 -0500)]
[nvme-cli] Update documentation files for vs-smart-add-log change

Signed-off-by: Jeff Lien <jeff.lien@wdc.com>
3 years ago[nvme-cli] Add namespace id parm to vs-smart-add-log wdc plugin cmd
Jeff Lien [Fri, 22 Oct 2021 16:18:28 +0000 (11:18 -0500)]
[nvme-cli] Add namespace id parm to vs-smart-add-log wdc plugin cmd

3 years ago[nvme-cli] Update WDC plugin version to 1.15.3
Jeff Lien [Thu, 30 Sep 2021 15:01:10 +0000 (10:01 -0500)]
[nvme-cli] Update WDC plugin version to 1.15.3

Signed-off-by: Jeff Lien <jeff.lien@wdc.com>
3 years ago[nvme-cli] Add support for C3/Latency Monitor Log page parsing
Jeff Lien [Thu, 23 Sep 2021 17:23:16 +0000 (12:23 -0500)]
[nvme-cli] Add support for C3/Latency Monitor Log page parsing
  This support is for the WDC plugin

Signed-off-by: Jeff Lien <jeff.lien@wdc.com>
3 years agoMerge pull request #1189 from jeffreyalien/report-zones-fix
Daniel Wagner [Tue, 12 Oct 2021 09:08:36 +0000 (11:08 +0200)]
Merge pull request #1189 from jeffreyalien/report-zones-fix

[zns] ZNS report zones command fix for large number of zones

3 years ago[zns] ZNS report zones command fix for large number of zones
Jeff Lien [Wed, 29 Sep 2021 14:50:47 +0000 (09:50 -0500)]
[zns] ZNS report zones command fix for large number of zones
When there are a large number of zones, the buffer required
to contain the data becomes extremely large and the linux os
is unable to handle that on all systems. This change will
break up the transfer of the zone data into smaller chunks -
1024 zone entries at a time and 64k bytes total.

Signed-off-by: Jeff Lien <jeff.lien@wdc.com>
3 years agozns: report zones add verbose option functionality
Steven Seungcheol Lee [Thu, 16 Sep 2021 07:51:22 +0000 (16:51 +0900)]
zns: report zones add verbose option functionality

Addtional data will be printed for ZA, ZAI on report-zones
Zone Attributes (ZA), Zone Attributes Information (ZAI)

Signed-off-by: Steven Seungcheol Lee <sc108.lee@samsung.com>
3 years agozns: Add missing Zone Attributes Information on zone descriptor
Steven Seungcheol Lee [Wed, 15 Sep 2021 10:01:12 +0000 (19:01 +0900)]
zns: Add missing Zone Attributes Information on zone descriptor

NVMe-Zoned-Namespace-Command-Set-Specification-1.1a-2021.07.26-Ratified
Figure 37: Zone Descriptor Data Structure - Zone Attributes Information

Signed-off-by: Steven Seungcheol Lee <sc108.lee@samsung.com>
3 years agoadd json support for zns report zones
Brandon Paupore [Thu, 23 Sep 2021 19:03:02 +0000 (14:03 -0500)]
add json support for zns report zones

Signed-off-by: Brandon Paupore <brandon.paupore@wdc.com>
3 years agonvme.h: nvme_id_ns rsvd area modified as lbaf fields
Steven Seungcheol Lee [Thu, 23 Sep 2021 04:14:50 +0000 (13:14 +0900)]
nvme.h: nvme_id_ns rsvd area modified as lbaf fields

Based spec : NVMe-NVM-Command-Set-Specification-1.0a-2021.07.26-Ratified

3 years agofabrics: fix return value of hostnqn_read_file()
Chaitanya Kulkarni [Thu, 16 Sep 2021 23:03:12 +0000 (16:03 -0700)]
fabrics: fix return value of hostnqn_read_file()

Current code returns the value of strdup and callers of
hostnqn_read_file() check for the NULL value in order to determine the
success or failure. The value return by the strdup will never be NULL
unless strdup() results in an error that is making function return
success all the time resulting in blktests failures.

Check the string value to NULL before we return the pointer.

Signed-off-by: Chaitanya Kulkarni <kch@nvidia.com>
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Signed-off-by: Keith Busch <kbusch@kernel.org>
3 years agonvme-print: print generic ns chardev in verbose mode
Minwoo Im [Sat, 18 Sep 2021 01:17:15 +0000 (10:17 +0900)]
nvme-print: print generic ns chardev in verbose mode

Generic device (e.g., /dev/ng0n1) is mapped to a block device (e.g.,
/dev/nvme0n1).  This chardev can be taken in case that block device is
failed to initialize from the kernel due to some reasons (e.g.,
metadata initialization failed).  This generic node information can be
shown in the verbose list mode with HIDDEN block device (nvme0n1 in the
below example).

root@localhost:~# nvme list -v
NVM Express Subsystems

Subsystem        Subsystem-NQN                                                                                    Controllers
---------------- ------------------------------------------------------------------------------------------------ ----------------
nvme-subsys0     nqn.2019-08.org.qemu:subsys0                                                                     nvme0

NVM Express Controllers

Device   SN                   MN                                       FR       TxPort Address        Subsystem    Namespaces
-------- -------------------- ---------------------------------------- -------- ------ -------------- ------------ ----------------
nvme0    foo                  QEMU NVMe Ctrl                           1.0      pcie   0000:00:06.0   nvme-subsys0 nvme0n1, nvme0n2

NVM Express Namespaces

Device       Generic      NSID     Usage                      Format           Controllers
------------ ------------ -------- -------------------------- ---------------- ----------------
nvme0n1      ng0n1            1          0.00   B /   0.00   B      1   B +  0 B   nvme0
nvme0n2      ng0n2            2        268.44  MB / 268.44  MB      4 KiB +  0 B   nvme0

The nvme0n1 is failed to initialize and it shows 0.00 B size which is
invalid.  In this case, we can take /dev/ng0n1 alternatively from the
application through generic I/O path.

Signed-off-by: Minwoo Im <minwoo.im.dev@gmail.com>
3 years agoMerge branch 'Karthikmct-lockdown' into nvme-cli-monolithic
Keith Busch [Tue, 14 Sep 2021 15:01:18 +0000 (08:01 -0700)]
Merge branch 'Karthikmct-lockdown' into nvme-cli-monolithic

3 years agoMerge branch 'nvme-cli-monolithic' into lockdown
Keith Busch [Tue, 14 Sep 2021 15:00:26 +0000 (09:00 -0600)]
Merge branch 'nvme-cli-monolithic' into lockdown

3 years agofix list controller documentation
Gollu Appalanaidu [Wed, 8 Sep 2021 08:56:04 +0000 (14:26 +0530)]
fix list controller documentation

Signed-off-by: Gollu Appalanaidu <anaidu.gollu@samsung.com>
3 years agoadd identify endurance group list (cns 0x19) support
Gollu Appalanaidu [Wed, 8 Sep 2021 08:49:36 +0000 (14:19 +0530)]
add identify endurance group list (cns 0x19) support

Signed-off-by: Gollu Appalanaidu <anaidu.gollu@samsung.com>
3 years agozns: fix(Add missing fields rrl, frl, lbafe)
Steven Seungcheol Lee [Mon, 6 Sep 2021 11:01:15 +0000 (20:01 +0900)]
zns: fix(Add missing fields rrl, frl, lbafe)

Based on NVMe-Zoned-Namespace-Command-Set-Specification-1.1a-2021.07.26-Ratified

Signed-off-by: Steven Seungcheol Lee <sc108.lee@samsung.com>
3 years agoadd lockdown command support
Gollu Appalanaidu [Thu, 9 Sep 2021 09:22:03 +0000 (14:52 +0530)]
add lockdown command support

Signed-off-by: Karthik Balan karthik.b82@samsung.com
Signed-off-by: Gollu Appalanaidu <anaidu.gollu@samsung.com>
3 years agonvme-cli: fix the [data|mdata]_len param
Chaitanya Kulkarni [Tue, 7 Sep 2021 20:11:36 +0000 (13:11 -0700)]
nvme-cli: fix the [data|mdata]_len param

Add missing user data buffer and metadata buffer size parameter for the
passthru I/O commands since driver code expects these values to be set
from the user space. Without this patch blktests/nvme/029 is failing.

Signed-off-by: Chaitanya Kulkarni <kch@nvidia.com>
3 years ago[nvme cli] Update WDC pluging version to 1.15.2
Jeff Lien [Tue, 7 Sep 2021 17:56:43 +0000 (12:56 -0500)]
[nvme cli] Update WDC pluging version to 1.15.2

3 years agoUse hex values instead of decimal for flag checking
Brandon Paupore [Tue, 31 Aug 2021 15:08:11 +0000 (10:08 -0500)]
Use hex values instead of decimal for flag checking

Signed-off-by: Brandon Paupore <brandon.paupore@wdc.com>
3 years agoAdd function to get specific feature buffer lengths
Brandon Paupore [Tue, 31 Aug 2021 15:01:05 +0000 (10:01 -0500)]
Add function to get specific feature buffer lengths

Signed-off-by: Brandon Paupore <brandon.paupore@wdc.com>
3 years agoEnable telemetry data area 4 in base and plugin
Brandon Paupore [Thu, 12 Aug 2021 18:47:51 +0000 (13:47 -0500)]
Enable telemetry data area 4 in base and plugin

Signed-off-by: Brandon Paupore <brandon.paupore@wdc.com>
3 years ago[nvme-cli] Add support for new SN650 device
Jeff Lien [Tue, 7 Sep 2021 15:41:33 +0000 (10:41 -0500)]
[nvme-cli] Add support for new SN650 device

3 years agonvme: add supported log pages log page (lid = 0x00)
Gollu Appalanaidu [Fri, 13 Aug 2021 17:18:52 +0000 (22:48 +0530)]
nvme: add supported log pages log page (lid = 0x00)

Signed-off-by: Gollu Appalanaidu <anaidu.gollu@samsung.com>
3 years agoMerge branch 'nvme-cli-monolithic' of github.com:linux-nvme/nvme-cli into nvme-cli...
Keith Busch [Thu, 26 Aug 2021 18:25:20 +0000 (11:25 -0700)]
Merge branch 'nvme-cli-monolithic' of github.com:linux-nvme/nvme-cli into nvme-cli-monolithic

3 years agoCheck json-c libversion, recover commit d127537
Steven Seungcheol Lee [Tue, 10 Aug 2021 05:08:36 +0000 (14:08 +0900)]
Check json-c libversion, recover commit d127537

The fix commit support json-c >= 0.14-20200419
If version lower than 0.14, using util/json.h util/json.c

Signed-off-by: Steven Seungcheol Lee <sc108.lee@samsung.com>
3 years agoDocumentation: zns documentation fix, add timeout
Steven Seungcheol Lee [Thu, 26 Aug 2021 05:48:34 +0000 (14:48 +0900)]
Documentation: zns documentation fix, add timeout

Signed-off-by: Steven Seungcheol Lee <sc108.lee@samsung.com>
3 years agonvme: add support for fid supported and effects log(lid = 0x12)
Gollu Appalanaidu [Sun, 22 Aug 2021 17:55:03 +0000 (23:25 +0530)]
nvme: add support for fid supported and effects log(lid = 0x12)

Signed-off-by: Gollu Appalanaidu <anaidu.gollu@samsung.com>
3 years agonvme: add boot partition log support
Gollu Appalanaidu [Fri, 13 Aug 2021 16:54:00 +0000 (22:24 +0530)]
nvme: add boot partition log support

Signed-off-by: Gollu Appalanaidu <anaidu.gollu@samsung.com>
3 years agoMerge remote-tracking branch 'origin/standalone' into nvme-cli-monolithic
Keith Busch [Thu, 26 Aug 2021 15:09:13 +0000 (08:09 -0700)]
Merge remote-tracking branch 'origin/standalone' into nvme-cli-monolithic

3 years agoDocumentation: Add Doc for Identify(CNS 08h)
Steven Seungcheol Lee [Wed, 25 Aug 2021 09:30:58 +0000 (18:30 +0900)]
Documentation: Add Doc for Identify(CNS 08h)

Signed-off-by: Steven Seungcheol Lee <sc108.lee@samsung.com>
3 years agocompletions: Add Completion for Identify(CNS 08h)
Steven Seungcheol Lee [Wed, 25 Aug 2021 09:14:20 +0000 (18:14 +0900)]
completions: Add Completion for Identify(CNS 08h)

Signed-off-by: Steven Seungcheol Lee <sc108.lee@samsung.com>
3 years agonvme: Add Identify for CNS 08h NVMe spec 2.0a based
Steven Seungcheol Lee [Wed, 25 Aug 2021 08:24:02 +0000 (17:24 +0900)]
nvme: Add Identify for CNS 08h NVMe spec 2.0a based

I/O Command Set Independent Identify Namespace data structure (CNS 08h)
Most of data comes from existing data of id-ns which is common from All I/O command set

Signed-off-by: Steven Seungcheol Lee <sc108.lee@samsung.com>
3 years agonvme: fix style in show sanitize config feature
Gollu Appalanaidu [Wed, 25 Aug 2021 17:38:29 +0000 (23:08 +0530)]
nvme: fix style in show sanitize config feature

Signed-off-by: Gollu Appalanaidu <anaidu.gollu@samsung.com>
3 years agonvme: add spinup control feature (fid=0x1A)
Gollu Appalanaidu [Wed, 25 Aug 2021 17:32:17 +0000 (23:02 +0530)]
nvme: add spinup control feature (fid=0x1A)

Signed-off-by: Gollu Appalanaidu <anaidu.gollu@samsung.com>
3 years agonvme: PEL need to check gen number for verification of collected log
Steven Seungcheol Lee [Thu, 26 Aug 2021 03:06:11 +0000 (12:06 +0900)]
nvme: PEL need to check gen number for verification of collected log

+fix bug(unallocated pointer free)

If the Persistent Event Log is not read with a single Get Log Page command,
then host software should read the Generation Number field in the Persistent Event Log header after establishing a reporting context
but before reading the remainder of the log and then re-read the Generation Number field after it has read the entire log.
If the generation numbers do not match, then:
    • the reporting context may have been lost while reading the log;
    • the Persistent Event Log contents read may be invalid; and
    • host software should re-read the log.

Signed-off-by: Steven Seungcheol Lee <sc108.lee@samsung.com>
3 years agoAdd New fields on PEL based on NVMe 2.0a
Steven Seungcheol Lee [Thu, 26 Aug 2021 01:53:24 +0000 (10:53 +0900)]
Add New fields on PEL based on NVMe 2.0a

Persistent Event Log header got new fields below
[373:372] Generation Number
[377:374] Reporting Context Information (RCI)

Signed-off-by: Steven Seungcheol Lee <sc108.lee@samsung.com>
3 years ago[nvme-cli] Split media units written/read into hi/lo 64 bit fields
Jeff Lien [Wed, 21 Apr 2021 13:15:50 +0000 (08:15 -0500)]
[nvme-cli] Split media units written/read into hi/lo 64 bit fields

3 years ago[nvme-cli] Update WDC plugin version to 1.15.1
Jeff Lien [Tue, 17 Aug 2021 16:52:48 +0000 (11:52 -0500)]
[nvme-cli] Update WDC plugin version to 1.15.1

3 years agoPrint ProductName found even if subvendor/subdevice is unknown
Brandon Paupore [Tue, 17 Aug 2021 17:02:28 +0000 (12:02 -0500)]
Print ProductName found even if subvendor/subdevice is unknown

Signed-off-by: Brandon Paupore <brandon.paupore@wdc.com>
3 years agotag v1.15 v1.15
Keith Busch [Fri, 6 Aug 2021 21:07:15 +0000 (14:07 -0700)]
tag v1.15

Shortlog of changes since v1.14. Big thanks to all the contributors and
bug reports that made it into this round.

Akhilesh RN (4):
      Removed unwanted print statement
      ZN-350 - wdc purge command bug fix
      ZN-350 - vs-fw-activate-history bug fix
      Addressed review comments

Brandon Paupore (1):
      Add Timeout Parameter for Zone Management Commands

Daniel Wagner (2):
      nvme-topology: no error message when openeing of controller fails
      gen-hostnqn: Remove UUID validation heuristic

FrancisPravin (1):
      intel_nvme: fixed typo

Gollu Appalanaidu (42):
      nvme-print: print namespace write protect states in get feature
      zns: trivial formatting fix
      nvme-print: add fna 3rd bit in identify ctrl
      nvme-print: add controller register cap 44th bit
      nvme: add primary ctrl caps man page
      nvme: fix predictable latency log zsh completions
      nvme: adding get lba status command man page
      nvme: add uuid index in get and set features command
      nvme: fix csi data type in list_ns
      nvme: add json output format for list_crl
      nvme-ioctl: remove unused function nvme_identify_ns_list
      zns: style fixes in zns plugin
      nvme: add json output format for list_ns
      nvme: fix parameter sizes
      zns: fix get_zdes_bytes return value in failed cases
      wdc-nvme: fix the build failure
      nvme: add latency parameter for passthru commands
      nvme: add lsp and uuid index invalid value checks in get log
      nvme: add optional copy format support id ctrl field
      nvme: add zone desc changed notice async event
      nvme: add persistent event log action field invalid check
      nvme: add json, binary and human readable output format for id iocs
      nvme: update passthru commands man page with latency parameter details
      nvme-print: sanitize log style fix
      nvme: add the LBA format upper in Format NVM Command
      nvme: fix errno for non nvme device return errors
      nvme: add missing endianness annotations
      nvme: fix the fw-log structure and show fw log changes
      nvme: add identify controller structure 2.0 spec. fields
      nvme: add get log page 2.0 spec fields
      nvme: add the status codes from 2.0 spec
      nvme: extend existing id ctrl parameters as per 2.0
      nvme: add status to error number for id_uuid and verify_cmd
      nvme: style fix
      nvme: add verify command man page
      nvme: add CDW2 and CDW3 support for Write Zeroes and Verify Command
      nvme add Storage Tag Check field in NVM Commands
      Change IOCTL for read, write and compare commands
      fix boot partitions register show in human readable format
      nvme: add multiple update detected result value in fw commit
      nvme: add capacity management command support
      Add Identify CNS 0x18 Domain List Support

Hannes Reinecke (2):
      nvme-ioctl: return -1 on failure from nvme_get_nsid()
      nvme-topology: scan all controllers in scan_subsystem()

Hanumanthu H (4):
      Micron plugin version 1.0.6
      json format support for micron vs-drive-info command
      Support micron vs-smart-add-log option for M54XX drives
      vs-drive-info command opcode change for M5407 drives

James Kahn (1):
      corrected-returns-in-sanitize-log

Jeff Lien (2):
      [nvme-cli] Add support for new devices
      [NVMe CLI] Add capability for unique plugin version

Jonathan Teh (1):
      nvme-cli: fix typos in reservation actions

Keith Busch (11):
      fix virtual mgmt parameter sizes
      default flush to use block device nsid
      fix code style
      fix set_feature formatting
      remove string representation timestamp set_feature
      strip trailing spaces from fabrics output
      Merge branch 'master' of https://github.com/michael-gebis/nvme-cli into michael-gebis-master
      Revert "Bug fix unsigned int and int should use 64bit api for json-c"
      Merge branch 'master' of https://github.com/fixthething/nvme-cli into fixthething-master
      Merge branch 'mi_features' of https://github.com/NateRoiger/nvme-cli into NateRoiger-mi_features
      fix whitespace damage

Martin Belanger (3):
      Add device id in JSON output
      Add --host-iface option
      Print device name on connect

Martin George (4):
      fabrics: skip connect if transport type doesn't match
      nvme-topology: fix controller check in scan_subsystem()
      nvme-print: fix 'nvme list' segfault if controller is unavailable
      fabrics: add default port number for NVMe/TCP I/O controllers

Maurizio Lombardi (1):
      autoconnect: replace network.target with network-online.target

Michael Gebis (3):
      id-nvmset: Fixed typo
      micron-nvme.h: formatting
      Bash completions

Minwoo Im (1):
      nvme: support ns generic device to submit_io

Nate Roiger (2):
      Add NVMe MI Features: Controller Metadata (0x7E) and Namespace Metadata (0x7F).
      Merge branch 'master' into mi_features

Ronan Pigott (1):
      completions: fix syntax typo in zsh completions

Sagi Grimberg (2):
      systemd/nvmf-autoconnect.service: load nvme-fabrics before autoconnect
      fabrics: add fast_io_fail_tmo option

Steven Seungcheol Lee (2):
      nvme: Bug fix default data_len used if no argument given
      Bug fix unsigned int and int should use 64bit api for json-c

Sushrut Shirole (2):
      wdc-nvme: fix uclibc compilation.
      Use PRIx64 format specifier instead of lX for more portability.

Tokunori Ikegami (3):
      nvme-print: print both kelvin and celsius temperature values
      nvme-cli: Add lsi option for get-log command
      nvme: Fix to print get and set feature hex digits correct width

fixthething (4):
      Making security-send command more flexible by allowing data from stdin, and assuming transfer length to match input size if not specified.
      Doing dword alignment whether source of misalignment comes from file size or specified transfer length. Zeroing buffer to ensure zero fill and no heap garbage.
      Changes requested by keithbusch; no default for cfg.tl.
      Removing redundant parameter from nvme_sec_send

Signed-off-by: Keith Busch <kbusch@kernel.org>
3 years agofix whitespace damage
Keith Busch [Fri, 6 Aug 2021 21:05:32 +0000 (14:05 -0700)]
fix whitespace damage

Signed-off-by: Keith Busch <kbusch@kernel.org>
3 years agoMerge branch 'mi_features' of https://github.com/NateRoiger/nvme-cli into NateRoiger...
Keith Busch [Fri, 6 Aug 2021 21:04:24 +0000 (14:04 -0700)]
Merge branch 'mi_features' of https://github.com/NateRoiger/nvme-cli into NateRoiger-mi_features

3 years agoMerge branch 'master' of https://github.com/fixthething/nvme-cli into fixthething...
Keith Busch [Fri, 6 Aug 2021 21:01:24 +0000 (14:01 -0700)]
Merge branch 'master' of https://github.com/fixthething/nvme-cli into fixthething-master

3 years agoRevert "Bug fix unsigned int and int should use 64bit api for json-c"
Keith Busch [Fri, 6 Aug 2021 20:58:17 +0000 (13:58 -0700)]
Revert "Bug fix unsigned int and int should use 64bit api for json-c"

This reverts commit d127537694e5953551d58acf8717ab1483c38ed3.

3 years agoautoconnect: replace network.target with network-online.target
Maurizio Lombardi [Mon, 21 Jun 2021 08:55:55 +0000 (10:55 +0200)]
autoconnect: replace network.target with network-online.target

Make sure the network card is configured before trying to
connect to the target

Signed-off-by: Maurizio Lombardi <mlombard@redhat.com>
3 years agofabrics: add default port number for NVMe/TCP I/O controllers
Martin George [Fri, 6 Aug 2021 12:05:20 +0000 (17:35 +0530)]
fabrics: add default port number for NVMe/TCP I/O controllers

As per section 7.4.9.3 "Transport Service Identifier" of the NVMe over
Fabrics 1.1 specification, the default IANA port number for a NVMe/TCP
discovery controller is 8009. But at the same time, it also clearly
states that NVMe/TCP I/O controllers should not use TCP port number
8009, but may instead use 4420 as the default here.

So make sure to fill these values appropriately, and pass it down.

Signed-off-by: Martin George <marting@netapp.com>
3 years agonvme-print: fix 'nvme list' segfault if controller is unavailable
Martin George [Thu, 5 Aug 2021 12:31:24 +0000 (18:01 +0530)]
nvme-print: fix 'nvme list' segfault if controller is unavailable

Check if the controller is available before dereferencing the
controller attributes.

Signed-off-by: Martin George <marting@netapp.com>
3 years agoBug fix unsigned int and int should use 64bit api for json-c
Steven Seungcheol Lee [Mon, 2 Aug 2021 07:00:35 +0000 (16:00 +0900)]
Bug fix unsigned int and int should use 64bit api for json-c

unsigned int should use json_object_new_uint64(json-c >= 0.14-20200419)
    Error examples
    nsze    : 0xe8e088b0
    {
      "nsze":-387938128
    }
    After fix this
    {
      "nsze":3907029168
    }
json_object_add_value_int also should use json_object_new_int64
    since util/json.h support long long type, and other codes are using it for 64bit values

Signed-off-by: Steven Seungcheol Lee <sc108.lee@samsung.com>
3 years agoMerge branch 'master' of https://github.com/michael-gebis/nvme-cli into michael-gebis...
Keith Busch [Fri, 6 Aug 2021 20:07:26 +0000 (13:07 -0700)]
Merge branch 'master' of https://github.com/michael-gebis/nvme-cli into michael-gebis-master

3 years agoAdd Identify CNS 0x18 Domain List Support
Gollu Appalanaidu [Mon, 19 Jul 2021 13:57:47 +0000 (19:27 +0530)]
Add Identify CNS 0x18 Domain List Support

Signed-off-by: Gollu Appalanaidu <anaidu.gollu@samsung.com>
3 years agonvme: support ns generic device to submit_io
Minwoo Im [Fri, 9 Jul 2021 08:50:25 +0000 (17:50 +0900)]
nvme: support ns generic device to submit_io

Retrieve `logical_block_size` sysfs attribute when I/O subcommand(e.g.,
read, write, ...) is given instead requesting BLKSSZGET ioctl to the
generic device which is not supported.

Signed-off-by: Minwoo Im <minwoo.im.dev@gmail.com>
4 years agostrip trailing spaces from fabrics output
Keith Busch [Tue, 3 Aug 2021 16:45:22 +0000 (09:45 -0700)]
strip trailing spaces from fabrics output

Link: https://github.com/linux-nvme/nvme-cli/issues/1117
Signed-off-by: Keith Busch <kbusch@kernel.org>
4 years agonvme: Bug fix default data_len used if no argument given
Steven Seungcheol Lee [Tue, 3 Aug 2021 04:47:13 +0000 (13:47 +0900)]
nvme: Bug fix default data_len used if no argument given

current logic ignore given data by user
so make priority to use user argument first

this change make available vendor specific command on set-feature, get-feature with data_len

Signed-off-by: Steven Seungcheol Lee <sc108.lee@samsung.com>
4 years agoremove string representation timestamp set_feature
Keith Busch [Tue, 3 Aug 2021 14:41:58 +0000 (07:41 -0700)]
remove string representation timestamp set_feature

Require the integer representation be provided for this to avoid any
mismatched sizing problems.

Signed-off-by: Keith Busch <kbusch@kernel.org>
4 years agofix set_feature formatting
Keith Busch [Tue, 3 Aug 2021 14:23:21 +0000 (07:23 -0700)]
fix set_feature formatting

spaces to tabs, per linux coding style.

Signed-off-by: Keith Busch <kbusch@kernel.org>
4 years agonvme: add capacity management command support
Gollu Appalanaidu [Thu, 1 Jul 2021 18:52:11 +0000 (00:22 +0530)]
nvme: add capacity management command support

Host software issues this Capacity Management command to
configure/Create/Delete Endurance Groups and NVM Sets in an
NVM subsystem.

Signed-off-by: Gollu Appalanaidu <anaidu.gollu@samsung.com>
Signed-off-by: Karthik Balan <karthik.b82@samsung.com>
4 years agoMerge branch 'master' into mi_features
Nate Roiger [Mon, 26 Jul 2021 11:54:13 +0000 (06:54 -0500)]
Merge branch 'master' into mi_features

4 years agogen-hostnqn: Remove UUID validation heuristic
Daniel Wagner [Fri, 23 Jul 2021 10:32:15 +0000 (12:32 +0200)]
gen-hostnqn: Remove UUID validation heuristic

The validation heuristic is getting triggered for valid system UUID
such as 37383638-3330-4d32-3237-33353032394e. The only UUID validation
is already implemented. Remove the heuristic as it blocks valid use
UUIDs and doesn't protect from misuse anyway.

Signed-off: Daniel Wagner <dwagner@suse.de>

4 years agoBash completions
Michael Gebis [Tue, 20 Jul 2021 01:03:56 +0000 (18:03 -0700)]
Bash completions

Added support for latest commands
Added support for latest plugins

4 years agomicron-nvme.h: formatting
Michael Gebis [Tue, 20 Jul 2021 05:40:50 +0000 (22:40 -0700)]
micron-nvme.h: formatting

4 years agonvme: add multiple update detected result value in fw commit
Gollu Appalanaidu [Sat, 3 Jul 2021 18:52:36 +0000 (00:22 +0530)]
nvme: add multiple update detected result value in fw commit

Add Multiple Update Detected (MUD) field in FW Commit command
CQE CDW0 as per NVMe 2.0 Spec.

Signed-off-by: Gollu Appalanaidu <anaidu.gollu@samsung.com>
4 years agofix boot partitions register show in human readable format
Gollu Appalanaidu [Tue, 20 Jul 2021 08:00:04 +0000 (13:30 +0530)]
fix boot partitions register show in human readable format

If BPINFO or BPRSEL or BPMBL are zero means it doesn't indicates
that boot parttitions feature is not supported. CAP registers BPS
bit indicatates this feature support, fix that.

Signed-off-by: Gollu Appalanaidu <anaidu.gollu@samsung.com>
4 years agoChange IOCTL for read, write and compare commands
Gollu Appalanaidu [Mon, 12 Jul 2021 13:37:19 +0000 (19:07 +0530)]
Change IOCTL for read, write and compare commands

Change the IOCTL and depricate SQE structure for NVM commands
Read, Write and Compare Commands to add support for the Storage
Tag field (CDW2 and CDW3).

Remove the unsed nvme_user_io structure and NVME_IOCTL_SUBMIT_IO.

Signed-off-by: Gollu Appalanaidu <anaidu.gollu@samsung.com>
4 years agofix code style
Keith Busch [Mon, 19 Jul 2021 19:56:23 +0000 (12:56 -0700)]
fix code style

I accidently inserted a newline where it should not have been when
applying the previous patch.

Signed-off-by: Keith Busch <kbusch@kernel.org>
4 years agonvme-topology: fix controller check in scan_subsystem()
Martin George [Mon, 19 Jul 2021 17:07:48 +0000 (10:07 -0700)]
nvme-topology: fix controller check in scan_subsystem()

Fix the current check in scan_subsystem() so that it iterates
through all the available controllers till it gets a 'live'
controller for that namespace.

Link: https://github.com/linux-nvme/nvme-cli/pull/1101
Fixes: ce9d818 ("nvme-topology: scan all controllers in scan_subsystem()")
Signed-off-by: Martin George <marting@netapp.com>
Reviewed-by: Daniel Wagner <dwagner@suse.de>
Signed-off-by: Keith Busch <kbusch@kernel.org>
4 years agoid-nvmset: Fixed typo
Michael Gebis [Thu, 15 Jul 2021 22:02:30 +0000 (15:02 -0700)]
id-nvmset: Fixed typo

4 years agoUse PRIx64 format specifier instead of lX for more portability.
Sushrut Shirole [Tue, 13 Jul 2021 22:02:53 +0000 (15:02 -0700)]
Use PRIx64 format specifier instead of lX for more portability.

Signed-off-by: Sushrut Shirole <sushrutshirole@gmail.com>
4 years agointel_nvme: fixed typo
FrancisPravin [Mon, 12 Jul 2021 14:35:15 +0000 (20:05 +0530)]
intel_nvme: fixed typo

4 years agowdc-nvme: fix uclibc compilation.
Sushrut Shirole [Fri, 9 Jul 2021 21:22:20 +0000 (14:22 -0700)]
wdc-nvme: fix uclibc compilation.

4 years agonvme add Storage Tag Check field in NVM Commands
Gollu Appalanaidu [Fri, 9 Jul 2021 08:19:58 +0000 (13:49 +0530)]
nvme add Storage Tag Check field in NVM Commands

Add Storage Tag Check(STC) field in Write, Read, Compare,
Write Zeroes and Verify commands

Signed-off-by: Gollu Appalanaidu <anaidu.gollu@samsung.com>
4 years agonvme: add CDW2 and CDW3 support for Write Zeroes and Verify Command
Gollu Appalanaidu [Thu, 8 Jul 2021 16:25:22 +0000 (21:55 +0530)]
nvme: add CDW2 and CDW3 support for Write Zeroes and Verify Command

Added support for the Variable Sized Expected Logical Block Storage Tag(ELBST)
and Expected Logical Block Reference Tag (ELBRT), CDW2 and CDW3 (00:47) bits
for NVM commands Write Zeroes and Verify commands.

Signed-off-by: Gollu Appalanaidu <anaidu.gollu@samsung.com>
4 years agonvme: add verify command man page
Gollu Appalanaidu [Tue, 6 Jul 2021 20:08:23 +0000 (01:38 +0530)]
nvme: add verify command man page

Signed-off-by: Gollu Appalanaidu <anaidu.gollu@samsung.com>
4 years agonvme: style fix
Gollu Appalanaidu [Thu, 1 Jul 2021 18:57:37 +0000 (00:27 +0530)]
nvme: style fix

Signed-off-by: Gollu Appalanaidu <anaidu.gollu@samsung.com>
4 years ago[NVMe CLI] Add capability for unique plugin version
Jeff Lien [Fri, 18 Jun 2021 15:03:33 +0000 (10:03 -0500)]
[NVMe CLI] Add capability for unique plugin version

4 years agoAdd Timeout Parameter for Zone Management Commands
Brandon Paupore [Wed, 23 Jun 2021 17:31:22 +0000 (12:31 -0500)]
Add Timeout Parameter for Zone Management Commands

Signed-off-by: Brandon Paupore <brandon.paupore@wdc.com>
4 years agonvme: add status to error number for id_uuid and verify_cmd
Gollu Appalanaidu [Mon, 14 Jun 2021 19:23:20 +0000 (00:53 +0530)]
nvme: add status to error number for id_uuid and verify_cmd

Signed-off-by: Gollu Appalanaidu <anaidu.gollu@samsung.com>
4 years agonvme: extend existing id ctrl parameters as per 2.0
Gollu Appalanaidu [Sun, 13 Jun 2021 14:00:02 +0000 (19:30 +0530)]
nvme: extend existing id ctrl parameters as per 2.0

Signed-off-by: Gollu Appalanaidu <anaidu.gollu@samsung.com>
4 years agonvme: add the status codes from 2.0 spec
Gollu Appalanaidu [Sat, 12 Jun 2021 10:53:07 +0000 (16:23 +0530)]
nvme: add the status codes from 2.0 spec

Signed-off-by: Gollu Appalanaidu <anaidu.gollu@samsung.com>
4 years agonvme: add get log page 2.0 spec fields
Gollu Appalanaidu [Sat, 12 Jun 2021 09:20:14 +0000 (14:50 +0530)]
nvme: add get log page 2.0 spec fields

Add the Offset Type (OT) and Command Set Identifier (CSI) in
get_log and to nvme_get_log14 function as per the Spec 2.0.

Based on the requirement this can be added for the nvme_get_log13
and nvme_get_log when implementing specific log pages that use
these two parameters.

Signed-off-by: Gollu Appalanaidu <anaidu.gollu@samsung.com>
4 years agonvme: add identify controller structure 2.0 spec. fields
Gollu Appalanaidu [Fri, 11 Jun 2021 21:24:56 +0000 (02:54 +0530)]
nvme: add identify controller structure 2.0 spec. fields

Signed-off-by: Gollu Appalanaidu <anaidu.gollu@samsung.com>
4 years agonvme-topology: scan all controllers in scan_subsystem()
Hannes Reinecke [Tue, 22 Jun 2021 11:48:36 +0000 (13:48 +0200)]
nvme-topology: scan all controllers in scan_subsystem()

When a controller is unavailable or resetting during scan_subsystem()
we should be checking all available controllers for this namespace
to avoid a spurious failure.

Signed-off-by: Hannes Reinecke <hare@suse.de>
4 years agonvme-ioctl: return -1 on failure from nvme_get_nsid()
Hannes Reinecke [Tue, 22 Jun 2021 11:40:23 +0000 (13:40 +0200)]
nvme-ioctl: return -1 on failure from nvme_get_nsid()

If the call to 'fstat' fails we should be returning '-1' (as the
errno is already set by fstat()) to be compliant with the return
values from 'ioctl()'.

Signed-off-by: Hannes Reinecke <hare@suse.de>
4 years agonvme: fix the fw-log structure and show fw log changes
Gollu Appalanaidu [Fri, 18 Jun 2021 18:07:53 +0000 (23:37 +0530)]
nvme: fix the fw-log structure and show fw log changes

Signed-off-by: Gollu Appalanaidu <anaidu.gollu@samsung.com>
4 years agonvme: add missing endianness annotations
Gollu Appalanaidu [Thu, 17 Jun 2021 17:39:58 +0000 (23:09 +0530)]
nvme: add missing endianness annotations

Signed-off-by: Gollu Appalanaidu <anaidu.gollu@samsung.com>