Skip to content

Update nvme_scan_filter_t#330

Merged
hreinecke merged 5 commits intolinux-nvme:masterfrom
hreinecke:filter-ns
Apr 1, 2022
Merged

Update nvme_scan_filter_t#330
hreinecke merged 5 commits intolinux-nvme:masterfrom
hreinecke:filter-ns

Conversation

@hreinecke
Copy link
Copy Markdown
Collaborator

@hreinecke hreinecke commented Apr 1, 2022

Update nvme_scan_filter_t to accept 4 arguments (subsystem, controller, namespace, f_args) and apply the filter for subsystem namespaces, too. This allows for a more targeted filter implementations and to remove the hack to display the ANA state.

Add two more arguments (nvme_ctrl_t and nvme_ns_t) to the nvme scan
filter to allow the implementation to distinguish between the call sites.
This allows for a more targeted approach when implementing filters.

Signed-off-by: Hannes Reinecke <hare@suse.de>
As the scan filter accepts a namespace as argument use it to
filter out namespaces, too.

Signed-off-by: Hannes Reinecke <hare@suse.de>
For some reason the namespace path iterators have not been implemented.

Signed-off-by: Hannes Reinecke <hare@suse.de>
This function was a hack to begin with, and as we now have namespace
filters it can be removed.

Signed-off-by: Hannes Reinecke <hare@suse.de>
Increase usability by adding an 'f_args' argument to pass user data
to the filter function.

Signed-off-by: Hannes Reinecke <hare@suse.de>
@hreinecke
Copy link
Copy Markdown
Collaborator Author

@igaw is that what you had in mind?

@hreinecke hreinecke requested a review from igaw April 1, 2022 14:06
@igaw
Copy link
Copy Markdown
Collaborator

igaw commented Apr 1, 2022

Yeah, this is way more generic and allows the user of the API to hold context without heaving to fallback using global variables.

@hreinecke hreinecke merged commit a1369c8 into linux-nvme:master Apr 1, 2022
@hreinecke hreinecke deleted the filter-ns branch April 1, 2022 15:23
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.

2 participants