Skip to content

Add struct nvme_global_ctx to nbft and crypto API#3019

Merged
igaw merged 7 commits intolinux-nvme:masterfrom
igaw:add-ctx
Jan 21, 2026
Merged

Add struct nvme_global_ctx to nbft and crypto API#3019
igaw merged 7 commits intolinux-nvme:masterfrom
igaw:add-ctx

Conversation

@igaw
Copy link
Copy Markdown
Collaborator

@igaw igaw commented Dec 17, 2025

Add the nvme_global_ctx to the nbft and crypto API. This allows these parts of the library to log without using printf & co.

igaw added 4 commits January 20, 2026 21:43
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]>
@igaw igaw force-pushed the add-ctx branch 2 times, most recently from 5ec01cf to e6868d2 Compare January 20, 2026 21:21
@igaw igaw changed the title Add struct nvme_global_ctx everywhere Add struct nvme_global_ctx to nbft and crypto API Jan 20, 2026
igaw added 3 commits January 21, 2026 10:07
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]>
@igaw igaw merged commit 154d78d into linux-nvme:master Jan 21, 2026
19 of 20 checks passed
@igaw igaw deleted the add-ctx branch January 21, 2026 22:04
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