[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <6f124946-d5a2-e3bc-3594-a41bf758b03e@bjorling.me>
Date: Thu, 4 May 2017 10:04:10 +0200
From: Matias Bjørling <m@...rling.me>
To: Javier González <jg@...htnvm.io>, mb@...htnvm.io
Cc: linux-block@...r.kernel.org, linux-kernel@...r.kernel.org,
Javier González <javier@...xlabs.com>,
Jens Axboe <axboe@...com>
Subject: Re: [PATCH 1/2] lightnvm: create cmd before allocating request
On 05/03/2017 11:19 AM, Javier González wrote:
> Create nvme command before allocating a request using
> nvme_alloc_request, which uses the command direction. Up until now, the
> command has been zeroized, so all commands have been allocated as a
> read operation.
>
> Signed-off-by: Javier González <javier@...xlabs.com>
> ---
> drivers/nvme/host/lightnvm.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/nvme/host/lightnvm.c b/drivers/nvme/host/lightnvm.c
> index de61a4a03d78..090bbeb655bc 100644
> --- a/drivers/nvme/host/lightnvm.c
> +++ b/drivers/nvme/host/lightnvm.c
> @@ -503,6 +503,8 @@ static int nvme_nvm_submit_io(struct nvm_dev *dev, struct nvm_rq *rqd)
> if (!cmd)
> return -ENOMEM;
>
> + nvme_nvm_rqtocmd(rq, rqd, ns, cmd);
> +
> rq = nvme_alloc_request(q, (struct nvme_command *)cmd, 0, NVME_QID_ANY);
> if (IS_ERR(rq)) {
> kfree(cmd);
> @@ -517,8 +519,6 @@ static int nvme_nvm_submit_io(struct nvm_dev *dev, struct nvm_rq *rqd)
> rq->__data_len = 0;
> }
>
> - nvme_nvm_rqtocmd(rq, rqd, ns, cmd);
> -
> rq->end_io_data = rqd;
>
> blk_execute_rq_nowait(q, NULL, rq, 0, nvme_nvm_end_io);
>
Reviewed-by: Matias Bjørling <matias@...xlabs.com>
Jens, would you pick this up when convenient? Thank you!
Powered by blists - more mailing lists