Skip to content

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

Merged
pull[bot] merged 7 commits into
zengqingfu1442:masterfrom
linux-nvme:master
Jun 22, 2026
Merged

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

Conversation

@pull

@pull pull Bot commented Jun 22, 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 : )

Martin Belanger and others added 7 commits June 22, 2026 14:13
Make struct libnvme_global_ctx the first argument of every public
libnvmf_registry_* function. Most do not use it yet, but threading it in
now lets a future version log via libnvme_msg() or reach per-context
state without breaking the ABI again. Each public function rejects a
NULL context with -EINVAL; the internal *_instance helpers only forward
it and do not re-validate. Also forward-declare the struct in registry.h
so the public header is self-contained.

While here, fix disconnect_all_match() in fabrics.c to take the caller's
context instead of creating one per controller. It also returned -ENOMEM
from a function declared bool, which coerces to true and would have
disconnected controllers on an allocation failure.

Signed-off-by: Martin Belanger <martin.belanger@dell.com>
The python-registry parallel-writes test only passed under the "fork"
multiprocessing start method. Python 3.14 makes "forkserver" the default
on Linux, where the test failed two ways:

  - Each child re-imports the test module, which unconditionally created
    a fresh NVME_REGISTRY_DIR. The children then wrote to a directory the
    parent never reads, so the final value came back as the parent's
    initial write.

  - The libnvme context was passed as a Process argument. A SwigPyObject
    cannot be pickled for spawn/forkserver, and a context is not meant to
    be shared across processes anyway.

Reuse an inherited /tmp registry directory instead of always creating a
new one, and have each writer process create its own GlobalCtx. Verified
under fork, forkserver and spawn.

Signed-off-by: Martin Belanger <martin.belanger@dell.com>
Breaking retrieval in smaller chunks if large chunk fails.

Signed-off-by: Leonardo da Cunha <leonardo.da.cunha@solidigm.com>
Removed broken code that once tried to dynamically reduce
retrieval chunk size.
Dynamic chunk size got moved inside libnvme code.

Signed-off-by: Leonardo da Cunha <leonardo.da.cunha@solidigm.com>
Simplify create_common_context by calling setup_common_context.
Add to set_fabrics_options to setup_common_context as both callers
call it after setup_common_context.

Signed-off-by: Jesse Taube <jtaubepe@redhat.com>
hook_parser_next_line used gotos to implement a do-while loop.
Replace the gotos with a do-while loop to improve readability.

Signed-off-by: Jesse Taube <jtaubepe@redhat.com>
Take the controller as the positional <device> argument on retrieve,
update and delete, matching every other nvme command and dropping the
odd-one-out -d/--device option.

Drop the hard -EPERM block on writing the 'owner' attribute: it protected
nothing (root can edit /run/nvme/registry/ directly) yet inconsistently
let 'delete' clear ownership anyway. update and delete now confirm before
an operation that changes or removes ownership; scripts proceed without
prompting.

While here, give delete an optional --attr to remove a single attribute
(clearer than "update with no value"), and require an explicit --attr on
retrieve rather than silently defaulting to 'owner'.

Signed-off-by: Martin Belanger <martin.belanger@dell.com>
@pull pull Bot locked and limited conversation to collaborators Jun 22, 2026
@pull pull Bot added the ⤵️ pull label Jun 22, 2026
@pull
pull Bot merged commit 3745ec9 into zengqingfu1442:master Jun 22, 2026
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.

2 participants