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>
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>
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
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
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.
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>
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>
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.
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.
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.
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>
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.
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.
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()'.
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:
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
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.
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.
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>
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.