Add struct nvme_global_ctx to nbft and crypto API#3019
Merged
igaw merged 7 commits intolinux-nvme:masterfrom Jan 21, 2026
Merged
Add struct nvme_global_ctx to nbft and crypto API#3019igaw merged 7 commits intolinux-nvme:masterfrom
struct nvme_global_ctx to nbft and crypto API#3019igaw merged 7 commits intolinux-nvme:masterfrom
Conversation
It's not possible to run the test under gdb because in this configuration mock calls fail for all unknown IOCTLs. As it turns, just returning a not supported let's the test case still run under gdb. Signed-off-by: Daniel Wagner <[email protected]>
Add the global context to struct nvme_ns and struct nvme_ctrl, so it's possible to access the context within the tree operations. This avoids the need to add the global context pointer to every single function. Only those which create the objects need it. Signed-off-by: Daniel Wagner <[email protected]>
struct nvme_ns and struct nvme_ctrl both have now a global context pointer, no need for pointer chasing anymore. Signed-off-by: Daniel Wagner <[email protected]>
The discovery code wants to access the global context, thus initial the pointer in the mock setup. Signed-off-by: Daniel Wagner <[email protected]>
5ec01cf to
e6868d2
Compare
struct nvme_global_ctx everywherestruct nvme_global_ctx to nbft and crypto API
Add the global context to the crypto related API. This allows to issue warnings/errors via the global context. Signed-off-by: Daniel Wagner <[email protected]>
Add the global context to the nbft related API. This allows to issue warnings/errors via the global context. Signed-off-by: Daniel Wagner <[email protected]>
The global context has been introduced throughout the library thus we don't need the fallback default global context anymore. Signed-off-by: Daniel Wagner <[email protected]>
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.
Add the
nvme_global_ctxto the nbft and crypto API. This allows these parts of the library to log without using printf & co.