Skip to content

nvme: disconnect-all --transport short option + add --owner option#3466

Merged
igaw merged 2 commits into
linux-nvme:masterfrom
martin-belanger:add-owner-option-to-cmds
Jun 22, 2026
Merged

nvme: disconnect-all --transport short option + add --owner option#3466
igaw merged 2 commits into
linux-nvme:masterfrom
martin-belanger:add-owner-option-to-cmds

Conversation

@martin-belanger

Copy link
Copy Markdown

Two small, independent fabrics CLI changes building on the ownership registry (#3425).

1. disconnect-all: -r-t for --transport

Every other fabrics command spells --transport as -t (the shared NVMF_ARGS macro), but disconnect-all defined its own option set and used -r. -t is the canonical transport short form and is now free on disconnect-all since --timeout no longer claims a short form. This is a deliberate break with no -r alias. Also drops a stray (char *) cast on the option's value argument.

2. Add --owner NAME to connect, connect-all and discover

These commands establish controller connections through libnvme but had no way to record the connecting orchestrator's identity, so the controllers they created always looked unowned and disconnect-all would tear them down. A new long-only --owner NAME option records ownership in the registry (via libnvme_set_owner()) before connecting.

  • --owner has no short form on any command. To keep that consistent, disconnect-all's --owner also loses its -O short form.
  • For connect-all/discover, --nbft already records owner=nbft so legacy boot scripts get ownership for free. An explicit --owner now overrides that default; a plain --nbft (no --owner) still records nbft, so the boot path is unchanged.

Man pages and shell completions are updated to match.

Martin Belanger added 2 commits June 22, 2026 13:15
Every other fabrics command spells --transport as -t (via the shared
NVMF_ARGS macro), but disconnect-all defined its own option set with -r.
-t is the canonical transport short form and is now free on
disconnect-all, since --timeout no longer claims a short form, so switch
to it for consistency. This is a deliberate break with no -r alias.

While here, drop a stray (char *) cast on the option's value argument,
matching how the same option is declared elsewhere.

Signed-off-by: Martin Belanger <martin.belanger@dell.com>
These commands establish controller connections through libnvme but had
no way to record the connecting orchestrator's identity, so every
controller they created looked unowned and disconnect-all would tear it
down. Add a long-only --owner NAME option that calls libnvme_set_owner()
before connecting.

For connect-all and discover, --nbft already records owner=nbft so legacy
boot scripts get ownership for free. An explicit --owner now overrides
that default; a plain --nbft (no --owner) still records nbft, so the boot
path is unchanged.

--owner has no short form here, and disconnect-all's --owner loses its -O
short form to match, so --owner is long-only on every command.

Signed-off-by: Martin Belanger <martin.belanger@dell.com>
@igaw igaw merged commit 6bed87f into linux-nvme:master Jun 22, 2026
30 of 31 checks passed
@igaw

igaw commented Jun 22, 2026

Copy link
Copy Markdown
Collaborator

Thanks for checking all the command options and make it consistent!

@martin-belanger martin-belanger deleted the add-owner-option-to-cmds branch June 22, 2026 21:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants