Skip to content

Make persistent discovery controller configurable for the subsystem#3536

Open
hreinecke wants to merge 1 commit into
linux-nvme:masterfrom
hreinecke:subsys-pdc
Open

Make persistent discovery controller configurable for the subsystem#3536
hreinecke wants to merge 1 commit into
linux-nvme:masterfrom
hreinecke:subsys-pdc

Conversation

@hreinecke

Copy link
Copy Markdown
Collaborator

Some subsystems / vendors might choose to enable or disable persistent discovery controllers for particular subsystems, independent on the global option to enable PDCs.
This patch adds a new subsystem configuration option 'persistent_discovery_controller', which controls whether a PDC should be created for this subsystem. The value defaults to the host PDC setting if not specified in the configuration file.

@hreinecke

Copy link
Copy Markdown
Collaborator Author

This is a somewhat competing implementation to #3472; I'm not trying to change the default, but rather control the creation of a PDC on a per-subsystem basis.

@hreinecke
hreinecke force-pushed the subsys-pdc branch 2 times, most recently from b8ac076 to 390bd9f Compare July 2, 2026 10:15
disconnect = true;
else
disconnect = false;
disconnect = libnvme_subsystem_get_pdc_enabled(s);

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah, this makes a lot of sense to me.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

everything in this for loop only runs if _nvmf_discovery gets called with connect = true so running nvme connect. The initial goal was to not only support default pdc for nvme connect, but also nvme discover. The goal post then moved a bit to support default EPCSD for nvme discover as nvme connect supports it already. If the goal of this PR is to support default pdc for nvme connect and not nvme discover then this is fine either way its a step in the right direction.

Sorry for the late reply i somehow missed this until now

@hreinecke
hreinecke force-pushed the subsys-pdc branch 3 times, most recently from 255f151 to 2a3dd3d Compare July 15, 2026 07:03
Some subsystems / vendors might choose to enable or disable persistent
discovery controllers for particular subsystems, independent on the
global option to enable PDCs.
This patch adds a new subsystem configuration option
'persistent_discovery_controller', which controls whether a PDC should
be created for this subsystem. The value defaults to the host PDC setting
if not specified in the configuration file.

Signed-off-by: Hannes Reinecke <hare@suse.de>
@igaw

igaw commented Jul 16, 2026

Copy link
Copy Markdown
Collaborator

As far I understand the implementation it makes sense to handle the PDC on subsys level. @Mr-Bossman, @johnmeneghini WDYT?

disconnect = true;
else
disconnect = false;
disconnect = libnvme_subsystem_get_pdc_enabled(s);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

everything in this for loop only runs if _nvmf_discovery gets called with connect = true so running nvme connect. The initial goal was to not only support default pdc for nvme connect, but also nvme discover. The goal post then moved a bit to support default EPCSD for nvme discover as nvme connect supports it already. If the goal of this PR is to support default pdc for nvme connect and not nvme discover then this is fine either way its a step in the right direction.

Sorry for the late reply i somehow missed this until now

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