Project

General

Profile

Actions

Bug #16428

closed

nvmeadm list-logs is not properly filtering unimpl logs

Added by Robert Mustacchi 25 days ago. Updated 15 days ago.

Status:
Closed
Priority:
Normal
Category:
cmd - userland programs
Start date:
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:
External Bug:

Description

While working through #16427 I went back to a few NVMe 1.0 devices and noticed the new log pages where showing up there. The problem here is that we're not actually using the unimplemented pages filter correctly that -a controls in nvmeadm list-logs due to a bug in nvmeadm's filtering logic.

Actions #1

Updated by Electric Monk 25 days ago

  • Gerrit CR set to 3388
Actions #2

Updated by Robert Mustacchi 16 days ago

Here's this working against an NVMe 1.0 log page that properly indicates what is and isn't there:

rm@remus ~ $ pfexec nvmeadm list nvme17
nvme17: model: INTEL SSDPE2ME800G4, serial: CVMD7392007D800VGN, FW rev: 8DV10171, NVMe v1.0
  nvme17/1 (c28t1d0): Size = 745.21 GB, Capacity = 745.21 GB, Used = 745.21 GB
rm@remus ~ $ pfexec nvmeadm list-logpages nvme17
DEVICE  NAME              SCOPE         FIELDS    DESC
nvme17  error             controller    rae       Error information
nvme17  health            controller    rae       SMART / Health information
nvme17  firmware          nvm           --        Firmware Slot Information
rm@remus ~ $ pfexec nvmeadm list-logpages -a nvme17
DEVICE  NAME              SCOPE         IMPL  FIELDS    DESC
nvme17  suplog            controller    no    --        Supported Log Pages
nvme17  error             controller    yes   rae       Error information
nvme17  health            controller    yes   rae       SMART / Health information
nvme17  firmware          nvm           yes   --        Firmware Slot Information
nvme17  changens          controller    no    rae       changed namespaces
nvme17  cmdeff            controller    no    --        commands supported and effects

Here is a corresponding NVMe 2.0 device:

rm@remus ~ $ pfexec nvmeadm list-logpages nvme22
DEVICE  NAME              SCOPE         FIELDS    DESC
nvme22  suplog            controller    --        Supported Log Pages
nvme22  error             controller    rae       Error information
nvme22  health            controller    rae       SMART / Health information
nvme22  firmware          nvm           --        Firmware Slot Information
nvme22  changens          controller    rae       changed namespaces
nvme22  cmdeff            controller    --        commands supported and effects
nvme22  ocp/smart         nvm           --        OCP SMART / Health Information
nvme22  ocp/errrec        nvm           --        OCP Error Recovery
nvme22  ocp/fwact         nvm           --        OCP Firmware Activation
nvme22  ocp/latency       nvm           --        OCP Latency Monitor
nvme22  ocp/devcap        nvm           --        OCP Device Capabilities
nvme22  ocp/unsup         nvm           --        OCP Unsupported Requirements
rm@remus ~ $ pfexec nvmeadm list-logpages -a nvme22
DEVICE  NAME              SCOPE         IMPL  FIELDS    DESC
nvme22  suplog            controller    yes   --        Supported Log Pages
nvme22  error             controller    yes   rae       Error information
nvme22  health            controller    yes   rae       SMART / Health information
nvme22  firmware          nvm           yes   --        Firmware Slot Information
nvme22  changens          controller    yes   rae       changed namespaces
nvme22  cmdeff            controller    yes   --        commands supported and effects
nvme22  ocp/smart         nvm           yes   --        OCP SMART / Health Information
nvme22  ocp/errrec        nvm           yes   --        OCP Error Recovery
nvme22  ocp/fwact         nvm           yes   --        OCP Firmware Activation
nvme22  ocp/latency       nvm           yes   --        OCP Latency Monitor
nvme22  ocp/devcap        nvm           yes   --        OCP Device Capabilities
nvme22  ocp/unsup         nvm           yes   --        OCP Unsupported Requirements

The difference in the OCP log set between them is due to the fact that the NVMe 2.0 device has several vendor-specific logs plumbed through.

Actions #3

Updated by Electric Monk 15 days ago

  • Status changed from New to Closed
  • % Done changed from 0 to 100

git commit 046911ebe8113d65d8e3ddbd342afcbf7a70c7d1

commit  046911ebe8113d65d8e3ddbd342afcbf7a70c7d1
Author: Robert Mustacchi <rm@fingolfin.org>
Date:   2024-04-07T00:24:19.000Z

    16427 want libnvme support for supported command and log page logs
    16428 nvmeadm list-logs is not properly filtering unimpl logs
    Reviewed by: Andy Fiddaman <illumos@fiddaman.net>
    Reviewed by: C Fraire <cfraire@me.com>
    Reviewed by: Dan McDonald <danmcd@mnx.io>
    Reviewed by: Hans Rosenfeld <rosenfeld@grumpf.hope-2000.org>
    Approved by: Gordon Ross <gordon.w.ross@gmail.com>

Actions

Also available in: Atom PDF