projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0d30992
)
nvmet-loop: use blk_rq_payload_bytes for sgl selection
author
Christoph Hellwig
<
[email protected]
>
Thu, 22 Feb 2018 15:24:10 +0000
(07:24 -0800)
committer
Keith Busch
<
[email protected]
>
Thu, 22 Feb 2018 08:45:34 +0000
(
01:45
-0700)
blk_rq_bytes does the wrong thing for special payloads like discards and
might cause the driver to not set up a SGL.
Signed-off-by: Christoph Hellwig <
[email protected]
>
Reviewed-by: Sagi Grimberg <
[email protected]
>
Reviewed-by: Johannes Thumshirn <
[email protected]
>
Signed-off-by: Keith Busch <
[email protected]
>
drivers/nvme/target/loop.c
patch
|
blob
|
history
diff --git
a/drivers/nvme/target/loop.c
b/drivers/nvme/target/loop.c
index 7991ec3a17db9238c4fddaadc2faaa9fb32ce0cb..861d1509b22bf412e2a9bfaee408a4fcb3ad3de4 100644
(file)
--- a/
drivers/nvme/target/loop.c
+++ b/
drivers/nvme/target/loop.c
@@
-184,7
+184,7
@@
static blk_status_t nvme_loop_queue_rq(struct blk_mq_hw_ctx *hctx,
return BLK_STS_OK;
}
- if (blk_rq_bytes(req)) {
+ if (blk_rq_
payload_
bytes(req)) {
iod->sg_table.sgl = iod->first_sgl;
if (sg_alloc_table_chained(&iod->sg_table,
blk_rq_nr_phys_segments(req),
@@
-193,7
+193,7
@@
static blk_status_t nvme_loop_queue_rq(struct blk_mq_hw_ctx *hctx,
iod->req.sg = iod->sg_table.sgl;
iod->req.sg_cnt = blk_rq_map_sg(req->q, req, iod->sg_table.sgl);
- iod->req.transfer_len = blk_rq_bytes(req);
+ iod->req.transfer_len = blk_rq_
payload_
bytes(req);
}
blk_mq_start_request(req);