Hannes Reinecke [Mon, 15 Nov 2021 11:29:23 +0000 (12:29 +0100)]
nvme: document 'config-file' commandline option
The 'config-file' commandline option is not documented in the
man pages. And we should reference the config file as a 'ghost'
file in the rpm spec to ensure it gets removed together with the
nvme-cli package.
Hannes Reinecke [Wed, 17 Nov 2021 10:00:04 +0000 (11:00 +0100)]
Compability for older json-c releases
commit 0b63a8b7cfb7 ("Check json-c libversion, recover commit d127537")
broke building on older releases when using 'make'.
As the original issue was about json-c not being able to parse full 64
numbers this patch separates out 32 and 64 json objects and adds a warning
if an overflow occurs on older json-c releases.
Daniel Wagner [Tue, 16 Nov 2021 21:25:45 +0000 (22:25 +0100)]
build: Update json-c dependencies
With commit 0b63a8b7cfb7 ("Check json-c libversion, recover commit d127537") with increased the minimum version of json-c. Let's update
the meson wrapper.
While at it also update the min version in meson.build to 0.14.
Jeff Lien [Wed, 29 Sep 2021 14:50:47 +0000 (09:50 -0500)]
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>
[dwagner: ported from nvme-cli-monolithic] Signed-off-by: Daniel Wagner <wagner@suse.de>
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
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>
[dwagner: - ported from nvme-cli-monolithic
- fixed indention] Signed-off-by: Daniel Wagner <dwagner@suse.de>
add identify endurance group list (cns 0x19) support
Signed-off-by: Gollu Appalanaidu <anaidu.gollu@samsung.com>
[dwagner: ported from monolitic, removed nvme-ioctl.h/nvme.h change,
part of libnvme] Signed-off-by: Daniel Wagner <dwagner@suse.de>
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>
[dwagmer: dropped nvme.h changes, part of libnvme] Signed-off-by: Daniel Wagner <dwagner@suse.de>
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>
[dwagner: - ported from monolithic, nvme.h changes,
part of libnvme
- merged in da30c629f0f4 ("Add function to get specific
feature buffer lengths")] Signed-off-by: Daniel Wagner <dwagner@suse.de>
Signed-off-by: Gollu Appalanaidu <anaidu.gollu@samsung.com>
[dwagner: ported from monolithic, droped nvme-ioctl changes,
part of libnvme] Signed-off-by: Daniel Wagner <dwagner@suse.de>
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>
[dwagner: ported from monolithic, droped nvme-ioctl changes,
part of libnvme] Signed-off-by: Daniel Wagner <dwagner@suse.de>
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>
[dwagner: ported from monolithic, droped nvme-ioctl changes,
part of libnvme] Signed-off-by: Daniel Wagner <dwagner@suse.de>
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>
[dwagner: ported from monolitic branch and updated context] Signed-off-by: Daniel Wagner <dwagner@suse.de>
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>
[dwagner: ported from monolitic, removed nvme.h change, part of
libnvme]
qiSigned-off-by: Daniel Wagner <dwagner@suse.de>
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
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.
While at it, fix bug (unallocated pointer free)
Signed-off-by: Steven Seungcheol Lee <sc108.lee@samsung.com>
[dwagner: ported from monolitic branch and updated context] Signed-off-by: Daniel Wagner <dwagner@suse.de>
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>
[dwagner: removed nvme-ioct.c changes, part of libnvme] Signed-off-by: Daniel Wagner <dwagner@suse.de>
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>
Signed-off-by: Gollu Appalanaidu <anaidu.gollu@samsung.com>
[dwagner: removed nvme-ioctl.c changes, part of libnvme] Signed-off-by: Daniel Wagner <dwagner@suse.de>
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.
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
[dwagner: updated resv-report command] Signed-off-by: Daniel Wagner <dwagner@suse.de>
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>
[dwagner: removed nvme-ioctl changes; part of libnvme] Signed-off-by: Daniel Wagner <dwagner@suse.de>
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.
Signed-off-by: Gollu Appalanaidu <anaidu.gollu@samsung.com>
[dwagner: removed nvme-ioctl changes, part of libnvme] Signed-off-by: Daniel Wagner <dwagner@suse.de>
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>
[dwagner: removed nvme-ioctl.c changes, these are part of libnvme] Signed-off-by: Daniel Wagner <dwagner@suse.de>
fixthething [Sat, 6 Mar 2021 16:56:41 +0000 (11:56 -0500)]
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.
Daniel Wagner [Mon, 8 Nov 2021 09:42:02 +0000 (10:42 +0100)]
build: Use CONFIG_JSONC consistently
The config flag for json-c hasn't been updated to the consistent
naming scheme everywhere. Let's use prefix it with CONFIG and use the
correct library name which is json-c.
Daniel Wagner [Tue, 2 Nov 2021 12:42:45 +0000 (13:42 +0100)]
workflow: Disable tests for libnvme
The testsuite for nvme-cli is already disable because they are not
ready to be used in our CI setup. The same seems to be the case for
libnvme. The Python tests are failing at this point. Let's disable
them until we figured out how to enable them safely for CI.
Daniel Wagner [Tue, 2 Nov 2021 12:32:47 +0000 (13:32 +0100)]
build: Prefix configuration switches
Although we decided to depend hard on json-c and libuuid, we still are
able to build and link without those libraries. Let's keep this
working for a little while longer before we pull the plug.