Skip to content

Conversation

@igaw
Copy link
Collaborator

@igaw igaw commented Jan 9, 2026

After moving the update config away, it's possible to move the lookup function into the private section. It is still necessary to have a way to get a host or subsystem, thus introduce a couple new function. The motivation here is that we have the lookup function operate either on a host, subsystem or ctrl object. When object doesn't exist it will create one. We really want also the global context at creation time. Yes, we could add the global context to the lookup API but this seems a bit strange. Also I think it would be better to split these functionality in the future. Though at this point I don't wont to introduce regression. Thus a simple getter should to the trick

igaw added 6 commits January 9, 2026 08:48
Move the configuration update code to the library.

Signed-off-by: Daniel Wagner <wagi@kernel.org>
There is no user for this, thus remove it.

Signed-off-by: Daniel Wagner <wagi@kernel.org>
Replace the nvme_default_host function with a more generic nvme_host_get
function which will create the host object if necessary. This also
allows to retire the nvme_lookup_host function from the public API.

Signed-off-by: Daniel Wagner <wagi@kernel.org>
Split the create host code into a separate function to explicitly
document the create new object if it is not found.

Signed-off-by: Daniel Wagner <wagi@kernel.org>
Replace the nvme_lookup_subsystem function with nvme_subsystem_get
function which will create the host object if necessary. This
allows to retire the nvme_lookup_host function from the public API.

Signed-off-by: Daniel Wagner <wagi@kernel.org>
There are no public users for these function. Make them private so we
can refactor them without breaking the API in future.

Signed-off-by: Daniel Wagner <wagi@kernel.org>
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