[PATCH 2/2] nvme: use return value from blk_execute_rq()

Yuanyuan Zhong yzhong at purestorage.com
Fri Apr 16 18:12:11 BST 2021


>         if (poll)
>                 nvme_execute_rq_polled(req->q, NULL, req, at_head);
You may need to audit other completion handlers for blk_execute_rq_nowait().
How to get error ret from polled rq?
>         else
> -               blk_execute_rq(NULL, req, at_head);
> +               ret = blk_execute_rq(NULL, req, at_head);
>         if (result)
>                 *result = nvme_req(req)->result;
>         if (nvme_req(req)->flags & NVME_REQ_CANCELLED)
>                 ret = -EINTR;
> -       else
> +       else if (nvme_req(req)->status)
>                 ret = nvme_req(req)->status;


-- 
Regards,
Yuanyuan Zhong



More information about the Linux-nvme mailing list