Compare commits

...

No commits in common. "c8" and "c9-beta" have entirely different histories.
c8 ... c9-beta

33 changed files with 1049 additions and 1151 deletions
.gitignore.nvme-cli.metadata
SOURCES
0001-fabrics-fix-nvme-connect-segfault-if-transport-type-.patch0001-netapp-ontapdev-add-verbose-output.patch0002-fabrics-fix-a-buffer-overrun.patch0002-netapp-ontapdev-doc-add-verbose-details.patch0003-bash-Fix-nvme-completion.patch0003-netapp-ontapdev-fix-fw-version-handling.patch0004-netapp-ontapdev-fix-JSON-output-for-nsze-nuse.patch0004-nvme-do-not-leak-an-open-file-handle.patch0005-nvme-netapp-update-err-messages.patch0005-nvme-topology-fix-memory-leaks-in-nvme_logical_block.patch0006-netapp-smdev-remove-redundant-code.patch0006-nvme-cli-nvmf-connect-.service-Remove-matching-from-.patch0007-netapp-smdev-add-verbose-output.patch0007-nvme-cli-Make-connect-all-matching-be-case-insensiti.patch0008-netapp-smdev-doc-add-verbose-details.patch0008-nvme-cli-nvme-gen-hostnqn-use-partition-UUID-on-IBM-.patch0009-Add-new-events-support-in-PEL.patch0009-nvme-set-eds-to-true-if-controller-supports-128-bit-.patch0010-nvme-cli-Decode-Supported-Events-Bitmap-in-PEL-heade.patch0011-nvme-cli-Adds-event-number-in-persistent-event-entri.patch0012-nvme-cli-Adds-readable-firmware-level-in-persistent.patch0013-nvme-cli-Add-support-set-feature-event-in-PEL.patch0014-nvme-cli-Add-support-Telemetry-CRT-in-PEL.patch0015-fix-firmware-log-page-frs-variable-sign.patch0016-fix-file-permissions-nvme-print.c.patch0017-fabrics-Fix-ordering-for-auto-connect-services.patch0018-nvme-fix-rnlpt-to_string-values.patch99-nvme-nbft-connect.sh99-nvme-nbft-no-ignore-carrier.confnvme-cli-makefile-dont-install-host-params-patch
SPECS

2
.gitignore vendored
View File

@ -1 +1 @@
SOURCES/v1.16.tar.gz
SOURCES/nvme-cli-2.11.tar.gz

1
.nvme-cli.metadata Normal file
View File

@ -0,0 +1 @@
e3a599bd67057c5bb9a8e7e621d439b9fbcaf7b6 SOURCES/nvme-cli-2.11.tar.gz

View File

@ -1,32 +0,0 @@
From f74ac1b841b0aae73969debaed0444f0ecb03dba Mon Sep 17 00:00:00 2001
From: Martin George <marting@netapp.com>
Date: Mon, 15 Nov 2021 16:00:47 +0530
Subject: [PATCH] fabrics: fix 'nvme connect' segfault if transport type is
omitted
Check if the transport type is available before dereferencing
it in discovery_trsvcid().
Fixes: 362c90f ("fabrics: add default port number for NVMe/TCP I/O
controllers")
Signed-off-by: Martin George <marting@netapp.com>
---
fabrics.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/fabrics.c b/fabrics.c
index d691191..adca89b 100644
--- a/fabrics.c
+++ b/fabrics.c
@@ -1070,6 +1070,8 @@ static void set_discovery_kato(struct fabrics_config *cfg)
static void discovery_trsvcid(struct fabrics_config *fabrics_cfg, bool discover)
{
+ if (!fabrics_cfg->transport)
+ return;
if (!strcmp(fabrics_cfg->transport, "tcp")) {
if (discover) {
/* Default port for NVMe/TCP discovery controllers */
--
2.27.0

View File

@ -0,0 +1,239 @@
From ab841e9a58688e64c5ce50e6159f34fc1a414c48 Mon Sep 17 00:00:00 2001
From: Martin George <marting@netapp.com>
Date: Mon, 11 Nov 2024 22:08:39 +0530
Subject: [PATCH] netapp-ontapdev: add verbose output
Add a vebose output option to display additional information of
ONTAP devices on the host.
Signed-off-by: Martin George <marting@netapp.com>
---
plugins/netapp/netapp-nvme.c | 141 +++++++++++++++++++++++++++++++----
1 file changed, 126 insertions(+), 15 deletions(-)
diff --git a/plugins/netapp/netapp-nvme.c b/plugins/netapp/netapp-nvme.c
index 9f05ffc5..cebd019e 100644
--- a/plugins/netapp/netapp-nvme.c
+++ b/plugins/netapp/netapp-nvme.c
@@ -119,6 +119,42 @@ static void netapp_get_ns_size(char *size, unsigned long long *lba,
sprintf(size, "%.2f%sB", nsze, s_suffix);
}
+static void netapp_get_ns_attrs(char *size, char *used, char *blk_size,
+ char *version, unsigned long long *lba,
+ struct nvme_id_ctrl *ctrl, struct nvme_id_ns *ns)
+{
+ __u8 lba_index;
+
+ nvme_id_ns_flbas_to_lbaf_inuse(ns->flbas, &lba_index);
+ *lba = 1ULL << ns->lbaf[lba_index].ds;
+
+ /* get the namespace size */
+ double nsze = le64_to_cpu(ns->nsze) * (*lba);
+ const char *s_suffix = suffix_si_get(&nsze);
+
+ sprintf(size, "%.2f%sB", nsze, s_suffix);
+
+ /* get the namespace utilization */
+ double nuse = le64_to_cpu(ns->nuse) * (*lba);
+ const char *u_suffix = suffix_si_get(&nuse);
+
+ sprintf(used, "%.2f%sB", nuse, u_suffix);
+
+ /* get the namespace block size */
+ long long addr = 1LL << ns->lbaf[lba_index].ds;
+ const char *l_suffix = suffix_binary_get(&addr);
+
+ sprintf(blk_size, "%u%sB", (unsigned int)addr, l_suffix);
+
+ /* get the ontap version */
+ int i, max = sizeof(ctrl->fr);
+
+ memcpy(version, ctrl->fr, sizeof(ctrl->fr));
+ /* strip trailing whitespaces */
+ for (i = max - 1; i >= 0 && version[i] == ' '; i--)
+ version[i] = '\0';
+}
+
static void ontap_labels_to_str(char *dst, char *src, int count)
{
int i;
@@ -235,7 +271,8 @@ static void netapp_smdevice_json(struct json_object *devices, char *devname,
static void netapp_ontapdevice_json(struct json_object *devices, char *devname,
char *vsname, char *nspath, int nsid, char *uuid,
- char *size, long long lba, long long nsze)
+ unsigned long long lba, char *version,
+ unsigned long long nsze, unsigned long long nuse)
{
struct json_object *device_attrs;
@@ -245,9 +282,10 @@ static void netapp_ontapdevice_json(struct json_object *devices, char *devname,
json_object_add_value_string(device_attrs, "Namespace_Path", nspath);
json_object_add_value_int(device_attrs, "NSID", nsid);
json_object_add_value_string(device_attrs, "UUID", uuid);
- json_object_add_value_string(device_attrs, "Size", size);
- json_object_add_value_int(device_attrs, "LBA_Data_Size", lba);
- json_object_add_value_int(device_attrs, "Namespace_Size", nsze);
+ json_object_add_value_uint64(device_attrs, "LBA_Data_Size", lba);
+ json_object_add_value_uint64(device_attrs, "Namespace_Size", nsze);
+ json_object_add_value_uint64(device_attrs, "UsedBytes", nuse);
+ json_object_add_value_string(device_attrs, "Version", version);
json_array_add_value_object(devices, device_attrs);
}
@@ -410,6 +448,66 @@ out:
json_free_object(root);
}
+static void netapp_ontapdevices_print_verbose(struct ontapdevice_info *devices,
+ int count, int format, const char *devname)
+{
+ char vsname[ONTAP_LABEL_LEN] = " ";
+ char nspath[ONTAP_NS_PATHLEN] = " ";
+ unsigned long long lba;
+ char size[128], used[128];
+ char blk_size[128], version[8];
+ char uuid_str[37] = " ";
+ int i;
+
+ char *formatstr = NULL;
+ char basestr[] =
+ "%s, Vserver %s, Path %s, NSID %d, UUID %s, %s, %s, %s, %s\n";
+ char columnstr[] = "%-16s %-25s %-50s %-4d %-38s %-9s %-9s %-9s %-9s\n";
+
+ if (format == NNORMAL)
+ formatstr = basestr;
+ else if (format == NCOLUMN) {
+ printf("%-16s %-25s %-50s %-4s %-38s %-9s %-9s %-9s %-9s\n",
+ "Device", "Vserver", "Namespace Path",
+ "NSID", "UUID", "Size", "Used",
+ "Format", "Version");
+ printf("%-16s %-25s %-50s %-4s %-38s %-9s %-9s %-9s %-9s\n",
+ "----------------", "-------------------------",
+ "--------------------------------------------------",
+ "----", "--------------------------------------",
+ "---------", "---------", "---------", "---------");
+ formatstr = columnstr;
+ }
+
+ for (i = 0; i < count; i++) {
+ if (devname && !strcmp(devname, basename(devices[i].dev))) {
+ /* found the device, fetch and print for that alone */
+ netapp_get_ns_attrs(size, used, blk_size, version,
+ &lba, &devices[i].ctrl, &devices[i].ns);
+ nvme_uuid_to_string(devices[i].uuid, uuid_str);
+ netapp_get_ontap_labels(vsname, nspath,
+ devices[i].log_data);
+
+ printf(formatstr, devices[i].dev, vsname, nspath,
+ devices[i].nsid, uuid_str, size, used,
+ blk_size, version);
+ return;
+ }
+ }
+
+ for (i = 0; i < count; i++) {
+ /* fetch info and print for all devices */
+ netapp_get_ns_attrs(size, used, blk_size, version,
+ &lba, &devices[i].ctrl, &devices[i].ns);
+ nvme_uuid_to_string(devices[i].uuid, uuid_str);
+ netapp_get_ontap_labels(vsname, nspath, devices[i].log_data);
+
+ printf(formatstr, devices[i].dev, vsname, nspath,
+ devices[i].nsid, uuid_str, size, used,
+ blk_size, version);
+ }
+}
+
static void netapp_ontapdevices_print_regular(struct ontapdevice_info *devices,
int count, int format, const char *devname)
{
@@ -472,7 +570,8 @@ static void netapp_ontapdevices_print_json(struct ontapdevice_info *devices,
char vsname[ONTAP_LABEL_LEN] = " ";
char nspath[ONTAP_NS_PATHLEN] = " ";
unsigned long long lba;
- char size[128];
+ char size[128], used[128];
+ char blk_size[128], version[8];
char uuid_str[37] = " ";
int i;
@@ -483,28 +582,33 @@ static void netapp_ontapdevices_print_json(struct ontapdevice_info *devices,
for (i = 0; i < count; i++) {
if (devname && !strcmp(devname, basename(devices[i].dev))) {
/* found the device, fetch info for that alone */
- netapp_get_ns_size(size, &lba, &devices[i].ns);
+ netapp_get_ns_attrs(size, used, blk_size, version,
+ &lba, &devices[i].ctrl, &devices[i].ns);
nvme_uuid_to_string(devices[i].uuid, uuid_str);
- netapp_get_ontap_labels(vsname, nspath, devices[i].log_data);
+ netapp_get_ontap_labels(vsname, nspath,
+ devices[i].log_data);
netapp_ontapdevice_json(json_devices, devices[i].dev,
vsname, nspath, devices[i].nsid,
- uuid_str, size, lba,
- le64_to_cpu(devices[i].ns.nsze));
+ uuid_str, lba, version,
+ le64_to_cpu(devices[i].ns.nsze),
+ le64_to_cpu(devices[i].ns.nuse));
goto out;
}
}
for (i = 0; i < count; i++) {
/* fetch info for all devices */
- netapp_get_ns_size(size, &lba, &devices[i].ns);
+ netapp_get_ns_attrs(size, used, blk_size, version,
+ &lba, &devices[i].ctrl, &devices[i].ns);
nvme_uuid_to_string(devices[i].uuid, uuid_str);
netapp_get_ontap_labels(vsname, nspath, devices[i].log_data);
netapp_ontapdevice_json(json_devices, devices[i].dev,
vsname, nspath, devices[i].nsid,
- uuid_str, size, lba,
- le64_to_cpu(devices[i].ns.nsze));
+ uuid_str, lba, version,
+ le64_to_cpu(devices[i].ns.nsze),
+ le64_to_cpu(devices[i].ns.nuse));
}
out:
@@ -776,6 +880,7 @@ static int netapp_ontapdevices(int argc, char **argv, struct command *command,
int num_ontapdevices = 0;
struct config {
+ bool verbose;
char *output_format;
};
@@ -784,6 +889,7 @@ static int netapp_ontapdevices(int argc, char **argv, struct command *command,
};
OPT_ARGS(opts) = {
+ OPT_FLAG("verbose", 'v', &cfg.verbose, "Increase output verbosity"),
OPT_FMT("output-format", 'o', &cfg.output_format, "Output Format: normal|json|column"),
OPT_END()
};
@@ -839,9 +945,14 @@ static int netapp_ontapdevices(int argc, char **argv, struct command *command,
}
if (num_ontapdevices) {
- if (fmt == NNORMAL || fmt == NCOLUMN)
- netapp_ontapdevices_print_regular(ontapdevices,
- num_ontapdevices, fmt, devname);
+ if (fmt == NNORMAL || fmt == NCOLUMN) {
+ if (argconfig_parse_seen(opts, "verbose"))
+ netapp_ontapdevices_print_verbose(ontapdevices,
+ num_ontapdevices, fmt, devname);
+ else
+ netapp_ontapdevices_print_regular(ontapdevices,
+ num_ontapdevices, fmt, devname);
+ }
else if (fmt == NJSON)
netapp_ontapdevices_print_json(ontapdevices,
num_ontapdevices, devname);
--
2.43.5

View File

@ -1,29 +0,0 @@
From ff8f9b6f59b574fda24a071fb0af4381c0cc6d9f Mon Sep 17 00:00:00 2001
From: Maurizio Lombardi <mlombard@redhat.com>
Date: Thu, 9 Dec 2021 12:21:51 +0100
Subject: [PATCH 1/6] fabrics: fix a buffer overrun
the uuid buffer size must be at least 37 bytes to avoid
corrupting the memory
Signed-off-by: Maurizio Lombardi <mlombard@redhat.com>
---
fabrics.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fabrics.c b/fabrics.c
index adca89b..0766729 100644
--- a/fabrics.c
+++ b/fabrics.c
@@ -883,7 +883,7 @@ static char *hostnqn_generate_systemd(void)
static char *hostnqn_read_dmi(void)
{
- char uuid[16];
+ char uuid[37];
char *ret = NULL;
if (uuid_from_dmi(uuid) < 0)
--
2.27.0

View File

@ -0,0 +1,39 @@
From a8d1efcaba26dd992d89da2e60999642d7ae8eca Mon Sep 17 00:00:00 2001
From: Martin George <marting@netapp.com>
Date: Wed, 13 Nov 2024 00:14:07 +0530
Subject: [PATCH] netapp-ontapdev-doc: add verbose details
Add verbose option details to the ontapdevices documentation.
Signed-off-by: Martin George <marting@netapp.com>
---
Documentation/nvme-netapp-ontapdevices.txt | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/Documentation/nvme-netapp-ontapdevices.txt b/Documentation/nvme-netapp-ontapdevices.txt
index fc28947d..e56bae57 100644
--- a/Documentation/nvme-netapp-ontapdevices.txt
+++ b/Documentation/nvme-netapp-ontapdevices.txt
@@ -8,7 +8,7 @@ nvme-netapp-ontapdevices - Display information about ONTAP devices
SYNOPSIS
--------
[verse]
-'nvme netapp ontapdevices' [--output-format=<fmt> | -o <fmt>]
+'nvme netapp ontapdevices' [--output-format=<fmt> | -o <fmt>] [--verbose | -v]
DESCRIPTION
-----------
@@ -22,6 +22,10 @@ OPTIONS
Set the reporting format to 'normal' (default), 'column', or
'json'. Only one output format can be used at a time.
+-v::
+--verbose::
+ Display additional information of ONTAP devices on the host.
+
EXAMPLES
--------
* Display information, in a column-based format, for ONTAP devices.
--
2.43.5

View File

@ -1,36 +0,0 @@
From 821935cccfcad6b18da78d42f9ddf49f4cbe0b8e Mon Sep 17 00:00:00 2001
From: Daniel Wagner <dwagner@suse.de>
Date: Thu, 9 Dec 2021 15:40:26 +0100
Subject: [PATCH 2/6] bash: Fix nvme completion
Signed-off-by: Daniel Wagner <dwagner@suse.de>
---
completions/bash-nvme-completion.sh | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/completions/bash-nvme-completion.sh b/completions/bash-nvme-completion.sh
index 41938d7..902da01 100644
--- a/completions/bash-nvme-completion.sh
+++ b/completions/bash-nvme-completion.sh
@@ -101,8 +101,7 @@ _cmds="list list-subsys id-ctrl id-ns \
connect disconnect disconnect-all gen-hostnqn \
show-hostnqn dir-receive dir-send virt-mgmt \
rpmb boot-part-log fid-support-effects-log \
- supported-log-pages lockdown"
- supported-log-pages list-endgrp"
+ supported-log-pages lockdown list-endgrp"
# Add plugins:
for plugin in "${!_plugin_subcmds[@]}"; do
@@ -1368,7 +1367,7 @@ plugin_ymtc_opts () {
opts+=" --namespace-id= -n --raw-binary -b"
;;
"help")
- opts+=NO_OPTS
+ opts+=$NO_OPTS
;;
esac
--
2.27.0

View File

@ -0,0 +1,52 @@
From 24961e9d228531f1cb60739239d7591aa70bdd53 Mon Sep 17 00:00:00 2001
From: Martin George <marting@netapp.com>
Date: Fri, 29 Nov 2024 11:04:34 +0530
Subject: [PATCH] netapp-ontapdev: fix fw version handling
The string used to capture the fw version was not handled
properly. Fix the same.
Signed-off-by: Martin George <marting@netapp.com>
---
plugins/netapp/netapp-nvme.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/plugins/netapp/netapp-nvme.c b/plugins/netapp/netapp-nvme.c
index cebd019e..76e8ddf1 100644
--- a/plugins/netapp/netapp-nvme.c
+++ b/plugins/netapp/netapp-nvme.c
@@ -146,10 +146,11 @@ static void netapp_get_ns_attrs(char *size, char *used, char *blk_size,
sprintf(blk_size, "%u%sB", (unsigned int)addr, l_suffix);
- /* get the ontap version */
+ /* get the firmware version */
int i, max = sizeof(ctrl->fr);
- memcpy(version, ctrl->fr, sizeof(ctrl->fr));
+ memcpy(version, ctrl->fr, max);
+ version[max] = '\0';
/* strip trailing whitespaces */
for (i = max - 1; i >= 0 && version[i] == ' '; i--)
version[i] = '\0';
@@ -455,7 +456,7 @@ static void netapp_ontapdevices_print_verbose(struct ontapdevice_info *devices,
char nspath[ONTAP_NS_PATHLEN] = " ";
unsigned long long lba;
char size[128], used[128];
- char blk_size[128], version[8];
+ char blk_size[128], version[9];
char uuid_str[37] = " ";
int i;
@@ -571,7 +572,7 @@ static void netapp_ontapdevices_print_json(struct ontapdevice_info *devices,
char nspath[ONTAP_NS_PATHLEN] = " ";
unsigned long long lba;
char size[128], used[128];
- char blk_size[128], version[8];
+ char blk_size[128], version[9];
char uuid_str[37] = " ";
int i;
--
2.43.5

View File

@ -0,0 +1,42 @@
From b5208a987bf85ae3f4e264e6df55a7fb9acd9907 Mon Sep 17 00:00:00 2001
From: Martin George <marting@netapp.com>
Date: Fri, 29 Nov 2024 11:10:16 +0530
Subject: [PATCH] netapp-ontapdev: fix JSON output for nsze & nuse
The namespace size & utilization values printed in the JSON
output was incorrect. Fix the same.
Signed-off-by: Martin George <marting@netapp.com>
---
plugins/netapp/netapp-nvme.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/plugins/netapp/netapp-nvme.c b/plugins/netapp/netapp-nvme.c
index 76e8ddf1..6ff428d9 100644
--- a/plugins/netapp/netapp-nvme.c
+++ b/plugins/netapp/netapp-nvme.c
@@ -276,6 +276,8 @@ static void netapp_ontapdevice_json(struct json_object *devices, char *devname,
unsigned long long nsze, unsigned long long nuse)
{
struct json_object *device_attrs;
+ unsigned long long ns_size = nsze * lba;
+ unsigned long long used_size = nuse * lba;
device_attrs = json_create_object();
json_object_add_value_string(device_attrs, "Device", devname);
@@ -283,9 +285,9 @@ static void netapp_ontapdevice_json(struct json_object *devices, char *devname,
json_object_add_value_string(device_attrs, "Namespace_Path", nspath);
json_object_add_value_int(device_attrs, "NSID", nsid);
json_object_add_value_string(device_attrs, "UUID", uuid);
- json_object_add_value_uint64(device_attrs, "LBA_Data_Size", lba);
- json_object_add_value_uint64(device_attrs, "Namespace_Size", nsze);
- json_object_add_value_uint64(device_attrs, "UsedBytes", nuse);
+ json_object_add_value_uint64(device_attrs, "LBA_Size", lba);
+ json_object_add_value_uint64(device_attrs, "Namespace_Size", ns_size);
+ json_object_add_value_uint64(device_attrs, "UsedBytes", used_size);
json_object_add_value_string(device_attrs, "Version", version);
json_array_add_value_object(devices, device_attrs);
--
2.43.5

View File

@ -1,39 +0,0 @@
From 45223fd3c5a13da9209c4f44d7593cb42cab94fb Mon Sep 17 00:00:00 2001
From: Maurizio Lombardi <mlombard@redhat.com>
Date: Tue, 14 Dec 2021 10:09:42 +0100
Subject: [PATCH 3/6] nvme: do not leak an open file handle
We performed a "sec_fd=open(cfg.file)" earlier, so we should not
overwrite the handle.
Signed-off-by: Maurizio Lombardi <mlombard@redhat.com>
---
nvme.c | 9 +--------
1 file changed, 1 insertion(+), 8 deletions(-)
diff --git a/nvme.c b/nvme.c
index 862f9b6..5beeac7 100644
--- a/nvme.c
+++ b/nvme.c
@@ -4379,17 +4379,10 @@ static int sec_send(int argc, char **argv, struct command *cmd, struct plugin *p
fprintf(stderr, "WARNING: --tl not dword aligned; unaligned bytes may be truncated\n");
if (strlen(cfg.file) == 0) {
+ close(sec_fd);
sec_fd = STDIN_FILENO;
sec_size = cfg.tl;
} else {
- sec_fd = open(cfg.file, O_RDONLY);
- if (sec_fd < 0) {
- fprintf(stderr, "Failed to open %s: %s\n",
- cfg.file, strerror(errno));
- err = -EINVAL;
- goto close_fd;
- }
-
err = fstat(sec_fd, &sb);
if (err < 0) {
perror("fstat");
--
2.27.0

View File

@ -0,0 +1,53 @@
From 6f1f902af071fc46b78485ce851ffaaeb444c25f Mon Sep 17 00:00:00 2001
From: Martin George <marting@netapp.com>
Date: Fri, 29 Nov 2024 11:15:23 +0530
Subject: [PATCH] nvme-netapp: update err messages
Trivial fix to update a few error messages.
Signed-off-by: Martin George <marting@netapp.com>
---
plugins/netapp/netapp-nvme.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/plugins/netapp/netapp-nvme.c b/plugins/netapp/netapp-nvme.c
index 6ff428d9..aee65215 100644
--- a/plugins/netapp/netapp-nvme.c
+++ b/plugins/netapp/netapp-nvme.c
@@ -816,7 +816,7 @@ static int netapp_smdevices(int argc, char **argv, struct command *command,
num = scandir(dev_path, &devices, netapp_nvme_filter, alphasort);
if (num <= 0) {
- fprintf(stderr, "No NVMe devices detected.\n");
+ fprintf(stderr, "No NVMe devices detected\n");
return num;
}
@@ -834,7 +834,7 @@ static int netapp_smdevices(int argc, char **argv, struct command *command,
smdevices = calloc(num, sizeof(*smdevices));
if (!smdevices) {
- fprintf(stderr, "Unable to allocate memory for devices.\n");
+ fprintf(stderr, "Unable to allocate memory for devices\n");
return -ENOMEM;
}
@@ -921,13 +921,13 @@ static int netapp_ontapdevices(int argc, char **argv, struct command *command,
num = scandir(dev_path, &devices, netapp_nvme_filter, alphasort);
if (num <= 0) {
- fprintf(stderr, "No NVMe devices detected.\n");
+ fprintf(stderr, "No NVMe devices detected\n");
return num;
}
ontapdevices = calloc(num, sizeof(*ontapdevices));
if (!ontapdevices) {
- fprintf(stderr, "Unable to allocate memory for devices.\n");
+ fprintf(stderr, "Unable to allocate memory for devices\n");
return -ENOMEM;
}
--
2.43.5

View File

@ -1,35 +0,0 @@
From b580886dbc322b2a71d6c0c1b71f9fca7b750b02 Mon Sep 17 00:00:00 2001
From: Maurizio Lombardi <mlombard@redhat.com>
Date: Tue, 14 Dec 2021 09:58:09 +0100
Subject: [PATCH 4/6] nvme-topology: fix memory leaks in
nvme_logical_block_size_from_ns_char()
Free the allocated strings before returning from the function
Signed-off-by: Maurizio Lombardi <mlombard@redhat.com>
---
nvme-topology.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/nvme-topology.c b/nvme-topology.c
index 0a22f6b..6be2b09 100644
--- a/nvme-topology.c
+++ b/nvme-topology.c
@@ -686,10 +686,13 @@ int nvme_logical_block_size_from_ns_char(const char *dev)
return -EINVAL;
s = nvme_get_ctrl_attr(path, "logical_block_size");
+ free(path);
if (!s)
return -EINVAL;
- return atoi(s);
+ ret = atoi(s);
+ free(s);
+ return ret;
}
void *mmap_registers(const char *dev)
--
2.27.0

View File

@ -0,0 +1,106 @@
From b8c9a3c1ee55c2477ce1ce0348014aa891dee58d Mon Sep 17 00:00:00 2001
From: Martin George <marting@netapp.com>
Date: Tue, 3 Dec 2024 13:16:17 +0530
Subject: [PATCH] netapp-smdev: remove redundant code
Remove redundant code in regular and JSON functions, which is
already invoked in a separate function.
Signed-off-by: Martin George <marting@netapp.com>
---
plugins/netapp/netapp-nvme.c | 44 +++++++-----------------------------
1 file changed, 8 insertions(+), 36 deletions(-)
diff --git a/plugins/netapp/netapp-nvme.c b/plugins/netapp/netapp-nvme.c
index aee65215..f839852d 100644
--- a/plugins/netapp/netapp-nvme.c
+++ b/plugins/netapp/netapp-nvme.c
@@ -300,7 +300,8 @@ static void netapp_smdevices_print_regular(struct smdevice_info *devices,
char array_label[ARRAY_LABEL_LEN / 2 + 1];
char volume_label[VOLUME_LABEL_LEN / 2 + 1];
char nguid_str[33];
- __u8 lba_index;
+ unsigned long long lba;
+ char size[128];
char *formatstr = NULL;
char basestr[] =
@@ -325,15 +326,7 @@ static void netapp_smdevices_print_regular(struct smdevice_info *devices,
for (i = 0; i < count; i++) {
if (devname && !strcmp(devname, basename(devices[i].dev))) {
/* found the device, fetch info for that alone */
- nvme_id_ns_flbas_to_lbaf_inuse(devices[i].ns.flbas,
- &lba_index);
- unsigned long long lba = 1ULL <<
- devices[i].ns.lbaf[lba_index].ds;
- double nsze = le64_to_cpu(devices[i].ns.nsze) * lba;
- const char *s_suffix = suffix_si_get(&nsze);
- char size[128];
-
- sprintf(size, "%.2f%sB", nsze, s_suffix);
+ netapp_get_ns_size(size, &lba, &devices[i].ns);
netapp_convert_string(array_label,
(char *)&devices[i].ctrl.vs[20],
ARRAY_LABEL_LEN / 2);
@@ -353,14 +346,7 @@ static void netapp_smdevices_print_regular(struct smdevice_info *devices,
for (i = 0; i < count; i++) {
/* fetch info for all devices */
- nvme_id_ns_flbas_to_lbaf_inuse(devices[i].ns.flbas, &lba_index);
- unsigned long long lba = 1ULL <<
- devices[i].ns.lbaf[lba_index].ds;
- double nsze = le64_to_cpu(devices[i].ns.nsze) * lba;
- const char *s_suffix = suffix_si_get(&nsze);
- char size[128];
-
- sprintf(size, "%.2f%sB", nsze, s_suffix);
+ netapp_get_ns_size(size, &lba, &devices[i].ns);
netapp_convert_string(array_label,
(char *)&devices[i].ctrl.vs[20],
ARRAY_LABEL_LEN / 2);
@@ -384,7 +370,8 @@ static void netapp_smdevices_print_json(struct smdevice_info *devices,
char array_label[ARRAY_LABEL_LEN / 2 + 1];
char volume_label[VOLUME_LABEL_LEN / 2 + 1];
char nguid_str[33];
- __u8 lba_index;
+ unsigned long long lba;
+ char size[128];
/* prepare for the json output */
root = json_create_object();
@@ -393,15 +380,7 @@ static void netapp_smdevices_print_json(struct smdevice_info *devices,
for (i = 0; i < count; i++) {
if (devname && !strcmp(devname, basename(devices[i].dev))) {
/* found the device, fetch info for that alone */
- nvme_id_ns_flbas_to_lbaf_inuse(devices[i].ns.flbas,
- &lba_index);
- unsigned long long lba = 1ULL <<
- devices[i].ns.lbaf[lba_index].ds;
- double nsze = le64_to_cpu(devices[i].ns.nsze) * lba;
- const char *s_suffix = suffix_si_get(&nsze);
- char size[128];
-
- sprintf(size, "%.2f%sB", nsze, s_suffix);
+ netapp_get_ns_size(size, &lba, &devices[i].ns);
netapp_convert_string(array_label,
(char *)&devices[i].ctrl.vs[20],
ARRAY_LABEL_LEN / 2);
@@ -421,14 +400,7 @@ static void netapp_smdevices_print_json(struct smdevice_info *devices,
for (i = 0; i < count; i++) {
/* fetch info for all devices */
- nvme_id_ns_flbas_to_lbaf_inuse(devices[i].ns.flbas, &lba_index);
- unsigned long long lba = 1ULL <<
- devices[i].ns.lbaf[lba_index].ds;
- double nsze = le64_to_cpu(devices[i].ns.nsze) * lba;
- const char *s_suffix = suffix_si_get(&nsze);
- char size[128];
-
- sprintf(size, "%.2f%sB", nsze, s_suffix);
+ netapp_get_ns_size(size, &lba, &devices[i].ns);
netapp_convert_string(array_label,
(char *)&devices[i].ctrl.vs[20],
ARRAY_LABEL_LEN / 2);
--
2.43.5

View File

@ -1,37 +0,0 @@
From 58c23ceb12d16756b2222a55d1d9dc5f34bb4fa4 Mon Sep 17 00:00:00 2001
From: James Smart <jsmart2021@gmail.com>
Date: Fri, 17 Dec 2021 11:32:32 -0800
Subject: [PATCH 5/6] nvme-cli: nvmf-connect@.service: Remove matching from
default syntax
commit 53aab69a0add added the "--matching" argument to the systemd
connect script that issues connect-all to a discovery controller. When
this argument is used, only discovery log entries whose target port
traddr's match the traddr of the discovery controller will be connected
to. This eliminates the ability to do referrals by the discovery
controller.
Revert the commit so that the "--matching" argument is not default
behavior.
Signed-off-by: James Smart <jsmart2021@gmail.com>
CC: Martin Wilck <mwilck@suse.com>
Signed-off-by: Daniel Wagner <dwagner@suse.de>
Link: https://lore.kernel.org/r/20211217193232.29034-1-jsmart2021@gmail.com
---
nvmf-autoconnect/systemd/nvmf-connect@.service | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/nvmf-autoconnect/systemd/nvmf-connect@.service b/nvmf-autoconnect/systemd/nvmf-connect@.service
index 5fbf081..c60f146 100644
--- a/nvmf-autoconnect/systemd/nvmf-connect@.service
+++ b/nvmf-autoconnect/systemd/nvmf-connect@.service
@@ -11,4 +11,4 @@ Requires=nvmf-connect.target
[Service]
Type=simple
Environment="CONNECT_ARGS=%i"
-ExecStart=/bin/sh -c "nvme connect-all --matching --quiet `/bin/echo -e '${CONNECT_ARGS}'`"
+ExecStart=/bin/sh -c "nvme connect-all --quiet `/bin/echo -e '${CONNECT_ARGS}'`"
--
2.27.0

View File

@ -0,0 +1,230 @@
From 0943fc446609996dc6acf2fae7f31a6c20c28e06 Mon Sep 17 00:00:00 2001
From: Martin George <marting@netapp.com>
Date: Wed, 4 Dec 2024 00:24:48 +0530
Subject: [PATCH] netapp-smdev: add verbose output
Add a verbose option to display additional information of smdevices
on the host. And while at it, make a few corrections/modifications
to the JSON output as well.
Signed-off-by: Martin George <marting@netapp.com>
Tested-by: Clayton Skaggs <claytons@netapp.com>
---
plugins/netapp/netapp-nvme.c | 123 ++++++++++++++++++++++++++++++-----
1 file changed, 108 insertions(+), 15 deletions(-)
diff --git a/plugins/netapp/netapp-nvme.c b/plugins/netapp/netapp-nvme.c
index f839852d..d86e93e1 100644
--- a/plugins/netapp/netapp-nvme.c
+++ b/plugins/netapp/netapp-nvme.c
@@ -250,10 +250,11 @@ static void netapp_get_ontap_labels(char *vsname, char *nspath,
static void netapp_smdevice_json(struct json_object *devices, char *devname,
char *arrayname, char *volname, int nsid, char *nguid,
- char *ctrl, char *astate, char *size, long long lba,
- long long nsze)
+ char *ctrl, char *astate, char *version, unsigned long long lba,
+ unsigned long long nsze, unsigned long long nuse)
{
struct json_object *device_attrs;
+ unsigned long long ns_size = nsze * lba;
device_attrs = json_create_object();
json_object_add_value_string(device_attrs, "Device", devname);
@@ -263,9 +264,9 @@ static void netapp_smdevice_json(struct json_object *devices, char *devname,
json_object_add_value_string(device_attrs, "Volume_ID", nguid);
json_object_add_value_string(device_attrs, "Controller", ctrl);
json_object_add_value_string(device_attrs, "Access_State", astate);
- json_object_add_value_string(device_attrs, "Size", size);
- json_object_add_value_int(device_attrs, "LBA_Data_Size", lba);
- json_object_add_value_int(device_attrs, "Namespace_Size", nsze);
+ json_object_add_value_uint64(device_attrs, "LBA_Size", lba);
+ json_object_add_value_uint64(device_attrs, "Namespace_Size", ns_size);
+ json_object_add_value_string(device_attrs, "Version", version);
json_array_add_value_object(devices, device_attrs);
}
@@ -293,6 +294,84 @@ static void netapp_ontapdevice_json(struct json_object *devices, char *devname,
json_array_add_value_object(devices, device_attrs);
}
+static void netapp_smdevices_print_verbose(struct smdevice_info *devices,
+ int count, int format, const char *devname)
+{
+ int i, slta;
+ char array_label[ARRAY_LABEL_LEN / 2 + 1];
+ char volume_label[VOLUME_LABEL_LEN / 2 + 1];
+ char nguid_str[33];
+ unsigned long long lba;
+ char size[128], used[128];
+ char blk_size[128], version[9];
+
+ char *formatstr = NULL;
+ char basestr[] =
+ "%s, Array %s, Vol %s, NSID %d, ID %s, Ctrl %c, %s, %s, %s, %s\n";
+ char columnstr[] =
+ "%-16s %-30s %-30s %4d %32s %c %-12s %-9s %-9s %-9s\n";
+
+ if (format == NNORMAL)
+ formatstr = basestr;
+ else if (format == NCOLUMN) {
+ /* print column headers and change the output string */
+ printf("%-16s %-30s %-30s %-4s %-32s %-4s %-12s %-9s %-9s %-9s\n",
+ "Device", "Array Name", "Volume Name", "NSID",
+ "Volume ID", "Ctrl", "Access State", " Size",
+ "Format", "Version");
+ printf("%-16s %-30s %-30s %-4s %-32s %-4s %-12s %-9s %-9s %-9s\n",
+ "----------------", "------------------------------",
+ "------------------------------", "----",
+ "--------------------------------", "----",
+ "------------", "---------",
+ "---------", "---------");
+ formatstr = columnstr;
+ }
+
+ for (i = 0; i < count; i++) {
+ if (devname && !strcmp(devname, basename(devices[i].dev))) {
+ /* found the device, fetch info for that alone */
+ netapp_get_ns_attrs(size, used, blk_size, version,
+ &lba, &devices[i].ctrl, &devices[i].ns);
+ netapp_convert_string(array_label,
+ (char *)&devices[i].ctrl.vs[20],
+ ARRAY_LABEL_LEN / 2);
+ slta = devices[i].ctrl.vs[0] & 0x1;
+ netapp_convert_string(volume_label,
+ (char *)devices[i].ns.vs,
+ VOLUME_LABEL_LEN / 2);
+ netapp_nguid_to_str(nguid_str, devices[i].ns.nguid);
+
+ printf(formatstr, devices[i].dev, array_label,
+ volume_label, devices[i].nsid,
+ nguid_str,
+ slta ? 'A' : 'B', "unknown", size,
+ blk_size, version);
+ return;
+ }
+ }
+
+ for (i = 0; i < count; i++) {
+ /* fetch info and print for all devices */
+ netapp_get_ns_attrs(size, used, blk_size, version,
+ &lba, &devices[i].ctrl, &devices[i].ns);
+ netapp_convert_string(array_label,
+ (char *)&devices[i].ctrl.vs[20],
+ ARRAY_LABEL_LEN / 2);
+ slta = devices[i].ctrl.vs[0] & 0x1;
+ netapp_convert_string(volume_label,
+ (char *)devices[i].ns.vs,
+ VOLUME_LABEL_LEN / 2);
+ netapp_nguid_to_str(nguid_str, devices[i].ns.nguid);
+
+ printf(formatstr, devices[i].dev, array_label,
+ volume_label, devices[i].nsid,
+ nguid_str,
+ slta ? 'A' : 'B', "unknown", size,
+ blk_size, version);
+ }
+}
+
static void netapp_smdevices_print_regular(struct smdevice_info *devices,
int count, int format, const char *devname)
{
@@ -311,7 +390,7 @@ static void netapp_smdevices_print_regular(struct smdevice_info *devices,
if (format == NNORMAL)
formatstr = basestr;
else if (format == NCOLUMN) {
- /* change output string and print column headers */
+ /* print column headers and change the output string */
printf("%-16s %-30s %-30s %-4s %-32s %-4s %-12s %-9s\n",
"Device", "Array Name", "Volume Name", "NSID",
"Volume ID", "Ctrl", "Access State", " Size");
@@ -371,7 +450,8 @@ static void netapp_smdevices_print_json(struct smdevice_info *devices,
char volume_label[VOLUME_LABEL_LEN / 2 + 1];
char nguid_str[33];
unsigned long long lba;
- char size[128];
+ char size[128], used[128];
+ char blk_size[128], version[9];
/* prepare for the json output */
root = json_create_object();
@@ -380,7 +460,8 @@ static void netapp_smdevices_print_json(struct smdevice_info *devices,
for (i = 0; i < count; i++) {
if (devname && !strcmp(devname, basename(devices[i].dev))) {
/* found the device, fetch info for that alone */
- netapp_get_ns_size(size, &lba, &devices[i].ns);
+ netapp_get_ns_attrs(size, used, blk_size, version,
+ &lba, &devices[i].ctrl, &devices[i].ns);
netapp_convert_string(array_label,
(char *)&devices[i].ctrl.vs[20],
ARRAY_LABEL_LEN / 2);
@@ -392,15 +473,18 @@ static void netapp_smdevices_print_json(struct smdevice_info *devices,
netapp_smdevice_json(json_devices, devices[i].dev,
array_label, volume_label,
devices[i].nsid, nguid_str,
- slta ? "A" : "B", "unknown", size, lba,
- le64_to_cpu(devices[i].ns.nsze));
+ slta ? "A" : "B", "unknown",
+ version, lba,
+ le64_to_cpu(devices[i].ns.nsze),
+ le64_to_cpu(devices[i].ns.nuse));
goto out;
}
}
for (i = 0; i < count; i++) {
/* fetch info for all devices */
- netapp_get_ns_size(size, &lba, &devices[i].ns);
+ netapp_get_ns_attrs(size, used, blk_size, version,
+ &lba, &devices[i].ctrl, &devices[i].ns);
netapp_convert_string(array_label,
(char *)&devices[i].ctrl.vs[20],
ARRAY_LABEL_LEN / 2);
@@ -412,7 +496,9 @@ static void netapp_smdevices_print_json(struct smdevice_info *devices,
netapp_smdevice_json(json_devices, devices[i].dev,
array_label, volume_label, devices[i].nsid,
nguid_str, slta ? "A" : "B", "unknown",
- size, lba, le64_to_cpu(devices[i].ns.nsze));
+ version, lba,
+ le64_to_cpu(devices[i].ns.nsze),
+ le64_to_cpu(devices[i].ns.nuse));
}
out:
@@ -764,6 +850,7 @@ static int netapp_smdevices(int argc, char **argv, struct command *command,
int num_smdevices = 0;
struct config {
+ bool verbose;
char *output_format;
};
@@ -772,6 +859,7 @@ static int netapp_smdevices(int argc, char **argv, struct command *command,
};
OPT_ARGS(opts) = {
+ OPT_FLAG("verbose", 'v', &cfg.verbose, "Increase output verbosity"),
OPT_FMT("output-format", 'o', &cfg.output_format, "Output Format: normal|json|column"),
OPT_END()
};
@@ -826,9 +914,14 @@ static int netapp_smdevices(int argc, char **argv, struct command *command,
}
if (num_smdevices) {
- if (fmt == NNORMAL || fmt == NCOLUMN)
- netapp_smdevices_print_regular(smdevices,
- num_smdevices, fmt, devname);
+ if (fmt == NNORMAL || fmt == NCOLUMN) {
+ if (argconfig_parse_seen(opts, "verbose"))
+ netapp_smdevices_print_verbose(smdevices,
+ num_smdevices, fmt, devname);
+ else
+ netapp_smdevices_print_regular(smdevices,
+ num_smdevices, fmt, devname);
+ }
else if (fmt == NJSON)
netapp_smdevices_print_json(smdevices,
num_smdevices, devname);
--
2.43.5

View File

@ -1,86 +0,0 @@
From 1264c6323937c4a0342174fdd9be5a66ab1eaf24 Mon Sep 17 00:00:00 2001
From: James Smart <jsmart2021@gmail.com>
Date: Fri, 17 Dec 2021 14:20:22 -0800
Subject: [PATCH 6/6] nvme-cli: Make connect-all matching be case insensitive
The comparison routine that checks discovery controller traddr with a
discovery log traddr uses a simple strncmp. For FC, which kicks off
connect-all requests vay systemd, the nvme-fc transport will build
traddr strings with lower case hexadecimal. Some FC discovery
controllers return traddr strings with upper case hexadecimal. There
was is no rqmt in the NVME-FC spec that it be upper or lower case.
Given the case difference, the connect-all fails the match logic and
doesn't connect to storage.
Revise the traddr comparison routine to duplicate the strings and
convert them to lower case for comparison.
Signed-off-by: James Smart <jsmart2021@gmail.com>
Signed-off-by: Daniel Wagner <dwagner@suse.de>
Link: https://lore.kernel.org/r/20211217222022.30516-1-jsmart2021@gmail.com
---
fabrics.c | 26 +++++++++++++++++++++++++-
1 file changed, 25 insertions(+), 1 deletion(-)
diff --git a/fabrics.c b/fabrics.c
index 0766729..a1e2593 100644
--- a/fabrics.c
+++ b/fabrics.c
@@ -34,6 +34,7 @@
#include <stddef.h>
#include <syslog.h>
#include <time.h>
+#include <ctype.h>
#include <sys/types.h>
#include <arpa/inet.h>
@@ -681,6 +682,12 @@ static int space_strip_len(int max, const char *str)
return i + 1;
}
+static void strtolower(char *str)
+{
+ for ( ; *str; str++)
+ *str = tolower(*str);
+}
+
static void print_discovery_log(struct nvmf_disc_rsp_page_hdr *log, int numrec,
int instance)
{
@@ -1385,7 +1392,9 @@ static bool cargs_match_found(struct nvmf_disc_rsp_page_entry *entry)
static bool should_connect(struct nvmf_disc_rsp_page_entry *entry)
{
+ char *dctrl_traddr, *log_traddr;
int len;
+ bool connect = true;
if (cargs_match_found(entry))
return false;
@@ -1398,7 +1407,22 @@ static bool should_connect(struct nvmf_disc_rsp_page_entry *entry)
return true;
len = space_strip_len(NVMF_TRADDR_SIZE, entry->traddr);
- return !strncmp(fabrics_cfg.traddr, entry->traddr, len);
+
+ dctrl_traddr = strdup(fabrics_cfg.traddr);
+ log_traddr = strndup(entry->traddr, len);
+ if (!dctrl_traddr || !log_traddr)
+ goto free_exit;
+
+ strtolower(dctrl_traddr);
+ strtolower(log_traddr);
+
+ connect = (strlen(dctrl_traddr) == len) &&
+ !strcmp(dctrl_traddr, log_traddr);
+
+free_exit:
+ free(log_traddr);
+ free(dctrl_traddr);
+ return connect;
}
static int connect_ctrls(struct nvmf_disc_rsp_page_hdr *log, int numrec)
--
2.27.0

View File

@ -0,0 +1,40 @@
From cd69ccb4d51b4c0b1f772f9fef42fbf441e4a7f2 Mon Sep 17 00:00:00 2001
From: Martin George <marting@netapp.com>
Date: Tue, 3 Dec 2024 13:26:56 +0530
Subject: [PATCH] netapp-smdev-doc: add verbose details
Add verbose option details to the smdevices documentation.
Signed-off-by: Martin George <marting@netapp.com>
Tested-by: Clayton Skaggs <claytons@netapp.com>
---
Documentation/nvme-netapp-smdevices.txt | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/Documentation/nvme-netapp-smdevices.txt b/Documentation/nvme-netapp-smdevices.txt
index cb68acf7..c135ff0c 100644
--- a/Documentation/nvme-netapp-smdevices.txt
+++ b/Documentation/nvme-netapp-smdevices.txt
@@ -8,7 +8,7 @@ nvme-netapp-smdevices - Display information for each NVMe path to an E-Series vo
SYNOPSIS
--------
[verse]
-'nvme netapp smdevices' [--output-format=<fmt> | -o <fmt>]
+'nvme netapp smdevices' [--output-format=<fmt> | -o <fmt>] [--verbose | -v]
DESCRIPTION
-----------
@@ -23,6 +23,10 @@ OPTIONS
Set the reporting format to 'normal' (default), 'column', or
'json'. Only one output format can be used at a time.
+-v::
+--verbose::
+ Display additional information of E-Series devices on the host.
+
EXAMPLES
--------
* Display information, in a column-based format, for each path to an E-Series
--
2.43.5

View File

@ -1,59 +0,0 @@
From db50dbf5692325cfef8fb77e56e1e44af83a022e Mon Sep 17 00:00:00 2001
From: Maurizio Lombardi <mlombard@redhat.com>
Date: Wed, 29 Jun 2022 16:47:30 +0200
Subject: [PATCH 1/7] nvme-cli: nvme gen-hostnqn use partition UUID on IBM
POWER
Signed-off-by: Maurizio Lombardi <mlombard@redhat.com>
---
nvme.c | 27 +++++++++++++++++++++++++--
1 file changed, 25 insertions(+), 2 deletions(-)
diff --git a/nvme.c b/nvme.c
index 5beeac78..0535ed2b 100644
--- a/nvme.c
+++ b/nvme.c
@@ -6516,6 +6516,26 @@ static int admin_passthru(int argc, char **argv, struct command *cmd, struct plu
return passthru(argc, argv, NVME_IOCTL_ADMIN_CMD, 1, desc, cmd);
}
+#define PATH_UUID_IBM "/proc/device-tree/ibm,partition-uuid"
+
+static int uuid_from_device_tree(char *system_uuid)
+{
+ ssize_t len;
+ int f;
+
+ f = open(PATH_UUID_IBM, O_RDONLY);
+ if (f < 0)
+ return -ENXIO;
+
+ memset(system_uuid, 0, 37);
+ len = read(f, system_uuid, 37 - 1);
+ close(f);
+ if (len < 0)
+ return -ENXIO;
+
+ return strlen(system_uuid) ? 0 : -ENXIO;
+}
+
static int gen_hostnqn_cmd(int argc, char **argv, struct command *command, struct plugin *plugin)
{
int ret;
@@ -6525,8 +6545,11 @@ static int gen_hostnqn_cmd(int argc, char **argv, struct command *command, struc
#endif
ret = uuid_from_dmi(uuid_str);
- if (ret < 0)
- ret = uuid_from_systemd(uuid_str);
+ if (ret < 0) {
+ ret = uuid_from_device_tree(uuid_str);
+ if (ret < 0)
+ ret = uuid_from_systemd(uuid_str);
+ }
#ifdef LIBUUID
if (ret < 0) {
uuid_generate_random(uuid);
--
2.31.1

View File

@ -1,41 +0,0 @@
From f491884513bfba7bb007428e4664c2dfda21d424 Mon Sep 17 00:00:00 2001
From: Maurizio Lombardi <mlombard@redhat.com>
Date: Wed, 29 Jun 2022 17:33:10 +0200
Subject: [PATCH 2/7] Add new events support in PEL
Add two new events support in header file.
Signed-off-by: Maurizio Lombardi <mlombard@redhat.com>
---
linux/nvme.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/linux/nvme.h b/linux/nvme.h
index 7a925c7a..8b4c6833 100644
--- a/linux/nvme.h
+++ b/linux/nvme.h
@@ -862,6 +862,12 @@ struct nvme_thermal_exc_event {
__u8 threshold;
};
+/* persistent event type 0Bh */
+struct nvme_set_feature_event {
+ __le32 layout;
+ __le32 cdw_mem[0];
+};
+
/* persistent event entry head */
struct nvme_persistent_event_entry_head {
__u8 etype;
@@ -909,6 +915,8 @@ enum nvme_persistent_event_types {
NVME_FORMAT_COMPLETION_EVENT = 0x08,
NVME_SANITIZE_START_EVENT = 0x09,
NVME_SANITIZE_COMPLETION_EVENT = 0x0a,
+ NVME_SET_FEATURE_EVENT = 0x0b,
+ NVME_TELEMETRY_CRT = 0x0c,
NVME_THERMAL_EXCURSION_EVENT = 0x0d
};
--
2.31.1

View File

@ -0,0 +1,56 @@
From 7057e6c50639fb05d0997eaa6fac48ece3cb38bc Mon Sep 17 00:00:00 2001
From: Bryan Gurney <bgurney@redhat.com>
Date: Tue, 21 Jan 2025 12:20:34 -0500
Subject: [PATCH] nvme: set eds to true if controller supports 128 bit hostid
A controller that uses a 128-bit Host Identifier may result in the
"nvme resv-report" command failing with a "Host Identifier Inconsistent
Format" error that suggests the "simultaneous use of 64-bit and
128-bit Host Identifier values on different controllers".
This error can be avoided if the "--eds" option is used, to request
the extended data structure. However, the controller's ctratt
value indicates whether the Host Identifier is 64 bits or 128 bits.
Therefore, check the ctratt flag, and set eds to true if the
controller indicates a 128-bit Host Identifier.
Signed-off-by: Bryan Gurney <bgurney@redhat.com>
---
nvme.c | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/nvme.c b/nvme.c
index a65873b2..2ed4ee92 100644
--- a/nvme.c
+++ b/nvme.c
@@ -7740,6 +7740,7 @@ static int resv_report(int argc, char **argv, struct command *cmd, struct plugin
const char *eds = "request extended data structure";
_cleanup_free_ struct nvme_resv_status *status = NULL;
+ _cleanup_free_ struct nvme_id_ctrl *ctrl = NULL;
_cleanup_nvme_dev_ struct nvme_dev *dev = NULL;
nvme_print_flags_t flags;
int err, size;
@@ -7792,6 +7793,19 @@ static int resv_report(int argc, char **argv, struct command *cmd, struct plugin
size = (cfg.numd + 1) << 2;
+ ctrl = nvme_alloc(sizeof(*ctrl));
+ if (!ctrl)
+ return -ENOMEM;
+
+ err = nvme_cli_identify_ctrl(dev, ctrl);
+ if (err) {
+ nvme_show_error("identify-ctrl: %s", nvme_strerror(errno));
+ return -errno;
+ }
+
+ if (ctrl->ctratt & NVME_CTRL_CTRATT_128_ID)
+ cfg.eds = true;
+
status = nvme_alloc(size);
if (!status)
return -ENOMEM;
--
2.43.5

View File

@ -1,146 +0,0 @@
From a0db61992c14b34fcf6787b957d5d5d0e77c6f33 Mon Sep 17 00:00:00 2001
From: Maurizio Lombardi <mlombard@redhat.com>
Date: Wed, 29 Jun 2022 18:00:44 +0200
Subject: [PATCH 3/7] nvme-cli: Decode "Supported Events Bitmap" in PEL header
"Supported Events Bitmap" in PEL header shows what events
are supported in current nvme devices.
Persistent Event Log for device: nvme0n1
Action for Persistent Event Log: 0
..
..
..
Supported Events Bitmap:
Support SMART/Health Log Snapshot Event(0x1)
Support Firmware Commit Event(0x2)
Support Timestamp Change Event(0x3)
Support Power-on or Reset Event(0x4)
Support NVM Subsystem Hardware Error Event(0x5)
Support Change Namespace Event(0x6)
Support Format NVM Start Event(0x7)
Support Format NVM Completion Event(0x8)
Support Sanitize Start Event(0x9)
Support Sanitize Completion Event(0xa)
Support Set Feature Event(0xb)
Support Set Telemetry CRT Event(0xc)
Support Thermal Excursion Event(0xd)
Signed-off-by: Maurizio Lombardi <mlombard@redhat.com>
---
nvme-print.c | 52 ++++++++++++++++++++++++++++++++++++++++++++++------
nvme.c | 4 ++--
2 files changed, 48 insertions(+), 8 deletions(-)
diff --git a/nvme-print.c b/nvme-print.c
index f631b347..21524a50 100755
--- a/nvme-print.c
+++ b/nvme-print.c
@@ -1015,6 +1015,26 @@ void nvme_show_predictable_latency_event_agg_log(
}
}
+const char *nvme_pel_event_to_string(int type)
+{
+ switch (type) {
+ case NVME_SMART_HEALTH_EVENT: return "SMART/Health Log Snapshot Event(0x1)";
+ case NVME_FW_COMMIT_EVENT: return "Firmware Commit Event(0x2)";
+ case NVME_TIMESTAMP_EVENT: return "Timestamp Change Event(0x3)";
+ case NVME_POWER_ON_RESET_EVENT: return "Power-on or Reset Event(0x4)";
+ case NVME_NSS_HW_ERROR_EVENT: return "NVM Subsystem Hardware Error Event(0x5)";
+ case NVME_CHANGE_NS_EVENT: return "Change Namespace Event(0x6)";
+ case NVME_FORMAT_START_EVENT: return "Format NVM Start Event(0x7)";
+ case NVME_FORMAT_COMPLETION_EVENT: return "Format NVM Completion Event(0x8)";
+ case NVME_SANITIZE_START_EVENT: return "Sanitize Start Event(0x9)";
+ case NVME_SANITIZE_COMPLETION_EVENT: return "Sanitize Completion Event(0xa)";
+ case NVME_SET_FEATURE_EVENT: return "Set Feature Event(0xb)";
+ case NVME_TELEMETRY_CRT: return "Set Telemetry CRT Event(0xc)";
+ case NVME_THERMAL_EXCURSION_EVENT: return "Thermal Excursion Event(0xd)";
+ default: return NULL;
+ }
+}
+
static const char *nvme_show_nss_hw_error(__u16 error_code)
{
switch (error_code) {
@@ -1043,6 +1063,29 @@ static const char *nvme_show_nss_hw_error(__u16 error_code)
}
}
+static void add_bitmap(int i, __u8 seb, struct json_object *root, int json_flag)
+{
+ char evt_str[50];
+ char key[128];
+
+ for (int bit = 0; bit < 8; bit++) {
+ if (nvme_pel_event_to_string(bit + i * 8)) {
+ if (json_flag == 1) {
+ sprintf(key, "bitmap_%x", (bit + i * 8));
+ if ((seb >> bit) & 0x1)
+ snprintf(evt_str, sizeof(evt_str), "Support %s",
+ nvme_pel_event_to_string(bit + i * 8));
+ json_object_add_value_string(root, key, evt_str);
+ } else {
+ if (nvme_pel_event_to_string(bit + i * 8))
+ if ((seb >> bit) & 0x1)
+ printf(" Support %s\n",
+ nvme_pel_event_to_string(bit + i * 8));
+ }
+ }
+ }
+}
+
void json_persistent_event_log(void *pevent_log_info, __u32 size)
{
struct json_object *root;
@@ -1112,9 +1155,7 @@ void json_persistent_event_log(void *pevent_log_info, __u32 size)
for (int i = 0; i < 32; i++) {
if (pevent_log_head->supp_event_bm[i] == 0)
continue;
- sprintf(key, "bitmap_%d", i);
- json_object_add_value_uint(root, key,
- pevent_log_head->supp_event_bm[i]);
+ add_bitmap(i, pevent_log_head->supp_event_bm[i], root, 1);
}
} else {
printf("No log data can be shown with this log len at least " \
@@ -1440,12 +1481,11 @@ void nvme_show_persistent_event_log(void *pevent_log_info,
le32_to_cpu(pevent_log_head->rci));
if(human)
nvme_show_persistent_event_log_rci(pevent_log_head->rci);
- printf("Supported Events Bitmap: ");
+ printf("Supported Events Bitmap: \n");
for (int i = 0; i < 32; i++) {
if (pevent_log_head->supp_event_bm[i] == 0)
continue;
- printf("BitMap[%d] is 0x%x\n", i,
- pevent_log_head->supp_event_bm[i]);
+ add_bitmap(i, pevent_log_head->supp_event_bm[i], NULL, 0);
}
} else {
printf("No log data can be shown with this log len at least " \
diff --git a/nvme.c b/nvme.c
index 0535ed2b..44c53e6b 100644
--- a/nvme.c
+++ b/nvme.c
@@ -4808,7 +4808,7 @@ static int dsm(int argc, char **argv, struct command *cmd, struct plugin *plugin
nc = argconfig_parse_comma_sep_array(cfg.ctx_attrs, ctx_attrs, ARRAY_SIZE(ctx_attrs));
nb = argconfig_parse_comma_sep_array(cfg.blocks, nlbs, ARRAY_SIZE(nlbs));
- ns = argconfig_parse_comma_sep_array_long(cfg.slbas, slbas, ARRAY_SIZE(slbas));
+ ns = argconfig_parse_comma_sep_array_long(cfg.slbas, (long long unsigned int *)slbas, ARRAY_SIZE(slbas));
nr = max(nc, max(nb, ns));
if (!nr || nr > 256) {
fprintf(stderr, "No range definition provided\n");
@@ -4963,7 +4963,7 @@ static int copy(int argc, char **argv, struct command *cmd, struct plugin *plugi
}
}
- copy = nvme_setup_copy_range(nlbs, slbas, eilbrts, elbatms, elbats, nr);
+ copy = nvme_setup_copy_range(nlbs, (__u64 *)slbas, eilbrts, elbatms, elbats, nr);
if (!copy) {
fprintf(stderr, "failed to allocate payload\n");
errno = ENOMEM;
--
2.31.1

View File

@ -1,141 +0,0 @@
From 6c916ee527e14bf4c4640ffeef8efdd891ba9ef4 Mon Sep 17 00:00:00 2001
From: Maurizio Lombardi <mlombard@redhat.com>
Date: Thu, 30 Jun 2022 16:17:44 +0200
Subject: [PATCH 4/7] nvme-cli: Adds event number in persistent event entries
Persistent Event Entries:
Event Number: 0
Event Type: SMART/Health Log Snapshot Event(0x1)
Event Type Revision: 1
Event Header Length: 21
Controller Identifier: 66
Event Timestamp: 44392
Signed-off-by: Maurizio Lombardi <mlombard@redhat.com>
---
nvme-print.c | 30 ++++++++++++++++--------------
1 file changed, 16 insertions(+), 14 deletions(-)
diff --git a/nvme-print.c b/nvme-print.c
index 21524a50..3b82b174 100755
--- a/nvme-print.c
+++ b/nvme-print.c
@@ -1174,8 +1174,9 @@ void json_persistent_event_log(void *pevent_log_info, __u32 size)
break;
valid_attrs = json_create_object();
- json_object_add_value_uint(valid_attrs, "event_type",
- pevent_entry_head->etype);
+ json_object_add_value_uint(valid_attrs, "event_number", i);
+ json_object_add_value_string(valid_attrs, "event_type",
+ nvme_pel_event_to_string(pevent_entry_head->etype));
json_object_add_value_uint(valid_attrs, "event_type_rev",
pevent_entry_head->etype_rev);
json_object_add_value_uint(valid_attrs, "event_header_len",
@@ -1505,7 +1506,8 @@ void nvme_show_persistent_event_log(void *pevent_log_info,
le16_to_cpu(pevent_entry_head->el)) >= size)
break;
- printf("Event Type: %u\n", pevent_entry_head->etype);
+ printf("Event Number: %u\n", i);
+ printf("Event Type: %s\n", nvme_pel_event_to_string(pevent_entry_head->etype));
printf("Event Type Revision: %u\n", pevent_entry_head->etype_rev);
printf("Event Header Length: %u\n", pevent_entry_head->ehl);
printf("Controller Identifier: %u\n",
@@ -1521,12 +1523,12 @@ void nvme_show_persistent_event_log(void *pevent_log_info,
switch (pevent_entry_head->etype) {
case NVME_SMART_HEALTH_EVENT:
smart_event = pevent_log_info + offset;
- printf("Smart Health Event: \n");
+ printf("Smart Health Event Entry: \n");
nvme_show_smart_log(smart_event, NVME_NSID_ALL, devname, flags);
break;
case NVME_FW_COMMIT_EVENT:
fw_commit_event = pevent_log_info + offset;
- printf("FW Commit Event: \n");
+ printf("FW Commit Event Entry: \n");
printf("Old Firmware Revision: %"PRIu64"\n",
le64_to_cpu(fw_commit_event->old_fw_rev));
printf("New Firmware Revision: %"PRIu64"\n",
@@ -1543,7 +1545,7 @@ void nvme_show_persistent_event_log(void *pevent_log_info,
break;
case NVME_TIMESTAMP_EVENT:
ts_change_event = pevent_log_info + offset;
- printf("Time Stamp Change Event: \n");
+ printf("Time Stamp Change Event Entry: \n");
printf("Previous Timestamp: %"PRIu64"\n",
le64_to_cpu(ts_change_event->previous_timestamp));
printf("Milliseconds Since Reset: %"PRIu64"\n",
@@ -1555,7 +1557,7 @@ void nvme_show_persistent_event_log(void *pevent_log_info,
por_info_list = por_info_len / sizeof(*por_event);
- printf("Power On Reset Event: \n");
+ printf("Power On Reset Event Entry: \n");
fw_rev = pevent_log_info + offset;
printf("Firmware Revision: %"PRIu64"\n", le64_to_cpu(*fw_rev));
printf("Reset Information List: \n");
@@ -1578,13 +1580,13 @@ void nvme_show_persistent_event_log(void *pevent_log_info,
break;
case NVME_NSS_HW_ERROR_EVENT:
nss_hw_err_event = pevent_log_info + offset;
- printf("NVM Subsystem Hardware Error Event Code: %u, %s\n",
+ printf("NVM Subsystem Hardware Error Event Code Entry: %u, %s\n",
le16_to_cpu(nss_hw_err_event->nss_hw_err_event_code),
nvme_show_nss_hw_error(nss_hw_err_event->nss_hw_err_event_code));
break;
case NVME_CHANGE_NS_EVENT:
ns_event = pevent_log_info + offset;
- printf("Change Namespace Event: \n");
+ printf("Change Namespace Event Entry: \n");
printf("Namespace Management CDW10: %u\n",
le32_to_cpu(ns_event->nsmgt_cdw10));
printf("Namespace Size: %"PRIu64"\n",
@@ -1603,7 +1605,7 @@ void nvme_show_persistent_event_log(void *pevent_log_info,
break;
case NVME_FORMAT_START_EVENT:
format_start_event = pevent_log_info + offset;
- printf("Format NVM Start Event: \n");
+ printf("Format NVM Start Event Entry: \n");
printf("Namespace Identifier: %u\n",
le32_to_cpu(format_start_event->nsid));
printf("Format NVM Attributes: %u\n",
@@ -1613,7 +1615,7 @@ void nvme_show_persistent_event_log(void *pevent_log_info,
break;
case NVME_FORMAT_COMPLETION_EVENT:
format_cmpln_event = pevent_log_info + offset;
- printf("Format NVM Completion Event: \n");
+ printf("Format NVM Completion Event Entry: \n");
printf("Namespace Identifier: %u\n",
le32_to_cpu(format_cmpln_event->nsid));
printf("Smallest Format Progress Indicator: %u\n",
@@ -1627,7 +1629,7 @@ void nvme_show_persistent_event_log(void *pevent_log_info,
break;
case NVME_SANITIZE_START_EVENT:
sanitize_start_event = pevent_log_info + offset;
- printf("Sanitize Start Event: \n");
+ printf("Sanitize Start Event Entry: \n");
printf("SANICAP: %u\n", sanitize_start_event->sani_cap);
printf("Sanitize CDW10: %u\n",
le32_to_cpu(sanitize_start_event->sani_cdw10));
@@ -1636,7 +1638,7 @@ void nvme_show_persistent_event_log(void *pevent_log_info,
break;
case NVME_SANITIZE_COMPLETION_EVENT:
sanitize_cmpln_event = pevent_log_info + offset;
- printf("Sanitize Completion Event: \n");
+ printf("Sanitize Completion Event Entry: \n");
printf("Sanitize Progress: %u\n",
le16_to_cpu(sanitize_cmpln_event->sani_prog));
printf("Sanitize Status: %u\n",
@@ -1646,7 +1648,7 @@ void nvme_show_persistent_event_log(void *pevent_log_info,
break;
case NVME_THERMAL_EXCURSION_EVENT:
thermal_exc_event = pevent_log_info + offset;
- printf("Thermal Excursion Event: \n");
+ printf("Thermal Excursion Event Entry: \n");
printf("Over Temperature: %u\n", thermal_exc_event->over_temp);
printf("Threshold: %u\n", thermal_exc_event->threshold);
break;
--
2.31.1

View File

@ -1,113 +0,0 @@
From 7e858ab53eb23083205d75f590ca2c2b256c2a7b Mon Sep 17 00:00:00 2001
From: Maurizio Lombardi <mlombard@redhat.com>
Date: Thu, 30 Jun 2022 16:37:40 +0200
Subject: [PATCH 5/7] nvme-cli: Adds readable firmware level in persistent
For example, In Firmware Commit Event:
Old Firmware Revision: 3617604718875264338
New Firmware Revision: 3833777500989048146
changes to
Old Firmware Revision: 3617604718875264338 (REV.SP42)
New Firmware Revision: 3833777500989048146 (REV.SP45)
Signed-off-by: Maurizio Lombardi <mlombard@redhat.com>
---
nvme-print.c | 43 ++++++++++++++++++++++++++++---------------
1 file changed, 28 insertions(+), 15 deletions(-)
diff --git a/nvme-print.c b/nvme-print.c
index 3b82b174..74ecd95a 100755
--- a/nvme-print.c
+++ b/nvme-print.c
@@ -104,12 +104,15 @@ const char *nvme_cmd_to_string(int admin, __u8 opcode)
return "Unknown";
}
-static char *fw_to_string(__u8 fw[])
+static const char *fw_to_string(char *c)
{
- static char frs[9];
+ static char ret[9];
+ int i;
- snprintf(frs, sizeof(frs), "%-.*s", 8, fw);
- return frs;
+ for (i = 0; i < 8; i++)
+ ret[i] = c[i] >= '!' && c[i] <= '~' ? c[i] : '.';
+ ret[i] = '\0';
+ return ret;
}
static const char *get_sanitize_log_sstat_status_str(__u16 status)
@@ -1094,6 +1097,7 @@ void json_persistent_event_log(void *pevent_log_info, __u32 size)
__u32 offset, por_info_len, por_info_list;
__u64 *fw_rev;
char key[128];
+ char fw_str[50];
struct nvme_smart_log *smart_event;
struct nvme_fw_commit_event *fw_commit_event;
struct nvme_time_stamp_change_event *ts_change_event;
@@ -1266,10 +1270,14 @@ void json_persistent_event_log(void *pevent_log_info, __u32 size)
break;
case NVME_FW_COMMIT_EVENT:
fw_commit_event = pevent_log_info + offset;
- json_object_add_value_uint(valid_attrs, "old_fw_rev",
- le64_to_cpu(fw_commit_event->old_fw_rev));
- json_object_add_value_uint(valid_attrs, "new_fw_rev",
- le64_to_cpu(fw_commit_event->new_fw_rev));
+ snprintf(fw_str, sizeof(fw_str), "%"PRIu64" (%s)",
+ le64_to_cpu(fw_commit_event->old_fw_rev),
+ fw_to_string((char *)&fw_commit_event->old_fw_rev));
+ json_object_add_value_string(valid_attrs, "old_fw_rev", fw_str);
+ snprintf(fw_str, sizeof(fw_str), "%"PRIu64" (%s)",
+ le64_to_cpu(fw_commit_event->new_fw_rev),
+ fw_to_string((char *)&fw_commit_event->new_fw_rev));
+ json_object_add_value_string(valid_attrs, "new_fw_rev", fw_str);
json_object_add_value_uint(valid_attrs, "fw_commit_action",
fw_commit_event->fw_commit_action);
json_object_add_value_uint(valid_attrs, "fw_slot",
@@ -1297,8 +1305,10 @@ void json_persistent_event_log(void *pevent_log_info, __u32 size)
por_info_list = por_info_len / sizeof(*por_event);
fw_rev = pevent_log_info + offset;
- json_object_add_value_uint(valid_attrs, "fw_rev",
- le64_to_cpu(*fw_rev));
+ snprintf(fw_str, sizeof(fw_str), "%"PRIu64" (%s)",
+ le64_to_cpu(*fw_rev),
+ fw_to_string((char *)fw_rev));
+ json_object_add_value_string(valid_attrs, "fw_rev", fw_str);
for (int i = 0; i < por_info_list; i++) {
por_event = pevent_log_info + offset +
sizeof(*fw_rev) + i * sizeof(*por_event);
@@ -1529,10 +1539,12 @@ void nvme_show_persistent_event_log(void *pevent_log_info,
case NVME_FW_COMMIT_EVENT:
fw_commit_event = pevent_log_info + offset;
printf("FW Commit Event Entry: \n");
- printf("Old Firmware Revision: %"PRIu64"\n",
- le64_to_cpu(fw_commit_event->old_fw_rev));
- printf("New Firmware Revision: %"PRIu64"\n",
- le64_to_cpu(fw_commit_event->new_fw_rev));
+ printf("Old Firmware Revision: %"PRIu64" (%s)\n",
+ le64_to_cpu(fw_commit_event->old_fw_rev),
+ fw_to_string((char *)&fw_commit_event->old_fw_rev));
+ printf("New Firmware Revision: %"PRIu64" (%s)\n",
+ le64_to_cpu(fw_commit_event->new_fw_rev),
+ fw_to_string((char *)&fw_commit_event->new_fw_rev));
printf("FW Commit Action: %u\n",
fw_commit_event->fw_commit_action);
printf("FW Slot: %u\n", fw_commit_event->fw_slot);
@@ -1559,7 +1571,8 @@ void nvme_show_persistent_event_log(void *pevent_log_info,
printf("Power On Reset Event Entry: \n");
fw_rev = pevent_log_info + offset;
- printf("Firmware Revision: %"PRIu64"\n", le64_to_cpu(*fw_rev));
+ printf("Firmware Revision: %"PRIu64" (%s)\n", le64_to_cpu(*fw_rev),
+ fw_to_string((char *)fw_rev));
printf("Reset Information List: \n");
for (int i = 0; i < por_info_list; i++) {
--
2.31.1

View File

@ -1,69 +0,0 @@
From 859b8ee99a725bdcfbb7c8352c50449d126cffc4 Mon Sep 17 00:00:00 2001
From: Maurizio Lombardi <mlombard@redhat.com>
Date: Thu, 30 Jun 2022 16:41:59 +0200
Subject: [PATCH 6/7] nvme-cli: Add support set feature event in PEL
Add "Set Feature" event in PEL.
Persistent Event Entries:
Event Number: 0
Event Type: Set Feature Event(0xb)
Event Type Revision: 1
Event Header Length: 21
Controller Identifier: 65
Event Timestamp: 564587204146155
Vendor Specific Information Length: 0
Event Length: 16
Set Feature Event Entry:
Set Feature ID :0x7 (Number of Queues), value:0x270027
Number of IO Completion Queues Allocated (NCQA): 40
Number of IO Submission Queues Allocated (NSQA): 40
Signed-off-by: Maurizio Lombardi <mlombard@redhat.com>
---
nvme-print.c | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/nvme-print.c b/nvme-print.c
index 74ecd95a..37011dbe 100755
--- a/nvme-print.c
+++ b/nvme-print.c
@@ -1436,6 +1436,8 @@ void nvme_show_persistent_event_log(void *pevent_log_info,
{
__u32 offset, por_info_len, por_info_list;
__u64 *fw_rev;
+ int fid, cdw11, dword_cnt;
+ unsigned char *mem_buf = NULL;
struct nvme_smart_log *smart_event;
struct nvme_fw_commit_event *fw_commit_event;
struct nvme_time_stamp_change_event *ts_change_event;
@@ -1446,6 +1448,7 @@ void nvme_show_persistent_event_log(void *pevent_log_info,
struct nvme_format_nvm_compln_event *format_cmpln_event;
struct nvme_sanitize_start_event *sanitize_start_event;
struct nvme_sanitize_compln_event *sanitize_cmpln_event;
+ struct nvme_set_feature_event *set_feat_event;
struct nvme_thermal_exc_event *thermal_exc_event;
struct nvme_persistent_event_log_head *pevent_log_head;
struct nvme_persistent_event_entry_head *pevent_entry_head;
@@ -1659,6 +1662,18 @@ void nvme_show_persistent_event_log(void *pevent_log_info,
printf("Completion Information: %u\n",
le16_to_cpu(sanitize_cmpln_event->cmpln_info));
break;
+ case NVME_SET_FEATURE_EVENT:
+ set_feat_event = pevent_log_info + offset;
+ printf("Set Feature Event Entry: \n");
+ dword_cnt = set_feat_event->layout & 0x03;
+ fid = le32_to_cpu(set_feat_event->cdw_mem[0]) & 0x000f;
+ cdw11 = le32_to_cpu(set_feat_event->cdw_mem[1]);
+ if (((set_feat_event->layout & 0xff) >> 2) != 0)
+ mem_buf = (unsigned char *)(set_feat_event + 4 + dword_cnt * 4);
+ printf("Set Feature ID :%#02x (%s), value:%#08x\n", fid,
+ nvme_feature_to_string(fid), cdw11);
+ nvme_feature_show_fields(fid, cdw11, mem_buf);
+ break;
case NVME_THERMAL_EXCURSION_EVENT:
thermal_exc_event = pevent_log_info + offset;
printf("Thermal Excursion Event Entry: \n");
--
2.31.1

View File

@ -1,29 +0,0 @@
From 44b23d2daf246db0ac09a4a79a9a5161843a4936 Mon Sep 17 00:00:00 2001
From: Maurizio Lombardi <mlombard@redhat.com>
Date: Thu, 30 Jun 2022 16:44:07 +0200
Subject: [PATCH 7/7] nvme-cli: Add support Telemetry CRT in PEL
Add "Telemetry CRT" event in PEL.
Signed-off-by: Maurizio Lombardi <mlombard@redhat.com>
---
nvme-print.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/nvme-print.c b/nvme-print.c
index 37011dbe..992b9b83 100755
--- a/nvme-print.c
+++ b/nvme-print.c
@@ -1674,6 +1674,9 @@ void nvme_show_persistent_event_log(void *pevent_log_info,
nvme_feature_to_string(fid), cdw11);
nvme_feature_show_fields(fid, cdw11, mem_buf);
break;
+ case NVME_TELEMETRY_CRT:
+ d(pevent_log_info + offset, 512, 16, 1);
+ break;
case NVME_THERMAL_EXCURSION_EVENT:
thermal_exc_event = pevent_log_info + offset;
printf("Thermal Excursion Event Entry: \n");
--
2.31.1

View File

@ -1,26 +0,0 @@
From b3db6509e1f70bdde9205ab97bd87fbb94a49f0a Mon Sep 17 00:00:00 2001
From: Maurizio Lombardi <mlombard@redhat.com>
Date: Fri, 15 Jul 2022 11:10:59 +0200
Subject: [PATCH] fix firmware log page frs variable sign
Signed-off-by: Maurizio Lombardi <mlombard@redhat.com>
---
linux/nvme.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/linux/nvme.h b/linux/nvme.h
index 8b4c6833..2c402688 100644
--- a/linux/nvme.h
+++ b/linux/nvme.h
@@ -1539,7 +1539,7 @@ struct nvme_error_log_page {
struct nvme_firmware_log_page {
__u8 afi;
__u8 resv[7];
- __u8 frs[7][8];
+ char frs[7][8];
__u8 resv2[448];
};
--
2.31.1

View File

@ -1,19 +0,0 @@
From f9b6c2100db88e9f317f15f17faaed59b725ac9b Mon Sep 17 00:00:00 2001
From: Keith Busch <kbusch@kernel.org>
Date: Tue, 24 Aug 2021 11:49:16 -0700
Subject: [PATCH] fix file permissions (nvme-print.c)
It's not executable.
Signed-off-by: Keith Busch <kbusch@kernel.org>
---
nvme-print.c | 0
1 file changed, 0 insertions(+), 0 deletions(-)
mode change 100755 => 100644 nvme-print.c
diff --git a/nvme-print.c b/nvme-print.c
old mode 100755
new mode 100644
--
2.31.1

View File

@ -1,65 +0,0 @@
From ad9f35c0bf8a71c6a4b7586d7553b8e9d171f48e Mon Sep 17 00:00:00 2001
From: Daniel Wagner <dwagner@suse.de>
Date: Tue, 7 Mar 2023 10:24:01 +0100
Subject: [PATCH] fabrics: Fix ordering for auto connect services
In order to be able to mount file systems via /etc/fstab we have to
make sure that the corresponding auto connect services have been
executed. Because the mounting of the local filesystem happens very
early in the boot we have to carefully sort these service file into the
boot process.
First, we have to disable the DefaultDependency as this will
automatically add dependency on sysinit.target which is too late (after
local mounts). Though without the default dependency we have to provide
a Before and After conditions.
The Before is simple as we have a local-fs-pre target. The After
is a bit tricky as there are no targets available.
Because the whole autoconnect machinery depends on udev events being
delivered we place the service after systemd-udevd has been started.
Link: https://www.freedesktop.org/software/systemd/man/bootup.html
Reported-by: Maurizio Lombardi <mlombard@redhat.com>
Reported-by: Wen Xiong <wenxiong@linux.ibm.com>
Tested-by: Maurizio Lombardi <mlombard@redhat.com>
Tested-by: Wen Xiong <wenxiong@linux.ibm.com>
Signed-off-by: Daniel Wagner <dwagner@suse.de>
---
nvmf-autoconnect/systemd/nvmefc-boot-connections.service.in | 3 +++
nvmf-autoconnect/systemd/nvmf-connect@.service.in | 4 +++-
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/nvmf-autoconnect/systemd/nvmefc-boot-connections.service b/nvmf-autoconnect/systemd/nvmefc-boot-connections.service
index 33ab8c1f..7036625c 100644
--- a/nvmf-autoconnect/systemd/nvmefc-boot-connections.service
+++ b/nvmf-autoconnect/systemd/nvmefc-boot-connections.service
@@ -1,6 +1,9 @@
[Unit]
Description=Auto-connect to subsystems on FC-NVME devices found during boot
ConditionPathExists=/sys/class/fc/fc_udev_device/nvme_discovery
+DefaultDependencies=no
+After=systemd-udevd.service
+Before=local-fs-pre.target
[Service]
Type=oneshot
diff --git a/nvmf-autoconnect/systemd/nvmf-connect@.service b/nvmf-autoconnect/systemd/nvmf-connect@.service
index 90f774c5..dd245ee6 100644
--- a/nvmf-autoconnect/systemd/nvmf-connect@.service
+++ b/nvmf-autoconnect/systemd/nvmf-connect@.service
@@ -4,7 +4,9 @@
[Unit]
Description=NVMf auto-connect scan upon nvme discovery controller Events
-After=syslog.target
+DefaultDependencies=no
+After=systemd-udevd.service
+Before=local-fs-pre.target
PartOf=nvmf-connect.target
Requires=nvmf-connect.target
--
2.31.1

View File

@ -1,35 +0,0 @@
From 00909e8bc7e5a1b7a1129f8e18c60eedca0248f7 Mon Sep 17 00:00:00 2001
From: Maurizio Lombardi <mlombard@redhat.com>
Date: Mon, 17 Apr 2023 15:39:56 +0200
Subject: [PATCH] nvme: fix rnlpt to_string() values.
"Reservation Notification Log Page Type" values do not start
from 0x1 but from 0x0.
Signed-off-by: Maurizio Lombardi <mlombard@redhat.com>
---
nvme-print.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/nvme-print.c b/nvme-print.c
index 8bd2174f..1ed34572 100644
--- a/nvme-print.c
+++ b/nvme-print.c
@@ -610,10 +610,10 @@ void nvme_show_lba_status_log(void *lba_status, __u32 size,
static const char *resv_notif_to_string(__u8 type)
{
switch (type) {
- case 0x1: return "Empty Log Page";
- case 0x2: return "Registration Preempted";
- case 0x3: return "Reservation Released";
- case 0x4: return "Reservation Preempted";
+ case 0x0: return "Empty Log Page";
+ case 0x1: return "Registration Preempted";
+ case 0x2: return "Reservation Released";
+ case 0x3: return "Reservation Preempted";
default: return "Reserved";
}
}
--
2.31.1

View File

@ -0,0 +1,5 @@
#!/bin/bash
if [[ "$1" == nbft* ]] && [[ "$2" == "up" ]]; then
systemctl start nvmf-connect-nbft.service
fi

View File

@ -0,0 +1,15 @@
# Boot from NVMe over TCP (NBFT)
#
# For NVMe/TCP connections that provide namespaces containing rootfs
# it is crucial to react on carrier events and reconnect any missing
# NVMe/TCP connections as defined in the ACPI NBFT table. A custom
# /usr/lib/NetworkManager/dispatcher.d/99-nvme-nbft-connect.sh hook
# will respawn nvmf-connect-nbft.service on such occasion.
[device-nbft-no-ignore-carrier]
# only affects nbft0, nbft1, ... interfaces
match-device=interface-name:nbft*
# react on link up/down events
ignore-carrier=no

View File

@ -1,13 +0,0 @@
--- nvme-cli-1.9/Makefile.orig 2020-05-27 14:04:56.259961135 -0400
+++ nvme-cli-1.9/Makefile 2020-05-27 14:05:22.796185371 -0400
@@ -125,8 +125,8 @@
$(INSTALL) -m 644 -T ./etc/discovery.conf.in $(DESTDIR)$(SYSCONFDIR)/nvme/discovery.conf; \
fi
-install-spec: install-bin install-man install-bash-completion install-zsh-completion install-etc install-systemd install-udev install-dracut
-install: install-spec install-hostparams
+install-spec: install-bin install-man install-bash-completion install-zsh-completion install-systemd install-udev install-dracut
+install: install-spec
nvme.spec: nvme.spec.in NVME-VERSION-FILE
sed -e 's/@@VERSION@@/$(NVME_VERSION)/g' < $< > $@+

View File

@ -1,168 +1,238 @@
#%%global commit0 bdbb4da0979fbdc079cf98410cdb31cf799e83b3
#%%global shortcommit0 %%(c=%%{commit0}; echo ${c:0:7})
%global nmlibdir %{_prefix}/lib/NetworkManager
Name: nvme-cli
Version: 1.16
Release: 9%{?dist}
Version: 2.11
Release: 5%{?dist}
Summary: NVMe management command line interface
License: GPLv2+
License: GPL-2.0-only
URL: https://github.com/linux-nvme/nvme-cli
Source0: https://github.com/linux-nvme/%{name}/archive/v%{version}.tar.gz
Patch0: nvme-cli-makefile-dont-install-host-params-patch
Patch1: 0001-fabrics-fix-nvme-connect-segfault-if-transport-type-.patch
Patch2: 0002-fabrics-fix-a-buffer-overrun.patch
Patch3: 0003-bash-Fix-nvme-completion.patch
Patch4: 0004-nvme-do-not-leak-an-open-file-handle.patch
Patch5: 0005-nvme-topology-fix-memory-leaks-in-nvme_logical_block.patch
Patch6: 0006-nvme-cli-nvmf-connect-.service-Remove-matching-from-.patch
Patch7: 0007-nvme-cli-Make-connect-all-matching-be-case-insensiti.patch
Patch8: 0008-nvme-cli-nvme-gen-hostnqn-use-partition-UUID-on-IBM-.patch
Patch9: 0009-Add-new-events-support-in-PEL.patch
Patch10: 0010-nvme-cli-Decode-Supported-Events-Bitmap-in-PEL-heade.patch
Patch11: 0011-nvme-cli-Adds-event-number-in-persistent-event-entri.patch
Patch12: 0012-nvme-cli-Adds-readable-firmware-level-in-persistent.patch
Patch13: 0013-nvme-cli-Add-support-set-feature-event-in-PEL.patch
Patch14: 0014-nvme-cli-Add-support-Telemetry-CRT-in-PEL.patch
Patch15: 0015-fix-firmware-log-page-frs-variable-sign.patch
Patch16: 0016-fix-file-permissions-nvme-print.c.patch
Patch17: 0017-fabrics-Fix-ordering-for-auto-connect-services.patch
Patch18: 0018-nvme-fix-rnlpt-to_string-values.patch
Source0: %{url}/archive/v%{version}/%{name}-%{version}.tar.gz
Source1: 99-nvme-nbft-connect.sh
Source2: 99-nvme-nbft-no-ignore-carrier.conf
Patch0: 0001-netapp-ontapdev-add-verbose-output.patch
Patch1: 0002-netapp-ontapdev-doc-add-verbose-details.patch
Patch2: 0003-netapp-ontapdev-fix-fw-version-handling.patch
Patch3: 0004-netapp-ontapdev-fix-JSON-output-for-nsze-nuse.patch
Patch4: 0005-nvme-netapp-update-err-messages.patch
Patch5: 0006-netapp-smdev-remove-redundant-code.patch
Patch6: 0007-netapp-smdev-add-verbose-output.patch
Patch7: 0008-netapp-smdev-doc-add-verbose-details.patch
Patch8: 0009-nvme-set-eds-to-true-if-controller-supports-128-bit-.patch
BuildRequires: meson >= 0.50.0
BuildRequires: gcc gcc-c++
BuildRequires: libuuid-devel
BuildRequires: gcc
BuildRequires: systemd-devel
BuildRequires: systemd-rpm-macros
BuildRequires: zlib-devel
BuildRequires: libnvme-devel >= 1.11-1
BuildRequires: json-c-devel >= 0.14
BuildRequires: asciidoc
BuildRequires: xmlto
BuildRequires: kernel-headers >= 5.14.0-542
Requires: util-linux
%description
nvme-cli provides NVM-Express user space tooling for Linux.
%prep
#%%setup -qn %%{name}-%%{commit0}
%setup -q
%patch0 -p1
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch5 -p1
%patch6 -p1
%patch7 -p1
%patch8 -p1
%patch9 -p1
%patch10 -p1
%patch11 -p1
%patch12 -p1
%patch13 -p1
%patch14 -p1
%patch15 -p1
%patch16 -p1
%patch17 -p1
%patch18 -p1
%autosetup -p1 -n %{name}-%{version}
%build
# CFLAGS on the command line breaks the build. It works okay as an
# environment variable, though. See:
# https://github.com/linux-nvme/nvme-cli/pull/480
CFLAGS="%{optflags}" make PREFIX=/usr LDFLAGS="%{__global_ldflags}" %{?_smp_mflags}
%meson -Dudevrulesdir=%{_udevrulesdir} -Dsystemddir=%{_unitdir} -Ddocs=all -Ddocs-build=true -Dhtmldir=%{_pkgdocdir}
%meson_build
%install
%make_install PREFIX=/usr UDEVDIR="%{_udevrulesdir}/.." SYSTEMDDIR="%{_unitdir}/.."
mkdir -p %{buildroot}%{_sysconfdir}/nvme
# hostid and hostnqn are supposed to be unique per machine. We obviously
# can't package them.
#rm -f %{buildroot}%{_sysconfdir}/nvme/hostid
#rm -f %{buildroot}%{_sysconfdir}/nvme/hostnqn
%meson_install
mkdir -p $RPM_BUILD_ROOT%{nmlibdir}/dispatcher.d
mkdir -p $RPM_BUILD_ROOT%{nmlibdir}/conf.d
%{__install} -pm 755 %{SOURCE1} $RPM_BUILD_ROOT%{nmlibdir}/dispatcher.d/
%{__install} -pm 644 %{SOURCE2} $RPM_BUILD_ROOT%{nmlibdir}/conf.d/
# Do not install the dracut rule yet. See rhbz 1742764
# Do we want to keep this here? Now that we have boot support for nvme/fc + tcp?
rm -f %{buildroot}/usr/lib/dracut/dracut.conf.d/70-nvmf-autoconnect.conf
# Move html docs into the right place
mv %{buildroot}%{_pkgdocdir}/nvme %{buildroot}%{_pkgdocdir}/html
rm -rf %{buildroot}%{_pkgdocdir}/nvme
%files
%license LICENSE
%doc README.md
%doc %{_pkgdocdir}/*
%{_sbindir}/nvme
%{_mandir}/man1/nvme*.gz
%{_datadir}/bash-completion/completions/nvme
%{_datadir}/zsh/site-functions/_nvme
%dir %{_sysconfdir}/nvme
%config(noreplace) %{_sysconfdir}/nvme/discovery.conf
%{_unitdir}/nvmefc-boot-connections.service
%{_unitdir}/nvmf-autoconnect.service
%{_unitdir}/nvmf-connect-nbft.service
%{_unitdir}/nvmf-connect.target
%{_unitdir}/nvmf-connect@.service
%{_udevrulesdir}/65-persistent-net-nbft.rules
%{_udevrulesdir}/70-nvmf-autoconnect.rules
%{_udevrulesdir}/71-nvmf-iopolicy-netapp.rules
%{_udevrulesdir}/70-nvmf-keys.rules
%{_udevrulesdir}/71-nvmf-netapp.rules
# Do not install the dracut rule yet. See rhbz 1742764
# Is this still true? Now that we support nvme-of boot, do we want to install this file?
# /usr/lib/dracut/dracut.conf.d/70-nvmf-autoconnect.conf
%{nmlibdir}/dispatcher.d/99-nvme-nbft-connect.sh
%{nmlibdir}/conf.d/99-nvme-nbft-no-ignore-carrier.conf
%post
if [ $1 -eq 1 ] || [ $1 -eq 2 ]; then
if [ ! -s %{_sysconfdir}/nvme/hostnqn ]; then
echo $(nvme gen-hostnqn) > %{_sysconfdir}/nvme/hostnqn
echo $(nvme gen-hostnqn) > %{_sysconfdir}/nvme/hostnqn
fi
if [ ! -s %{_sysconfdir}/nvme/hostid ]; then
uuidgen > %{_sysconfdir}/nvme/hostid
echo $(nvme show-hostnqn | sed 's/^.*uuid://') > %{_sysconfdir}/nvme/hostid
fi
# apply udev and systemd changes that we did
if [ $1 -eq 1 ]; then
systemctl enable nvmefc-boot-connections
fi
systemctl daemon-reload
udevadm control --reload-rules && udevadm trigger
exit 0
# apply udev and systemd changes that we did
if [ $1 -eq 1 ]; then
systemctl enable nvmefc-boot-connections
fi
systemctl daemon-reload
udevadm control --reload-rules && udevadm trigger
exit 0
fi
%changelog
* Thu Apr 20 2023 Maurizio Lombardi <mlombard@redhat.com> - 1.16-9
- Fix BZ #2187288
* Thu Feb 13 2025 Maurizio Lombardi <mlombard@redhat.com> - 2.11-5
- Fix for RHEL-10433
* Wed Apr 05 2023 Maurizio Lombardi <mlombard@redhat.com> - 1.16-8
- Fix BZ #1954185
* Fri Jan 24 2025 Maurizio Lombardi <mlombard@redhat.com> - 2.11-4
- Add kernel-headers to BuildRequires (RHEL-70856)
* Wed Nov 09 2022 Maurizio Lombardi <mlombard@redhat.com> - 1.16-7
- Do not re-enable the nvmefc-boot-connections service if
we are just upgrading the package.
* Thu Jan 16 2025 Maurizio Lombardi <mlombard@redhat.com> - 2.11-3
- NetApp fixes for RHEL-71521
* Thu Oct 13 2022 Maurizio Lombardi <mlombard@redhat.com> - 1.16-6
- Fix a file permission
* Fri Nov 15 2024 Maurizio Lombardi <mlombard@redhat.com> - 2.11-2
- Rebuild for RHEL-67144
* Fri Jul 15 2022 Maurizio Lombardi <mlombard@redhat.com> - 1.16-5
- Fix a compiler warning
* Tue Nov 12 2024 Maurizio Lombardi <mlombard@redhat.com> - 2.11-1
- Update to version v2.11 RHEL-67144
* Tue Jul 12 2022 Maurizio Lombardi <mlombard@redhat.com> - 1.16-4
- Merge fixes for PowerPC
* Mon Oct 07 2024 Maurizio Lombardi <mlombard@redhat.com> - 2.10.2-1
- Update to version 2.10.2 RHEL-60536
* Fri Jan 07 2022 Maurizio Lombardi <mlombard@redhat.com> - 1.16-3
- Merge a few bugfixes
* Thu Aug 22 2024 Tomas Bzatek <tbzatek@redhat.com> - 2.9.1-6
- Install NetworkManager override for nbft interfaces
- Rename reconnect NetworkManager hook to 99-nvme-nbft-connect.sh
* Mon Nov 29 2021 Maurizio Lombardi <mlombard@redhat.com> - 1.16-2
- Update to version 1.16
* Tue Aug 06 2024 Maurizio Lombardi <mlombard@redhat.com> - 2.9.1-5
- Fix RHEL-38372
* Thu Jul 22 2021 Maurizio Lombardi <mlombard@redhat.com> - 1.14-2
- Merge various bugfixes
* Wed Jul 24 2024 Tomas Bzatek <tbzatek@redhat.com> - 2.9.1-4
- Backport NBFT discovery support (RHEL-37601)
* Wed Apr 28 2021 Maurizio Lombardi <mlombard@redhat.com> - 1.14-1
- Update to version v1.14
* Wed June 19 2024 Maurizio Lombardi <mlombard@redhat.com> - 2.9.1-3
- Fix RHEL-36139
* Tue Apr 20 2021 Maurizio Lombardi <mlombard@redhat.com> - 1.13-4
- Rebuild to mark bz1949462 as fixed
* Tue May 07 2024 Tomas Bzatek <tbzatek@redhat.com> - 2.9.1-2
- Install custom nvmf-connect-nbft.sh NetworkManager hook (RHEL-18912)
* Fri Apr 16 2021 Maurizio Lombardi <mlombard@redhat.com> - 1.13-3
- KATO values fixes for various controllers
* Tue May 07 2024 Maurizio Lombardi <mlombard@redhat.com> - 2.9.1-1
- Update to version 2.9.1
* Wed Apr 14 2021 Maurizio Lombardi <mlombard@redhat.com> - 1.13-2
- Add dependency to util-linux and fix the post install script
* Wed Apr 03 2024 Maurizio Lombardi <mlombard@redhat.com> - 2.8-1
- Update to version 2.8
* Wed Apr 14 2021 Maurizio Lombardi <mlombard@redhat.com> - 1.13-1
- Update to 1.13
* Thu Feb 22 2024 Maurizio Lombardi <mlombard@redhat.com> - 2.6-5
- Fix for RHEL-13107
* Tue Jun 16 2020 Fedora Release Monitoring <release-monitoring@fedoraproject.org> - 1.12-1
- Update to 1.12 (#1827581)
* Mon Nov 13 2023 Maurizio Lombardi <mlombard@redhat.com> - 2.6-4
- Fix for RHEL-16216 (revert 1:1 mapping between hostnqn and hostid)
* Wed Nov 08 2023 Maurizio Lombardi <mlombard@redhat.com> - 2.6-3
- Fixes for RHEL-12566
* Mon Nov 06 2023 Maurizio Lombardi <mlombard@redhat.com> - 2.6-2
- Rebuild for side-tag
* Tue Oct 31 2023 Maurizio Lombardi <mlombard@redhat.com> - 2.6-1
- Update to version 2.6
* Mon Aug 21 2023 John Meneghini <jmeneghi@redhat.com> - 2.4-10
- JIRA: https://issues.redhat.com/browse/RHEL-1492
* Thu Aug 10 2023 John Meneghini <jmeneghi@redhat.com> - 2.4-9
- JIRA: https://issues.redhat.com/browse/RHEL-1147
* Mon Jul 17 2023 John Meneghini <jmeneghi@redhat.com> - 2.4-8
- Fix BZ#2223436
* Wed Jun 14 2023 Maurizio Lombardi <mlombard@redhat.com> - 2.4-7
- Fix BZ#2210656
* Tue May 30 2023 Maurizio Lombardi <mlombard@redhat.com> - 2.4-6
- Rebuild for #2208399
* Thu May 25 2023 Maurizio Lombardi <mlombard@redhat.com> - 2.4-5
- Fix SSTAT print (BZ2208399)
* Tue May 16 2023 Maurizio Lombardi <mlombard@redhat.com> - 2.4-4
- Add support to NBFT (BZ2188518)
* Fri May 12 2023 Maurizio Lombardi <mlombard@redhat.com> - 2.4-3
- Fix a warning when building the package BZ2195897
* Wed May 03 2023 Maurizio Lombardi <mlombard@redhat.com> - 2.4-2
- Fix a bogus changelog date BZ2186074
* Mon Apr 03 2023 Maurizio Lombardi <mlombard@redhat.com> - 2.4-1
- Update to version v2.4
* Thu Nov 10 2022 Maurizio Lombardi <mlombard@redhat.com> - 2.1.2-2
- Do not re-enable nvmefc-boot-connections when the package gets updated
* Mon Sep 26 2022 Maurizio Lombardi <mlombard@redhat.com> - 2.1.2-1
- Update to version v2.1.2
* Mon Aug 29 2022 Maurizio Lombardi <mlombard@redhat.com> - 2.0-4
- Fix BZ2104945
* Fri Jul 15 2022 Maurizio Lombardi <mlombard@redhat.com> - 2.0-3
- Fix BZ2105742
* Thu Jun 16 2022 Maurizio Lombardi <mlombard@redhat.com> - 2.0-2
- Fix the gating tests
* Wed Apr 27 2022 Maurizio Lombardi <mlombard@redhat.com> - 2.0-1
- Upgrade to version 2.0
* Mon Feb 07 2022 Maurizio Lombardi <mlombard@redhat.com> - 1.16-3
- Add a few bugfixes
* Mon Dec 13 2021 Maurizio Lombardi <mlombard@redhat.com> - 1.16-2
- Update to the latest version
* Thu Dec 09 2021 Maurizio Lombardi <mlombard@redhat.com> - 1.14-4
- Fix handling of the ctrl_loss_tmo parameter
* Mon Aug 09 2021 Mohan Boddu <mboddu@redhat.com>
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
Related: rhbz#1991688
* Mon Jun 14 2021 Maurizio Lombardi <mlombard@redhat.com> - 1.14-2
- Fix for bz1962422 (nvme flush failed from from v5.13-rc1)
* Mon May 03 2021 Maurizio Lombardi <mlombard@redhat.com> - 1.14-1
- Update to the latest upstream version
* Fri Apr 16 2021 Mohan Boddu <mboddu@redhat.com>
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
* Fri Mar 19 2021 Maurizio Lombardi <mlombard@redhat.com> - 1.12-1
- Update to 1.13 and add postin scriptlet
* Sat Apr 25 2020 luto@kernel.org - 1.11.1-1
- Update to 1.11