rename: nvme_ -> libnvme_ prefix for all library symbols - part 1#3234
Open
igaw wants to merge 2 commits intolinux-nvme:masterfrom
Open
rename: nvme_ -> libnvme_ prefix for all library symbols - part 1#3234igaw wants to merge 2 commits intolinux-nvme:masterfrom
igaw wants to merge 2 commits intolinux-nvme:masterfrom
Conversation
There was a problem hiding this comment.
Pull request overview
Renames library-facing symbols and types from the nvme_ prefix to libnvme_ across the codebase (part 1), including public APIs, internal helpers, and example consumers.
Changes:
- Renamed exported functions/types/macros from
nvme_→libnvme_across core library and utilities. - Updated internal structs (e.g., global context, transport handle, MI endpoint) and call sites to the new
libnvme_identifiers. - Updated linker version scripts and examples to reference new exported symbol names.
Reviewed changes
Copilot reviewed 42 out of 139 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| libnvme/src/nvme/util.c | Renames public utility APIs (status/errno mapping, UUID helpers, get_version, etc.) to libnvme_*. |
| libnvme/src/nvme/uring.c | Renames io_uring helpers and updates types/constants to libnvme_*. |
| libnvme/src/nvme/sysfs.c | Renames sysfs path helper functions to libnvme_*. |
| libnvme/src/nvme/private.h | Renames core internal types (ctx/handle/log/etc.), constants, and internal prototypes to libnvme_*. |
| libnvme/src/nvme/no-json.c | Updates no-json stubs to accept struct libnvme_global_ctx *. |
| libnvme/src/nvme/nbft.h | Renames NBFT public APIs to libnvme_read_nbft / libnvme_free_nbft and updates docs. |
| libnvme/src/nvme/nbft.c | Updates NBFT implementation to use libnvme_* logging/ctx and renamed public functions. |
| libnvme/src/nvme/mi.h | Adjusts MI API types to reference renamed internal endpoint/handle types. |
| libnvme/src/nvme/mi.c | Renames MI internals and updates calls to new libnvme_* passthru and quirk constants. |
| libnvme/src/nvme/mi-mctp.c | Updates MI MCTP transport to renamed MI/core types and libnvme_msg. |
| libnvme/src/nvme/log.c | Renames logging plumbing to __libnvme_msg and public logging accessors to libnvme_*. |
| libnvme/src/nvme/linux.h | Renames Linux helper APIs (TLS/key handling, host id helpers, etc.) to libnvme_*. |
| libnvme/src/nvme/lib.h | Renames public core library APIs to libnvme_* (ctx lifecycle, open/close, handle accessors). |
| libnvme/src/nvme/lib.c | Implements renamed core APIs and updates internal open/close/uring/ioctl usage. |
| libnvme/src/nvme/lib-types.h | Renames exported command structs to libnvme_passthru_cmd / libnvme_uring_cmd. |
| libnvme/src/nvme/json.c | Updates JSON config read/update/dump logic to use libnvme_* accessors/types. |
| libnvme/src/nvme/ioctl.h | Renames ioctl API declarations to libnvme_* and updates docs accordingly. |
| libnvme/src/nvme/ioctl.c | Updates ioctl implementation to renamed handle/cmd types and LIBNVME_IOCTL_* macros. |
| libnvme/src/nvme/filters.h | Renames scan/filter APIs to libnvme_* and adjusts parameter types. |
| libnvme/src/nvme/filters.c | Updates scan/filter implementations and sysfs dir helpers to libnvme_*. |
| libnvme/src/nvme/fabrics.h | Renames fabrics config/URI types and updates various function signatures to new types. |
| libnvme/src/nvme/cmds.c | Renames public command helpers (logs, telemetry, ANA, feature helpers) to libnvme_*. |
| libnvme/src/nvme/cleanup.h | Updates URI cleanup helper to struct libnvme_fabrics_uri **. |
| libnvme/src/libnvme.ld | Updates exported symbol list from nvme_* to libnvme_* under existing version node. |
| libnvme/src/accessors.ld | Updates exported accessor symbol list from nvme_* to libnvme_* under existing version node. |
| libnvme/examples/telemetry-listen.c | Updates example to use libnvme_* types and APIs. |
| libnvme/examples/mi-mctp.c | Updates MI example to use libnvme_* types/passthru APIs and ctx lifecycle. |
| libnvme/examples/mi-mctp-csi-test.c | Updates MI CSI test example to use libnvme_* ctx and passthru/log APIs. |
| libnvme/examples/mi-mctp-ae.c | Updates MI AE example to use libnvme_* global ctx APIs. |
| libnvme/examples/mi-conf.c | Updates MI config example to use libnvme_* global ctx APIs. |
| libnvme/examples/display-tree.c | Updates topology display example to libnvme_* types/iterators and ctx lifecycle. |
| libnvme/examples/display-columnar.c | Updates columnar display example to libnvme_* types/iterators and ctx lifecycle. |
| libnvme/examples/discover-loop.c | Updates discovery loop example to libnvme_* ctx/host/ctrl types and APIs. |
| fabrics.c | Updates nvme-cli fabrics code to use libnvme_* public APIs and types. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
1465f8e to
e2e0bcf
Compare
Use a different prefix for the non NVMe specification part of the library. This avoids confusion what is NVMe specific and what part of the API is from the library itself. Links: https://lore.kernel.org/linux-nvme/20260317150521.GA7382@lst.de/ Signed-off-by: Daniel Wagner <wagi@kernel.org>
Split the NVMe definitions from the library API. 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.
Rename all library-level symbols from nvme_ to libnvme_ prefix.
https://lore.kernel.org/linux-nvme/20260317150521.GA7382@lst.de/