1
0
Fork 0

nvmet: Make dsm number of ranges zero based

This caused the nvmet request data length to be
incorrect.

Signed-off-by: Alexander Solganik <sashas@lightbitslabs.com>
Signed-off-by: Sagi Grimberg <sagi@grimberg.me>
Reviewed-by: Christoph Hellwig <hch@lst.de>
steinar/wifi_calib_4_9_kernel
Alexander Solganik 2016-09-21 14:12:38 -07:00 committed by Sagi Grimberg
parent 9b349b080c
commit 2e5d0baa04
1 changed files with 1 additions and 1 deletions

View File

@ -206,7 +206,7 @@ int nvmet_parse_io_cmd(struct nvmet_req *req)
return 0;
case nvme_cmd_dsm:
req->execute = nvmet_execute_dsm;
req->data_len = le32_to_cpu(cmd->dsm.nr) *
req->data_len = le32_to_cpu(cmd->dsm.nr + 1) *
sizeof(struct nvme_dsm_range);
return 0;
default: