[bug report][regression] blktests nvme/029 failed on latest linux-block/for-next
Maurizio Lombardi
mlombard at redhat.com
Thu Nov 21 01:02:36 PST 2024
> 64a51080eaba (HEAD) nvmet: implement id ns for nvm command set
I am not 100% sure this implementation follows the NVMe Base
specification correctly.
The specification says:
----
5.17.2.5 I/O Command Set specific Identify Namespace data structure (CNS 05h)
An I/O Command Set specific Identify Namespace data structure (refer
to the applicable I/O Command Set
specification) is returned to the host for the specified namespace if
the value in the Namespace Identifier
(NSID) field is an active NSID. If the value in the NSID field
specifies an inactive NSID, then the controller
returns a zero filled data structure.
---
Now look at the nvme_execute_identify_ns_nvm() implementation:
static void nvme_execute_identify_ns_nvm(struct nvmet_req *req)
{
u16 status;
status = nvmet_req_find_ns(req);
if (status)
goto out;
status = nvmet_copy_to_sgl(req, 0, ZERO_PAGE(0),
NVME_IDENTIFY_DATA_SIZE);
out:
nvmet_req_complete(req, status);
}
Shouldn't it perform nvmet_copy_to_sgl() in every case, ignoring what
nvmet_req_find_ns() returns?
Compare it to what nvmet_execute_identify_ns_zns() does.
Maurizio
More information about the Linux-nvme
mailing list