Commit 888545cb authored by Anuj Gupta's avatar Anuj Gupta Committed by Jens Axboe

nvme: set REQ_ALLOC_CACHE for uring-passthru request

This patch sets REQ_ALLOC_CACHE flag for uring-passthru requests.
This is a prep-patch so that normal / IRQ-driven uring-passthru
I/Os can also leverage bio-cache.
Signed-off-by: default avatarAnuj Gupta <anuj20.g@samsung.com>
Signed-off-by: default avatarKanchan Joshi <joshi.k@samsung.com>
Link: https://lore.kernel.org/r/20230117120638.72254-2-anuj20.g@samsung.comSigned-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent 4093cb5a
...@@ -554,7 +554,7 @@ static int nvme_uring_cmd_io(struct nvme_ctrl *ctrl, struct nvme_ns *ns, ...@@ -554,7 +554,7 @@ static int nvme_uring_cmd_io(struct nvme_ctrl *ctrl, struct nvme_ns *ns,
struct nvme_uring_data d; struct nvme_uring_data d;
struct nvme_command c; struct nvme_command c;
struct request *req; struct request *req;
blk_opf_t rq_flags = 0; blk_opf_t rq_flags = REQ_ALLOC_CACHE;
blk_mq_req_flags_t blk_flags = 0; blk_mq_req_flags_t blk_flags = 0;
void *meta = NULL; void *meta = NULL;
int ret; int ret;
...@@ -590,7 +590,7 @@ static int nvme_uring_cmd_io(struct nvme_ctrl *ctrl, struct nvme_ns *ns, ...@@ -590,7 +590,7 @@ static int nvme_uring_cmd_io(struct nvme_ctrl *ctrl, struct nvme_ns *ns,
d.timeout_ms = READ_ONCE(cmd->timeout_ms); d.timeout_ms = READ_ONCE(cmd->timeout_ms);
if (issue_flags & IO_URING_F_NONBLOCK) { if (issue_flags & IO_URING_F_NONBLOCK) {
rq_flags = REQ_NOWAIT; rq_flags |= REQ_NOWAIT;
blk_flags = BLK_MQ_REQ_NOWAIT; blk_flags = BLK_MQ_REQ_NOWAIT;
} }
if (issue_flags & IO_URING_F_IOPOLL) if (issue_flags & IO_URING_F_IOPOLL)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment