More API refactoring and cleanups#3188
Merged
igaw merged 9 commits intolinux-nvme:masterfrom Mar 17, 2026
Merged
Conversation
82ee5df to
c8db16e
Compare
These helper functions wrap nvme_init_* and nvme_submit_*, which makes it hard to keep the API stable. Move them to nvme-cli, where they are used extensively. Signed-off-by: Daniel Wagner <wagi@kernel.org>
nvme-cli implements firmware download with additional checks, making it more robust and safer to use. There are no users of this function, so remove it. Signed-off-by: Daniel Wagner <wagi@kernel.org>
Separate the nvme_init_* inline functions from the rest. Signed-off-by: Daniel Wagner <wagi@kernel.org>
These init functions were added to the .c file due to the use of the cpu_to_* macros. Move them to the header and use the hto* functions, since cmds.h already relies on them. Signed-off-by: Daniel Wagner <wagi@kernel.org>
Move these trivial functions to nvme-cli. Since they had to be modified recently due to the I/O Submission Handling (ISH) bit, it is better to move them out of the library to simplify maintaining a stable API. Signed-off-by: Daniel Wagner <wagi@kernel.org>
Factor out the io_uring code into a new file to make it easier to move the nvme_get_log code as well. While at it, initialize the ring lazily on the first transport handle creation instead of creating and tearing it down for each nvme_get_log call. Signed-off-by: Daniel Wagner <wagi@kernel.org>
Group all generic command implementations into a single file. Signed-off-by: Daniel Wagner <wagi@kernel.org>
Group the nvme_get* commands together. Signed-off-by: Daniel Wagner <wagi@kernel.org>
Make the naming more consistent. Functions are grouped by common prefixes. Generic top-level functions use the nvme_ prefix, while functions operating on specific objects use the object type as a prefix (e.g., nvme_ns_). The prefix is typically followed by a verb, such as nvme_create_ctrl. Signed-off-by: Daniel Wagner <wagi@kernel.org>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.