Project

General

Profile

Actions

Bug #14690

closed

nvmeadm should refer to namespaces by their nsid

Added by Hans Rosenfeld over 1 year ago. Updated 12 months ago.

Status:
Closed
Priority:
Normal
Category:
driver - device drivers
Start date:
Due date:
% Done:

100%

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

Description

When support for the namespace EUI64 was added in #7382, it seemed like a good idea to expose that to userspace in such a way that it replaced the namespace ID as a means for specifying a namespace:

# nvmeadm list nvme1/1413577160000a35
nvme1: model: ATP NVMe M.2 2280 SSD, serial: 20040276-000142, FW rev: 42A0S79A, NVMe v1.3
  nvme1/1413577160000a35 (c3t1413577160000A35d0): Size = 488386 MB, Capacity = 488386 MB, Used = 101603 MB

This will create two problems. First, once we'll be using the full NGUID, the size of the namespace identifier doubles to a full 32 characters, and so does device node name. This will make the output of 'nvmeadm list' even wider than it already is, causing ugly line breaks even on wide terminals, only to display the same information twice.

And second, once we have namespace management we'll run into usability nightmare. Just detaching a controller from a namespace will make the EUI64 or NGUID invisible to the driver, and deleting and re-creating a namespace may change the EUI64 or NGUID completely. This means that across these operations, the namespace identifier may change, the device nodes may have to be deleted and recreated by the driver, and the user will be needlessly confused.

Returning to the old original behaviour of always using the namespace nsid will avoid all of this, as the nsid will be a small number in most use cases that will never change across namespace management operations:

# nvmeadm list nvme1/1
nvme1: model: ATP NVMe M.2 2280 SSD, serial: 20040276-000142, FW rev: 42A0S79A, NVMe v1.3
  nvme1/1 (c3t6141357160000A351413570000000000d0): Size = 488386 MB, Capacity = 488386 MB, Used = 101451 MB

Related issues

Related to illumos gate - Feature #14959: NVMe namespace management supportNewHans Rosenfeld

Actions
Actions #1

Updated by Electric Monk over 1 year ago

  • Gerrit CR set to 2151
Actions #2

Updated by Hans Rosenfeld about 1 year ago

Actions #3

Updated by Hans Rosenfeld about 1 year ago

Testing: I have verified that nvmeadm(8) gets the correct namespace for all three kinds of allowed argument: namespace ID, EUI64, and NGUID.

Actions #4

Updated by Electric Monk 12 months ago

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

git commit 670f080b72593a4a43a509cd4a020ffe8a6484a6

commit  670f080b72593a4a43a509cd4a020ffe8a6484a6
Author: Hans Rosenfeld <rosenfeld@grumpf.hope-2000.org>
Date:   2022-10-11T19:39:31.000Z

    14690 nvmeadm should refer to namespaces by their nsid
    Reviewed by: Andrew Giles <agiles@tintri.com>
    Reviewed by: Guy Morrogh <gmorrogh@tintri.com>
    Reviewed by: Robert Mustacchi <rm@fingolfin.org>
    Approved by: Dan McDonald <danmcd@mnx.io>

Actions

Also available in: Atom PDF