Skip to content

[pull] master from linux-nvme:master#218

Merged
pull[bot] merged 25 commits into
zengqingfu1442:masterfrom
linux-nvme:master
May 28, 2026
Merged

[pull] master from linux-nvme:master#218
pull[bot] merged 25 commits into
zengqingfu1442:masterfrom
linux-nvme:master

Conversation

@pull

@pull pull Bot commented May 28, 2026

Copy link
Copy Markdown

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

igaw and others added 25 commits May 28, 2026 09:41
To easy maintenance and review of newly added commands, sort the existing
functions according the specification order.

Signed-off-by: Daniel Wagner <wagi@kernel.org>
Improve documentation by fixing a bunch of typos and whitespace damage.

Signed-off-by: Daniel Wagner <wagi@kernel.org>
The nvme-cmds header is currently oversized and difficult to maintain.
Split the header into logical sections following the groupings defined
in the NVMe specification.

Signed-off-by: Daniel Wagner <wagi@kernel.org>

merge with adebd7b0879b ("nvme-cmds: split header according to spec grouping")
The nvme-types.h header has become too large and difficult to maintain.

Signed-off-by: Daniel Wagner <wagi@kernel.org>
The nvme-types.h header has become too large and difficult to maintain.

Signed-off-by: Daniel Wagner <wagi@kernel.org>
The nvme-types.h header has become too large and difficult to maintain.

Signed-off-by: Daniel Wagner <wagi@kernel.org>
The nvme-types.h header has become too large and difficult to maintain.

Signed-off-by: Daniel Wagner <wagi@kernel.org>
Move the base definitions to a new header named nvme-types-base.h. This
alignment follows the established architectural patterns of the codebase
and improves modularity.

Signed-off-by: Daniel Wagner <wagi@kernel.org>
Bumps [docker/setup-qemu-action](https://github.com/docker/setup-qemu-action) from 4.0.0 to 4.1.0.
- [Release notes](https://github.com/docker/setup-qemu-action/releases)
- [Commits](docker/setup-qemu-action@ce36039...0611638)

---
updated-dependencies:
- dependency-name: docker/setup-qemu-action
  dependency-version: 4.1.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 4.35.1 to 4.36.0.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](github/codeql-action@c10b806...7211b7c)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-version: 4.36.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [docker/login-action](https://github.com/docker/login-action) from 4.1.0 to 4.2.0.
- [Release notes](https://github.com/docker/login-action/releases)
- [Commits](docker/login-action@4907a6d...650006c)

---
updated-dependencies:
- dependency-name: docker/login-action
  dependency-version: 4.2.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
The get_entity_name and get_entity_version utility functions were only
used for fabrics.  Moves their declarations into private-fabrics.h and
their implementations into util-fabrics.c, and adds libnvmf
prefix for consistency with other fabrics-only utilities.

Signed-off-by: Broc Going <bgoing@micron.com>
The process_field_size_default function used a fixed 256-byte buffer
for formatting hex output, which overflowed when processing fields
larger than 127 bytes (such as Reserved fields up to 302 bytes in
Micron SMART logs). This caused segmentation faults.

Additionally, the loop counter was an unsigned char, limiting
processing to 255 bytes maximum.

Fix by:
- Converting all process_field_size_* functions to return dynamically
  allocated strings instead of writing to caller-provided buffers
- Using asprintf() for consistent dynamic allocation
- Using __cleanup_free in the caller for automatic memory management
- Also fixes a pre-existing memory leak where hex_to_ascii() return
  value was never freed

Signed-off-by: Jim Munn <jlmunn@micron.com>
Disables definitions of min/max macros coming from Windows includes.
Favors local solutions for min/max definitions isntead.
- Removes #ifndef guards around min/max in common.h that were added due
to Windows default min/max definitions.
- Updates mem-win.c to use ccan/minmax definitions.

Signed-off-by: Broc Going <bgoing@micron.com>
Replaces the one use of uint with __u32 for consistency and better
cross-platform compatibility.  This was the only use of the uint type
name in the entire project.

Signed-off-by: Broc Going <bgoing@micron.com>
Windows defines _WIN32 for all Windows platforms, including 64-bit
Windows platforms.  _WIN64 is then defined as a 0 or 1 to indicate
whether the platform is 32 or 64 bit.  The check for defined(_WIN64) is
redundant, since any time _WIN64 is defined, _WIN32 is also defined.
Windows documentation recommends using _WIN32 when checking for Windows.

Removes the redundant _WIN64 check in favor of the more standard check
of just _WIN32.

Signed-off-by: Broc Going <bgoing@micron.com>
The function pointers in libnvmf_context are synchronous interceptors
called at specific points in the operation lifecycle — some of them
(the parser hooks) actually modify the context for subsequent steps.
The term "callback" implies passive, fire-and-forget behavior, which
does not accurately describe their role. Rename to "hooks" throughout.

Signed-off-by: Martin Belanger <martin.belanger@dell.com>
Assisted-by: Claude:claude-sonnet-4-6 [Claude Code]
Group the seven hook function pointers and the associated user_data
field into a dedicated sub-struct embedded in libnvmf_context.

Signed-off-by: Martin Belanger <martin.belanger@dell.com>
Assisted-by: Claude:claude-sonnet-4-6 [Claude Code]
Introduce struct libnvme_ctrl_params to hold the NVMe controller
parameters that identify and configure a connection.

The goal is to make controller parameters self-contained so that code
which only needs to identify or allocate a controller does not need to
depend on libnvmf_context. This is a stepping stone toward separating
fabrics-only code from code that is common to all transports.

Signed-off-by: Martin Belanger <martin.belanger@dell.com>
Assisted-by: Claude:claude-sonnet-4-6 [Claude Code]
libnvme_create_ctrl() copies fctx->ctrl_params.cfg to c->cfg before
nvme_parse_tls_args() runs.  When the keyring or TLS key is specified
as a numeric ID string, nvme_parse_tls_args() writes the resolved ID
back into the cfg it receives.  Because libnvme_create_ctrl() already
ran, the resolved ID ends up only in fctx->ctrl_params.cfg and never
reaches c->cfg, so build_options() reads 0 for tls_key_id and the
key is silently ignored.

Signed-off-by: Martin Belanger <martin.belanger@dell.com>
Assisted-by: Claude:claude-sonnet-4-6 [Claude Code]
The ctrl-find/alloc cluster (libnvme_candidate_init, libnvme_ctrl_find,
libnvme_lookup_ctrl, libnvme_ctrl_alloc) only ever accessed
fctx->ctrl_params.*, so passing the full libnvmf_context was unnecessary
coupling.

json.c no longer needs a full libnvmf_context. Simplify to use
struct libnvme_ctrl_params directly and drop the private-fabrics.h
include.

Move libnvmf_read_sysfs_fabrics_attrs() declaration from
private-fabrics.h to private.h since it is called from tree.c which
should not include private-fabrics.h in the future.

Signed-off-by: Martin Belanger <martin.belanger@dell.com>
Assisted-by: Claude:claude-sonnet-4-6 [Claude Code]
Move the ctrl-find/match cluster out of tree.c and into tree-fabrics.c
so that tree.c no longer depends on private-fabrics.h.

Promote traddr_is_hostname, libnvmf_default_config, and
libnvme_ctrl_find declarations from private-fabrics.h to private.h
since they are called from tree.c which no longer includes
private-fabrics.h.

Signed-off-by: Martin Belanger <martin.belanger@dell.com>
Assisted-by: Claude:claude-sonnet-4-6 [Claude Code]
Adds support for data area 4 for micron telemetry log reading.

Signed-off-by: Broc Going <bgoing@micron.com>
Increase path string  length to account for path and command strings.
Use snprintf to ensure that writes do not go past the end of the buffer.

Signed-off-by: Broc Going <bgoing@micron.com>
If output-format is specified, copy from nvme_args to the local options.
Was always reporting missing output format and defaulting to json.

Signed-off-by: Broc Going <bgoing@micron.com>
@pull pull Bot locked and limited conversation to collaborators May 28, 2026
@pull pull Bot added the ⤵️ pull label May 28, 2026
@pull pull Bot merged commit 75465fc into zengqingfu1442:master May 28, 2026
25 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants