]> www.infradead.org Git - users/sagi/nvme-cli.git/log
users/sagi/nvme-cli.git
4 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>
4 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>
4 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

4 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>
4 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

4 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>
4 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>
4 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>
4 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>
4 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

4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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

4 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

4 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>
4 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>
4 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>
4 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

4 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

4 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.

4 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>
4 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>
4 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>
4 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>
4 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

4 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>
4 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>
4 years agoPrint device name on connect
Martin Belanger [Fri, 18 Jun 2021 13:01:23 +0000 (09:01 -0400)]
Print device name on connect

4 years agonvme: fix errno for non nvme device return errors
Gollu Appalanaidu [Tue, 4 May 2021 15:54:52 +0000 (21:24 +0530)]
nvme: fix errno for non nvme device return errors

Fix the shell return error numbers(errno) in overall
nvme.c file.

Signed-off-by: Gollu Appalanaidu <anaidu.gollu@samsung.com>
4 years agonvme: Fix to print get and set feature hex digits correct width
Tokunori Ikegami [Thu, 27 May 2021 18:11:29 +0000 (03:11 +0900)]
nvme: Fix to print get and set feature hex digits correct width

Previously 2 hex digits not printed as "0x" was included the width specified.
To resolve this increase 2 digits number more if the value is not zero.

Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com>
4 years agonvme: add the LBA format upper in Format NVM Command
Gollu Appalanaidu [Sun, 6 Jun 2021 19:23:59 +0000 (00:53 +0530)]
nvme: add the LBA format upper in Format NVM Command

Add the LBAFU in FormatNVM command as per the NVMe 2.0
Base Specification.

Signed-off-by: Gollu Appalanaidu <anaidu.gollu@samsung.com>
4 years agonvme-print: sanitize log style fix
Gollu Appalanaidu [Sat, 29 May 2021 18:01:41 +0000 (23:31 +0530)]
nvme-print: sanitize log style fix

Signed-off-by: Gollu Appalanaidu <anaidu.gollu@samsung.com>
4 years agofabrics: skip connect if transport type doesn't match
Martin George [Sat, 5 Jun 2021 09:46:26 +0000 (15:16 +0530)]
fabrics: skip connect if transport type doesn't match

Discovery log page data may include records belonging to different
transport types. If during a nvme connect-all, a connect is attempted
on a record that doesn't match the transport type passed here, it
would end up in a connect failure for that record. For e.g. one would
see the below error if a connect is attempted on a tcp record but the
transport type passed here is 'fc' and its associated parameters:

nvme_tcp: malformed src address passed: nn-0xXXXX:pn-0xYYYY

Fix this by proceeding with the connect only if the appropriate
transport type matches a given record during the connect-all.

Signed-off-by: Martin George <marting@netapp.com>
4 years agonvme: update passthru commands man page with latency parameter details
Gollu Appalanaidu [Fri, 4 Jun 2021 05:31:54 +0000 (11:01 +0530)]
nvme: update passthru commands man page with latency parameter details

Signed-off-by: Gollu Appalanaidu <anaidu.gollu@samsung.com>
4 years agovs-drive-info command opcode change for M5407 drives
Hanumanthu H [Fri, 4 Jun 2021 10:18:58 +0000 (15:48 +0530)]
vs-drive-info command opcode change for M5407 drives

4 years agoSupport micron vs-smart-add-log option for M54XX drives
Hanumanthu H [Tue, 1 Jun 2021 14:40:51 +0000 (20:10 +0530)]
Support micron vs-smart-add-log option for M54XX drives

4 years agonvme: add json, binary and human readable output format for id iocs
Gollu Appalanaidu [Fri, 28 May 2021 18:11:33 +0000 (23:41 +0530)]
nvme: add json, binary and human readable output format for id iocs

Signed-off-by: Gollu Appalanaidu <anaidu.gollu@samsung.com>
4 years agonvme: add persistent event log action field invalid check
Gollu Appalanaidu [Thu, 27 May 2021 06:32:28 +0000 (12:02 +0530)]
nvme: add persistent event log action field invalid check

Signed-off-by: Gollu Appalanaidu <anaidu.gollu@samsung.com>
4 years agonvme: add zone desc changed notice async event
Gollu Appalanaidu [Fri, 28 May 2021 13:52:45 +0000 (19:22 +0530)]
nvme: add zone desc changed notice async event

Add the Zone Descriptor Changed Notices in get feature
human readble output for the Async Event config feature
(FID = 0x0B) as per the TP4053 Zoned Namespaces

Signed-off-by: Gollu Appalanaidu <anaidu.gollu@samsung.com>
4 years agonvme: add optional copy format support id ctrl field
Gollu Appalanaidu [Fri, 28 May 2021 05:10:40 +0000 (10:40 +0530)]
nvme: add optional copy format support id ctrl field

Add the OCFS field in Identify Controller Structure, as per the
Ratified TP 4065b (Simple Copy Command).

Signed-off-by: Gollu Appalanaidu <anaidu.gollu@samsung.com>
4 years agonvme: add lsp and uuid index invalid value checks in get log
Gollu Appalanaidu [Thu, 27 May 2021 06:23:40 +0000 (11:53 +0530)]
nvme: add lsp and uuid index invalid value checks in get log

Add the invalid LSP and UUID Index value checks as per the field
lengths. Refactor the get_log function.

Signed-off-by: Gollu Appalanaidu <anaidu.gollu@samsung.com>
4 years agonvme: add latency parameter for passthru commands
Gollu Appalanaidu [Thu, 3 Jun 2021 16:45:41 +0000 (22:15 +0530)]
nvme: add latency parameter for passthru commands

Signed-off-by: Gollu Appalanaidu <anaidu.gollu@samsung.com>
4 years agowdc-nvme: fix the build failure
Gollu Appalanaidu [Thu, 3 Jun 2021 16:51:10 +0000 (22:21 +0530)]
wdc-nvme: fix the build failure

Signed-off-by: Gollu Appalanaidu <anaidu.gollu@samsung.com>
4 years agoAddressed review comments
Akhilesh RN [Thu, 27 May 2021 11:57:17 +0000 (17:27 +0530)]
Addressed review comments

4 years agoZN-350 - vs-fw-activate-history bug fix
Akhilesh RN [Wed, 26 May 2021 13:41:26 +0000 (19:11 +0530)]
ZN-350 - vs-fw-activate-history bug fix

4 years agoAdd --host-iface option
Martin Belanger [Thu, 20 May 2021 17:49:44 +0000 (13:49 -0400)]
Add --host-iface option

4 years agonvme-topology: no error message when openeing of controller fails
Daniel Wagner [Wed, 2 Jun 2021 13:42:42 +0000 (15:42 +0200)]
nvme-topology: no error message when openeing of controller fails

scan_ctrl() tries to open the controller device but this operation is
expected to fail for fabric setups when a path is down. This can lead
to the situation where the subsystem is in a healthy state, e.g. at
least one path is in live state. In this scenario a failure is printed
although everything is fine.

This is especially a problem for NVMe/TCP configs where the controller
remains in 'connecting' state for 10 minutes following a path
down. All that time 'nvme list' ends up in errors and that's a major
irritant for end users. This also makes CI automation more complex
than needed.

Just drop the error message as we have other error paths in this
function where we just bail out if they fail without printing an
error message.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
4 years agodefault flush to use block device nsid
Keith Busch [Tue, 1 Jun 2021 14:01:44 +0000 (07:01 -0700)]
default flush to use block device nsid

Kernel 5.13 added checks to ensure the ioctl path can't be abused to
access a different namespace than the one user space has permission to
open. This unfortunately breaks the all-nsid flush usage, so user
tooling needs to default to the device's namespace id.

Link: https://lore.kernel.org/linux-nvme/20210518144249.GE2709569@dhcp-10-100-145-180.wdc.com/T/#t
Link: https://github.com/linux-nvme/nvme-cli/issues/1066
Signed-off-by: Keith Busch <kbusch@kernel.org>
4 years agoZN-350 - wdc purge command bug fix
Akhilesh RN [Fri, 28 May 2021 10:09:59 +0000 (15:39 +0530)]
ZN-350 - wdc purge command bug fix

4 years agojson format support for micron vs-drive-info command
Hanumanthu H [Thu, 27 May 2021 08:46:23 +0000 (14:16 +0530)]
json format support for micron vs-drive-info command

4 years agozns: fix get_zdes_bytes return value in failed cases
Gollu Appalanaidu [Tue, 18 May 2021 04:25:55 +0000 (09:55 +0530)]
zns: fix get_zdes_bytes return value in failed cases

get_zdes_bytes shall return constant value in failed cases in
order to catch in called function

Check if the get_zdes_bytes returned proper data length or not.

Signed-off-by: Gollu Appalanaidu <anaidu.gollu@samsung.com>
4 years agocorrected-returns-in-sanitize-log
James Kahn [Wed, 26 May 2021 18:22:34 +0000 (14:22 -0400)]
corrected-returns-in-sanitize-log

4 years agonvme: fix parameter sizes
Gollu Appalanaidu [Wed, 26 May 2021 06:29:19 +0000 (11:59 +0530)]
nvme: fix parameter sizes

Fix the parameter sizes as per the data type in complete
nvme.c file.

Signed-off-by: Gollu Appalanaidu <anaidu.gollu@samsung.com>
4 years agofabrics: add fast_io_fail_tmo option
Sagi Grimberg [Mon, 17 May 2021 18:26:16 +0000 (11:26 -0700)]
fabrics: add fast_io_fail_tmo option

Option to fail fast I/O when connecting to a controller. It is useful
to set a fast-fail timeout for nvme in case upper layer SW wants to
detect unresponsive controllers early (e.g. mdraid).

Reviewed-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Sagi Grimberg <sagi@grimberg.me>
Signed-off-by: Keith Busch <kbusch@kernel.org>
4 years agosystemd/nvmf-autoconnect.service: load nvme-fabrics before autoconnect
Sagi Grimberg [Wed, 26 May 2021 07:25:15 +0000 (00:25 -0700)]
systemd/nvmf-autoconnect.service: load nvme-fabrics before autoconnect

Upon boot nvme-fabrics needs to be loaded, so make sure to load
it before executing ExecStart. The driver will know to request
the transport module according to the transport parameter.

Signed-off-by: Sagi Grimberg <sagi@grimberg.me>
4 years agonvme: add json output format for list_ns
Gollu Appalanaidu [Sun, 16 May 2021 04:19:02 +0000 (09:49 +0530)]
nvme: add json output format for list_ns

Signed-off-by: Gollu Appalanaidu <anaidu.gollu@samsung.com>
4 years agonvme-cli: Add lsi option for get-log command
Tokunori Ikegami [Tue, 27 Oct 2020 14:56:43 +0000 (23:56 +0900)]
nvme-cli: Add lsi option for get-log command

Previously lsi is set as 0 as hard coded value by the get-log command.
To set this parameter by the command add lsi option for the command.

Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com>
4 years agozns: style fixes in zns plugin
Gollu Appalanaidu [Tue, 18 May 2021 04:19:20 +0000 (09:49 +0530)]
zns: style fixes in zns plugin

Signed-off-by: Gollu Appalanaidu <anaidu.gollu@samsung.com>
4 years agonvme-ioctl: remove unused function nvme_identify_ns_list
Gollu Appalanaidu [Sat, 15 May 2021 17:58:58 +0000 (23:28 +0530)]
nvme-ioctl: remove unused function nvme_identify_ns_list

Signed-off-by: Gollu Appalanaidu <anaidu.gollu@samsung.com>
4 years agonvme: add json output format for list_crl
Gollu Appalanaidu [Sun, 16 May 2021 07:20:15 +0000 (12:50 +0530)]
nvme: add json output format for list_crl

Signed-off-by: Gollu Appalanaidu <anaidu.gollu@samsung.com>
4 years agonvme: fix csi data type in list_ns
Gollu Appalanaidu [Sun, 16 May 2021 03:51:46 +0000 (09:21 +0530)]
nvme: fix csi data type in list_ns

Command Set Identifier (CSI) data type is 8 bits, fix that.

Signed-off-by: Gollu Appalanaidu <anaidu.gollu@samsung.com>
4 years agonvme: add uuid index in get and set features command
Gollu Appalanaidu [Sat, 15 May 2021 18:59:37 +0000 (00:29 +0530)]
nvme: add uuid index in get and set features command

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