Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nvme: set eds to true if controller supports 128 bit hostid #2670

Merged
merged 1 commit into from
Jan 22, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions nvme.c
Original file line number Diff line number Diff line change
Expand Up @@ -7740,6 +7740,7 @@ static int resv_report(int argc, char **argv, struct command *cmd, struct plugin
const char *eds = "request extended data structure";

_cleanup_free_ struct nvme_resv_status *status = NULL;
_cleanup_free_ struct nvme_id_ctrl *ctrl = NULL;
_cleanup_nvme_dev_ struct nvme_dev *dev = NULL;
nvme_print_flags_t flags;
int err, size;
Expand Down Expand Up @@ -7792,6 +7793,19 @@ static int resv_report(int argc, char **argv, struct command *cmd, struct plugin

size = (cfg.numd + 1) << 2;

ctrl = nvme_alloc(sizeof(*ctrl));
if (!ctrl)
return -ENOMEM;

err = nvme_cli_identify_ctrl(dev, ctrl);
if (err) {
nvme_show_error("identify-ctrl: %s", nvme_strerror(errno));
return -errno;
}

if (ctrl->ctratt & NVME_CTRL_CTRATT_128_ID)
cfg.eds = true;

status = nvme_alloc(size);
if (!status)
return -ENOMEM;
Expand Down
Loading