]> www.infradead.org Git - users/sagi/libnvme.git/commitdiff
ioctl: set data length when retrieving LBA status
authorNate Thornton <n.thornton@samsung.com>
Thu, 7 Dec 2023 22:02:16 +0000 (16:02 -0600)
committerDaniel Wagner <wagi@monom.org>
Mon, 11 Dec 2023 08:01:33 +0000 (09:01 +0100)
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 <n.thornton@samsung.com>
src/nvme/ioctl.c

index 3a068f270589a68dde94be69bc4458d1f11f2c18..9090b7e6d5ca00e22408e31928fa984c0de1528a 100644 (file)
@@ -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,