Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1634826 > unrolled thread
| Started by | "Javier González" <jg@lightnvm.io> |
|---|---|
| First post | 2017-05-03 11:20 +0200 |
| Last post | 2017-05-04 16:20 +0200 |
| Articles | 5 — 5 participants |
Back to article view | Back to linux.kernel
[PATCH 1/2] lightnvm: create cmd before allocating request "Javier González" <jg@lightnvm.io> - 2017-05-03 11:20 +0200
Re: [PATCH 1/2] lightnvm: create cmd before allocating request Matias Bjørling <m@bjorling.me> - 2017-05-04 10:10 +0200
Re: [PATCH 1/2] lightnvm: create cmd before allocating request Christoph Hellwig <hch@infradead.org> - 2017-05-04 13:30 +0200
Re: [PATCH 1/2] lightnvm: create cmd before allocating request Javier González <jg@lightnvm.io> - 2017-05-04 16:00 +0200
Re: [PATCH 1/2] lightnvm: create cmd before allocating request Jens Axboe <axboe@kernel.dk> - 2017-05-04 16:20 +0200
| From | "Javier González" <jg@lightnvm.io> |
|---|---|
| Date | 2017-05-03 11:20 +0200 |
| Subject | [PATCH 1/2] lightnvm: create cmd before allocating request |
| Message-ID | <tCYBX-3bN-9@gated-at.bofh.it> |
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@cnexlabs.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);
--
2.7.4
[toc] | [next] | [standalone]
| From | Matias Bjørling <m@bjorling.me> |
|---|---|
| Date | 2017-05-04 10:10 +0200 |
| Message-ID | <tDjZM-MX-23@gated-at.bofh.it> |
| In reply to | #1634826 |
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@cnexlabs.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@cnexlabs.com>
Jens, would you pick this up when convenient? Thank you!
[toc] | [prev] | [next] | [standalone]
| From | Christoph Hellwig <hch@infradead.org> |
|---|---|
| Date | 2017-05-04 13:30 +0200 |
| Message-ID | <tDn7j-2Ke-9@gated-at.bofh.it> |
| In reply to | #1634826 |
On Wed, May 03, 2017 at 11:19:04AM +0200, 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. Hah.. Looks fine: Reviewed-by: Christoph Hellwig <hch@lst.de>
[toc] | [prev] | [next] | [standalone]
| From | Javier González <jg@lightnvm.io> |
|---|---|
| Date | 2017-05-04 16:00 +0200 |
| Message-ID | <tDpst-4bq-1@gated-at.bofh.it> |
| In reply to | #1634826 |
[Multipart message — attachments visible in raw view] — view raw
> On 4 May 2017, at 15.53, Jens Axboe <axboe@kernel.dk> wrote: > > On Wed, May 03 2017, 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. > > Applied 1-2. Javier, please use a cover letter when sending more than 1 > patch at the time, makes it easier to reply to the series as a whole. > Thanks Jens. I will. Javier
[toc] | [prev] | [next] | [standalone]
| From | Jens Axboe <axboe@kernel.dk> |
|---|---|
| Date | 2017-05-04 16:20 +0200 |
| Message-ID | <tDpst-4bq-3@gated-at.bofh.it> |
| In reply to | #1634826 |
On Wed, May 03 2017, 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. Applied 1-2. Javier, please use a cover letter when sending more than 1 patch at the time, makes it easier to reply to the series as a whole. -- Jens Axboe
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web