Skip to content

Commit

Permalink
ioctl: set data length when retrieving LBA status
Browse files Browse the repository at this point in the history
Current nvme_get_lba_status() function does specify any data_len in the
admin command, resulting in zero data being returned.

This is the least intrusive change as it requires no update to nvme-cli.

Signed-off-by: Nate Thornton <[email protected]>
  • Loading branch information
NateThornton committed Dec 8, 2023
1 parent 6b61dd4 commit 5e76d60
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/nvme/ioctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -1568,6 +1568,7 @@ int nvme_get_lba_status(struct nvme_get_lba_status_args *args)
.opcode = nvme_admin_get_lba_status,
.nsid = args->nsid,
.addr = (__u64)(uintptr_t)args->lbas,
.data_len = (args->mndw + 1) << 2,
.cdw10 = cdw10,
.cdw11 = cdw11,
.cdw12 = cdw12,
Expand Down

0 comments on commit 5e76d60

Please sign in to comment.