Skip to content

Conversation

@igaw
Copy link

@igaw igaw commented Oct 29, 2025

No description provided.

@igaw igaw force-pushed the nvme-cli3 branch 3 times, most recently from a68b9e0 to 44cefb1 Compare October 31, 2025 15:56
igaw and others added 27 commits October 31, 2025 17:04
track libnvme3 branch.

Signed-off-by: Daniel Wagner <[email protected]>
Update to use the new libnvme API. Unfortunately, it's not possible to do
step by step updates this change is big. Though the resulting diff is
easy to read.

Generally, following things are necessary to get things going:

- replace struct nvme_dev with nvme_link_t
- drop nvme_cli* wrappers
  - remove MI helper functions
- replaced alternative versions of function with latest
- remove libnvme-mi dependency
- parse_and_open opens root and link object
  - use consistently cleanup helpers for root and link object
  - use early returns

Signed-off-by: Daniel Wagner <[email protected]>
[m.kurz92:
  - replace 'nvme_root_t r' with 'struct nvme_global_ctx *ctx'
  - replace 'nvme_link_t l' with 'struct nvme_transport_handle *hdl'
]
Signed-off-by: Markus Kurz <[email protected]>
nvme_scan creates first a root object and then does a scan. Because the
root object is usually already created the parse_and_open helper we
don't need to create another object (and leak the first one). Thus call
directly nvme_scan_topology.

Signed-off-by: Daniel Wagner <[email protected]>
libnvme returns the error code directly now. Replace indirect errno
handling with it	.

Signed-off-by: Daniel Wagner <[email protected]>
In order to keep the naming consistent for the passthru commands data
structure rename the existing cmd to command. This allows to declare
'struct nvme_passthre_cmd *cmd' variables

Signed-off-by: Daniel Wagner <[email protected]>
libnvme changed the API for the nvme_identify commands. Update the
callsite accordingly.

Signed-off-by: Daniel Wagner <[email protected]>
[ikegami.t:
  - use nvme_identify helpers
  - nvme: fix parse_lba_num_si to use nvme_init_identify_active_ns_list]
Signed-off-by: Tokunori Ikegami <[email protected]>
Move nvme_get_log_args to this repository as it was dropped in libnvme.

Signed-off-by: Dennis Maisenbacher <[email protected]>
[wagi: updated the latest version of the the API]
Signed-off-by: Daniel Wagner <[email protected]>
libnvme changed the API for the nvme_set_features commands. Update the
callsite accordingly.

Signed-off-by: Dennis Maisenbacher <[email protected]>
libnvme changed the API for the nvme_get_features commands. Update the
callsite accordingly.

Signed-off-by: Dennis Maisenbacher <[email protected]>
libnvme changed the API for the nvme_dsm command.
Update the callsite accordingly.

Signed-off-by: Markus Kurz <[email protected]>
libnvme changed the API for the nvme_format_nvm command. Update the
callsite accordingly.

Signed-off-by: Dennis Maisenbacher <[email protected]>
libnvme changed the API for the nvme_ns_mgmt commands. Update the
callsite accordingly.

Signed-off-by: Dennis Maisenbacher <[email protected]>
libnvme changed the API for the nvme_ns_attach commands. Update the
callsite accordingly.

Signed-off-by: Dennis Maisenbacher <[email protected]>
libnvme changed the API for the nvme_fw_download commands. Update the
callsite accordingly

Signed-off-by: Dennis Maisenbacher <[email protected]>
libnvme changed the API for the nvme_fw_commit command.
Update the callsite accordingly.

Signed-off-by: Markus Kurz <[email protected]>
libnvme changed the API for the nvme_security_send command.
Update the callsite accordingly.

Signed-off-by: Markus Kurz <[email protected]>
libnvme changed the API for the nvme_security_receive command.
Update the callsite accordingly.

Signed-off-by: Markus Kurz <[email protected]>
libnvme changed the API for the nvme_get_lba_status command.
Update the callsite accordingly.

Signed-off-by: Markus Kurz <[email protected]>
libnvme changed the API for the nvme_directive_send command.
Update the callsite accordingly.

Signed-off-by: Daniel Wagner <[email protected]>
libnvme changed the API for the nvme_directive_recv command.
Update the callsite accordingly.

Signed-off-by: Daniel Wagner <[email protected]>
libnvme changed the API for the nvme_capacity_mgmt command.
Update the callsite accordingly.

Signed-off-by: Daniel Wagner <[email protected]>
libnvme changed the API for the nvme_lockdown command.
Update the callsite accordingly.

Signed-off-by: Markus Kurz <[email protected]>
libnvme changed the API for the nvme_set_property command.
Update the callsite accordingly.

Signed-off-by: Markus Kurz <[email protected]>
libnvme changed the API for the nvme_get_property command.
Update the callsite accordingly.

Signed-off-by: Markus Kurz <[email protected]>
libnvme changed the API for the nvme_sanitize_nvm command.
Update the callsite accordingly.

Signed-off-by: Markus Kurz <[email protected]>
libnvme changed the API for the nvme_dev_self_test command.
Update the callsite accordingly.

Signed-off-by: Markus Kurz <[email protected]>
kurz-m and others added 16 commits October 31, 2025 17:04
libnvme changed the API for the nvme_virtual_mgmt command.
Update the callsite accordingly.

Signed-off-by: Markus Kurz <[email protected]>
libnvme changed the API for the nvme_resv_acquire command.
Update the callsite accordingly.

Signed-off-by: Markus Kurz <[email protected]>
libnvme changed the API for the nvme_resv_register command.
Update the callsite accordingly.

Signed-off-by: Markus Kurz <[email protected]>
libnvme changed the API for the nvme_resv_release commands. Update the
callsite accordingly

Signed-off-by: Dennis Maisenbacher <[email protected]>
libnvme changed the API for the nvme_resv_report commands. Update the
callsite accordingly

Signed-off-by: Dennis Maisenbacher <[email protected]>
libnvme changed the API for the nvme_io_mgmt_recv commands. Update the
callsite accordingly

Signed-off-by: Dennis Maisenbacher <[email protected]>
libnvme changed the API for the nvme_io_mgmt_send commands. Update the
callsite accordingly

Signed-off-by: Dennis Maisenbacher <[email protected]>
libnvme changed the API for the nvme_zns_mgmt_send command.
Update the callsite accordingly.

Signed-off-by: Markus Kurz <[email protected]>
libnvme changed the API for the nvme_zns_mgmt_recv and
nvme_zns_report_zones command. Update the callsite accordingly.

Signed-off-by: Markus Kurz <[email protected]>
libnvme changed the API for the nvme_zns_append command.
Update the callsite accordingly.

Signed-off-by: Markus Kurz <[email protected]>
libnvme changed the API for the nvme_lm_cdq command.
Update the callsite accordingly.

Signed-off-by: Markus Kurz <[email protected]>
[wagi: replaced nvme_ini_lm_cdq with nvme_init_lm_cdq_{create|delete}]
Signed-off-by: Daniel Wagner <[email protected]>
libnvme changed the API for the nvme_lm_track_send command.
Update the callsite accordingly.

Signed-off-by: Markus Kurz <[email protected]>
libnvme changed the API for the nvme_lm_migration_send command.
Update the callsite accordingly.

Signed-off-by: Markus Kurz <[email protected]>
libnvme changed the API for the nvme_lm_migration_recv command.
Update the callsite accordingly.

Signed-off-by: Markus Kurz <[email protected]>
libnvme changed the API for the nvme_io command. Update the
callsite accordingly.

Signed-off-by: Tokunori Ikegami <[email protected]>
libnvme changed the API for the nvme_copy command. Update the
callsite accordingly.

Signed-off-by: Tokunori Ikegami <[email protected]>
Since incorrectly used nvme_submit_admin_passthru by the commands.

Signed-off-by: Tokunori Ikegami <[email protected]>
Incorrectly hard coded values are set to libnvme API.

Signed-off-by: Tokunori Ikegami <[email protected]>
@igaw igaw closed this Nov 26, 2025
@igaw igaw deleted the nvme-cli3 branch December 17, 2025 17:59
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.

5 participants