nvme: disconnect-all --transport short option + add --owner option#3466
Merged
igaw merged 2 commits intoJun 22, 2026
Conversation
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>
Collaborator
|
Thanks for checking all the command options and make it consistent! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two small, independent fabrics CLI changes building on the ownership registry (#3425).
1. disconnect-all:
-r→-tfor--transportEvery other fabrics command spells
--transportas-t(the sharedNVMF_ARGSmacro), butdisconnect-alldefined its own option set and used-r.-tis the canonical transport short form and is now free ondisconnect-allsince--timeoutno longer claims a short form. This is a deliberate break with no-ralias. Also drops a stray(char *)cast on the option's value argument.2. Add
--owner NAMEto connect, connect-all and discoverThese 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-allwould tear them down. A new long-only--owner NAMEoption records ownership in the registry (vialibnvme_set_owner()) before connecting.--ownerhas no short form on any command. To keep that consistent,disconnect-all's--owneralso loses its-Oshort form.connect-all/discover,--nbftalready recordsowner=nbftso legacy boot scripts get ownership for free. An explicit--ownernow overrides that default; a plain--nbft(no--owner) still recordsnbft, so the boot path is unchanged.Man pages and shell completions are updated to match.