Skip to content

Conversation

@igaw
Copy link
Collaborator

@igaw igaw commented Nov 28, 2025

The DSM ranges data struct needs to be initialized. The rework dropped this part. Also the number of ranges for CDW10 is a 0's value (sic).

Fixes: 6c991dc ("src: rework nvme_dsm command")
Fixes: #nvme-experiments#97

Copy link
Contributor

@MaisenbacherD MaisenbacherD left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I cross-checked the changes with the specs and had some comments :)

nvme.c Outdated
if (!dsm)
return -ENOMEM;

nvme_init_dsm_range(dsm, ctx_attrs, nlbs, slbas, nr);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nlbs is not correctly wired up with the struct config above.
The char *blocks; member of struct config must be char *nlbs; .

Edit: Sorry, it is correctly wired up with the argconfig_parse_comma_sep_array_u32 helper.

I think we should rename the struct config members according to the spec to avoid further confusion :)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's do this on top of this patch

@igaw igaw force-pushed the fix-dsm branch 2 times, most recently from 6cff85f to 5e27c76 Compare November 28, 2025 12:59
The DSM ranges data struct needs to be initialized. The rework dropped
this part. Also the number of ranges for CDW10 is a 0's value (sic).

Fixes: 6c991dc ("src: rework nvme_dsm command")
Signed-off-by: Daniel Wagner <[email protected]>
@igaw igaw merged commit 0841ca0 into linux-nvme:master Nov 28, 2025
26 checks passed
@igaw igaw deleted the fix-dsm branch November 28, 2025 13:09
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.

2 participants