Page MenuHomeFreeBSD

Fix namespace listing for old NVMe devices
ClosedPublic

Authored by mav on Thu, Jul 2, 4:58 PM.
Tags
None
Referenced Files
F164470075: D58010.id181229.diff
Sat, Aug 1, 6:22 AM
F164453594: D58010.id182562.diff
Sat, Aug 1, 4:17 AM
F164431533: D58010.id.diff
Fri, Jul 31, 10:11 PM
Unknown Object (File)
Fri, Jul 31, 5:33 AM
Unknown Object (File)
Fri, Jul 31, 4:44 AM
Unknown Object (File)
Thu, Jul 30, 11:45 PM
Unknown Object (File)
Tue, Jul 28, 12:50 PM
Unknown Object (File)
Mon, Jul 27, 2:14 AM
Subscribers

Details

Summary

Commit 9e1db51d4b5fc made camcontrol devlist get list of active namespaces from the device instead of iterating through all possible IDs. The problem is that this request is not supported before NVMe 1.1, and in particular by Intel Optane 905P drives. This change reintroduces iteration for devices before NVMe 1.2.

Test Plan

Before:

# nvmecontrol devlist
 nvme0: WD_BLACK SN770 1TB
    nvme0ns1 (953869MB)
 nvme1: INTEL SSDPE21D480GA
 nvme2: INTEL SSDPE21D480GA
 nvme3: INTEL SSDPE21D480GA

After:

# nvmecontrol devlist
 nvme0: WD_BLACK SN770 1TB
    nvme0ns1 (953869MB)
 nvme1: INTEL SSDPE21D480GA
    nvme1ns1 (457862MB)
 nvme2: INTEL SSDPE21D480GA
    nvme2ns1 (457862MB)
 nvme3: INTEL SSDPE21D480GA
    nvme3ns1 (457862MB)

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

mav requested review of this revision.Thu, Jul 2, 4:58 PM
sbin/nvmecontrol/devlist.c
120–121

I see why this change exists, but it feels weird that a "print" function has a side effect.

This revision is now accepted and ready to land.Tue, Jul 7, 6:24 PM
This revision was automatically updated to reflect the committed changes.