Red Hat Bugzilla – 2208399 – nvme-cli 9.2 Changes in Version 2.2.1 added a NVME_SANITIZE_SSTAT_STATUS_MASK mask and it causes possibly incorrect values to be displayed
Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Description of problem:
Customer upgraded nvme-cli to 2.2.1 and now is not happy with the output of the nvme sanitize-log command
Version-Release number of selected component (if applicable):
nvme-cli 2.2.1
How reproducible:
Happens with nvme-cli 2.2.1
Steps to Reproduce:
1.Update to nvme-cli 2.2.1
then
2.Run [root@os10 ~]# nvme sanitize /dev/nvme0n5 -a 2 -u.
Actual results:
[root@os10 ~]# nvme sanitize-log /dev/nvme0n5.
Sanitize Progress (SPROG) : 65535
Sanitize Status (SSTAT) : 0x1 <--- different due to changes
Expected results:
[root@os10 ~]# nvme sanitize /dev/nvme0n5 -a 2 -u.
Sanitize Progress (SPROG) : 65535
Sanitize Status (SSTAT) : 0x101 <--- EXPECTED OUTPUT
Additional info:
Looked at the source code to see what has changed
New nvme-cli has a mask now of NVME_SANITIZE_SSTAT_STATUS_MASK & to le16_to_cpu(sanitize->sstat)
printf("Sanitize Status (SSTAT) : %#x\n",
le16_to_cpu(sanitize->sstat) & NVME_SANITIZE_SSTAT_STATUS_MASK);
diff is here
@@ -6432,7 +6497,7 @@ void nvme_show_sanitize_log(struct nvme_
printf("\n");
printf("Sanitize Status (SSTAT) : %#x\n",
- le16_to_cpu(sanitize->sstat));
+ le16_to_cpu(sanitize->sstat) & NVME_SANITIZE_SSTAT_STATUS_MASK);
if (human)
nvme_show_sanitize_log_sstat(le16_to_cpu(sanitize->sstat));
NVME_SANITIZE_SSTAT_STATUS_MASK
Mask to get the status value of the most recent sanitize operation.
This seems to be why the output has changed.
The question becomes, which output is correct
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory (nvme-cli bug fix and enhancement update), and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.
https://access.redhat.com/errata/RHEA-2023:6604
Description of problem: Customer upgraded nvme-cli to 2.2.1 and now is not happy with the output of the nvme sanitize-log command Version-Release number of selected component (if applicable): nvme-cli 2.2.1 How reproducible: Happens with nvme-cli 2.2.1 Steps to Reproduce: 1.Update to nvme-cli 2.2.1 then 2.Run [root@os10 ~]# nvme sanitize /dev/nvme0n5 -a 2 -u. Actual results: [root@os10 ~]# nvme sanitize-log /dev/nvme0n5. Sanitize Progress (SPROG) : 65535 Sanitize Status (SSTAT) : 0x1 <--- different due to changes Expected results: [root@os10 ~]# nvme sanitize /dev/nvme0n5 -a 2 -u. Sanitize Progress (SPROG) : 65535 Sanitize Status (SSTAT) : 0x101 <--- EXPECTED OUTPUT Additional info: Looked at the source code to see what has changed New nvme-cli has a mask now of NVME_SANITIZE_SSTAT_STATUS_MASK & to le16_to_cpu(sanitize->sstat) printf("Sanitize Status (SSTAT) : %#x\n", le16_to_cpu(sanitize->sstat) & NVME_SANITIZE_SSTAT_STATUS_MASK); diff is here @@ -6432,7 +6497,7 @@ void nvme_show_sanitize_log(struct nvme_ printf("\n"); printf("Sanitize Status (SSTAT) : %#x\n", - le16_to_cpu(sanitize->sstat)); + le16_to_cpu(sanitize->sstat) & NVME_SANITIZE_SSTAT_STATUS_MASK); if (human) nvme_show_sanitize_log_sstat(le16_to_cpu(sanitize->sstat)); NVME_SANITIZE_SSTAT_STATUS_MASK Mask to get the status value of the most recent sanitize operation. This seems to be why the output has changed. The question becomes, which output is correct