Skip to content

nvme: redesign --persistent, remove --epcsd/--no-epcsd - #3776

Open
martin-belanger wants to merge 4 commits into
linux-nvme:masterfrom
martin-belanger:epcsd-persistent-flags
Open

nvme: redesign --persistent, remove --epcsd/--no-epcsd#3776
martin-belanger wants to merge 4 commits into
linux-nvme:masterfrom
martin-belanger:epcsd-persistent-flags

Conversation

@martin-belanger

Copy link
Copy Markdown

Redesigns discovery controller persistence around EPCSD, and removes the now-redundant --epcsd/--no-epcsd flags.

--persistent[=no|auto|force] replaces --persistent/--no-persistent and --epcsd/--no-epcsd. Bare --persistent means auto; omitted means no. In auto mode, persistence is decided per Discovery Log Page entry, driven entirely by that entry's own EPCSD flag -- no and force are explicit overrides of that default.

EPCSD only affects whether a connection is kept alive afterward, not discovery itself: discover/connect-all still fetch every Discovery Log Page and follow every referral regardless of EPCSD, exactly as before this change. An EPCSD=0 entry's Discovery Log Page is still fully processed; it's just disconnected once that's done, not skipped.

Four commits, in review order:

  • nvme: add OPT_STRING_OPTIONAL() for optional-argument options -- generic CLI framework addition, no behavior change on its own.
  • nvme: split discovery.conf lines on whitespace only, not '=' -- fixes a latent tokenizer bug that would otherwise silently break a glued --opt=value inside a discovery.conf line.
  • nvme: redesign --persistent, remove --epcsd/--no-epcsd -- the actual behavior change, in both libnvme and the CLI.
  • doc: document --persistent[=no|auto|force]

Martin Belanger added 4 commits August 7, 2026 12:12
First use of getopt's optional_argument in this codebase. The
value must be attached to the option (--opt=value or -ovalue);
getopt never consumes a separate following token for it.

Signed-off-by: Martin Belanger <martin.belanger@dell.com>
Splitting on '=' silently breaks a glued "--opt=value" token.
getopt_long() parses '=' within a single token natively, so
splitting it out here was never needed.

Signed-off-by: Martin Belanger <martin.belanger@dell.com>
--persistent[=no|auto|force] replaces --persistent/--no-persistent
and --epcsd/--no-epcsd. Bare --persistent means "auto"; omitted
means "no". "force" covers the old epcsd override case, so epcsd
is no longer a separate concept. config create/convert accept the
same values for the persistent config key.

Signed-off-by: Martin Belanger <martin.belanger@dell.com>
Signed-off-by: Martin Belanger <martin.belanger@dell.com>
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.

1 participant