[PATCH V2 06/12] nvmet: remove op_flags for write commands

Chaitanya Kulkarni chaitanya.kulkarni at wdc.com
Mon Aug 31 18:27:01 EDT 2020


The function nvmet_passthru_map_sg() sets the op_flags to
(REQ_SYNC | REQ_IDLE). Currently, in the block layer this check is only
present for not throttling WRITE_ODIRECT requests for REQ_OP_WRITE
opcode.

Remove the op_flags assignment for nvme_is_write() case.

Signed-off-by: Chaitanya Kulkarni <chaitanya.kulkarni at wdc.com>
---
 drivers/nvme/target/passthru.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/nvme/target/passthru.c b/drivers/nvme/target/passthru.c
index 8f9c2144a103..fbe2678aea6a 100644
--- a/drivers/nvme/target/passthru.c
+++ b/drivers/nvme/target/passthru.c
@@ -188,8 +188,6 @@ static int nvmet_passthru_map_sg(struct nvmet_req *req, struct request *rq)
 
 	if (req->cmd->common.opcode == nvme_cmd_flush)
 		op_flags = REQ_FUA;
-	else if (nvme_is_write(req->cmd))
-		op_flags = REQ_SYNC | REQ_IDLE;
 
 	bio = bio_alloc(GFP_KERNEL, min(sg_cnt, BIO_MAX_PAGES));
 	bio->bi_end_io = bio_put;
-- 
2.22.1




More information about the Linux-nvme mailing list