[PATCH] nvmet: fix the use of ZERO_PAGE in nvme_execute_identify_ns_nvm()

Maurizio Lombardi mlombard at redhat.com
Fri Nov 22 01:29:46 PST 2024


pá 22. 11. 2024 v 9:51 odesílatel Nilay Shroff <nilay at linux.ibm.com> napsal:
>  static void nvme_execute_identify_ns_nvm(struct nvmet_req *req)
>  {
>         u16 status;
> +       void *zero_buf;
>
>         status = nvmet_req_find_ns(req);
>         if (status)
>                 goto out;
>
> -       status = nvmet_copy_to_sgl(req, 0, ZERO_PAGE(0),
> +       zero_buf = page_to_virt(ZERO_PAGE(0));
> +       status = nvmet_copy_to_sgl(req, 0, zero_buf,
>                                    NVME_IDENTIFY_DATA_SIZE);
>  out:
>         nvmet_req_complete(req, status);

I will later submit a patch to ensure this function complies with the
NVMe base specification, building on your patch.

Maurizio




More information about the Linux-nvme mailing list