Skip to content

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

Merged
igaw merged 4 commits into
linux-nvme:masterfrom
martin-belanger:epcsd-persistent-flags
Aug 10, 2026
Merged

nvme: redesign --persistent, remove --epcsd/--no-epcsd#3776
igaw merged 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]

@igaw

igaw commented Aug 10, 2026

Copy link
Copy Markdown
Collaborator

Just from the user point of view, this makes a lot of sense. So I personally would prefer the interface to the user over the for different flags. @Mr-Bossman any objections?

Comment thread src/fabrics.c Outdated
@martin-belanger
martin-belanger force-pushed the epcsd-persistent-flags branch 2 times, most recently from 75cc1a0 to 4b09cda Compare August 10, 2026 10:37
@Mr-Bossman

Copy link
Copy Markdown
Contributor

Just from the user point of view, this makes a lot of sense. So I personally would prefer the interface to the user over the for different flags. @Mr-Bossman any objections?

This looks good. It seems to change the default behavior of nvme connect to --persistent=no rather than --persistent=auto like it was before, this isn't an issue just something to note.

Comment thread src/fabrics.c Outdated
Martin Belanger added 4 commits August 10, 2026 11:48
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>
@igaw
igaw merged commit e5e5fd2 into linux-nvme:master Aug 10, 2026
33 of 34 checks passed
@igaw

igaw commented Aug 10, 2026

Copy link
Copy Markdown
Collaborator

I hope we got figured this now out :)

Thanks!

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.

3 participants