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.
Bug 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
Summary: nvme-cli 9.2 Changes in Version 2.2.1 added a NVME_SANITIZE_SSTAT_STATUS_MASK...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 9
Classification: Red Hat
Component: nvme-cli
Version: 9.2
Hardware: x86_64
OS: Linux
high
high
Target Milestone: rc
: 9.3
Assignee: Maurizio Lombardi
QA Contact: Zhang Yi
URL:
Whiteboard:
Depends On:
Blocks: 1798275 2186840 2186842 2186843 1846002 2214603
TreeView+ depends on / blocked
 
Reported: 2023-05-18 21:35 UTC by loberman
Modified: 2023-11-07 11:20 UTC (History)
8 users (show)

Fixed In Version: nvme-cli-2.4-6.el9
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 2214603 (view as bug list)
Environment:
Last Closed: 2023-11-07 08:51:44 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker RHELPLAN-157685 0 None None None 2023-05-18 21:36:51 UTC
Red Hat Product Errata RHEA-2023:6604 0 None None None 2023-11-07 08:52:02 UTC

Description loberman 2023-05-18 21:35:57 UTC
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

Comment 19 errata-xmlrpc 2023-11-07 08:51:44 UTC
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


Note You need to log in before you can comment on or make changes to this bug.