forked from luck/tmp_suning_uos_patched
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>
This commit is contained in:
parent
9b349b080c
commit
2e5d0baa04
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue
Block a user