[PATCH 07/14] nvmet: reuse pt-req-done for rq completion
Logan Gunthorpe
logang at deltatee.com
Mon Aug 10 18:10:30 EDT 2020
On 2020-08-10 12:54 p.m., Chaitanya Kulkarni wrote:
> In the function nvmet_passthru_execute_cmd_work() after overriding
> id_[ctr|ns] results it completes the request by assigning the target
> request completion queue entry result from nvme request result,
> actually completing request on the transport and calling
> blk_mq_free_request().
>
> The function nvmet_passhru_req_done does the same thing, use that and
> remove the duplicate code in nvmet_passhru_execute_cmd_work().
>
> The last parameter for the nvmet_passthru_req_done() which is
> blk_status_t is not used since we derive the result from the nvme_req.
Christoph had specifically requested open coding this in earlier feedback:
https://lore.kernel.org/linux-block/20191010123406.GC28921@lst.de/
It was originally called nvmet_passthru_req_complete() and was open
coded at his request.
I think the way it was merged ended up being cleaner and easier to read
as well.
Logan
More information about the Linux-nvme
mailing list