From: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
To: linux-block@vger.kernel.org, linux-nvme@lists.infradead.org
Cc: kbusch@kernel.org, logang@deltatee.com, hch@lst.de,
Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>,
sagi@grimberg.me
Subject: [PATCH V3 3/6] nvmet: remove op_flags for passthru commands
Date: Wed, 21 Oct 2020 18:02:31 -0700 [thread overview]
Message-ID: <20201022010234.8304-4-chaitanya.kulkarni@wdc.com> (raw)
In-Reply-To: <20201022010234.8304-1-chaitanya.kulkarni@wdc.com>
For passthru commands setting op_flags has no meaning. Remove the code
that sets the op flags in nvmet_passthru_map_sg().
Signed-off-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
---
drivers/nvme/target/passthru.c | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)
diff --git a/drivers/nvme/target/passthru.c b/drivers/nvme/target/passthru.c
index 76affbc3bd9a..e5b5657bcce2 100644
--- a/drivers/nvme/target/passthru.c
+++ b/drivers/nvme/target/passthru.c
@@ -182,18 +182,12 @@ static int nvmet_passthru_map_sg(struct nvmet_req *req, struct request *rq)
{
int sg_cnt = req->sg_cnt;
struct scatterlist *sg;
- int op_flags = 0;
struct bio *bio;
int i, ret;
- 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;
- bio->bi_opf = req_op(rq) | op_flags;
+ bio->bi_opf = req_op(rq);
for_each_sg(req->sg, sg, req->sg_cnt, i) {
if (bio_add_pc_page(rq->q, bio, sg_page(sg), sg->length,
--
2.22.1
_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme
next prev parent reply other threads:[~2020-10-22 1:03 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-22 1:02 [PATCH V3 0/6] nvmet: passthru fixes and improvements Chaitanya Kulkarni
2020-10-22 1:02 ` [PATCH V3 1/6] nvme-core: add a helper to init req from nvme cmd Chaitanya Kulkarni
2020-10-22 1:02 ` [PATCH V3 2/6] nvme-core: split nvme_alloc_request() Chaitanya Kulkarni
2020-11-03 18:24 ` Christoph Hellwig
2020-11-04 21:03 ` Chaitanya Kulkarni
2020-10-22 1:02 ` Chaitanya Kulkarni [this message]
2020-10-22 1:02 ` [PATCH V3 4/6] block: move blk_rq_bio_prep() to linux/blk-mq.h Chaitanya Kulkarni
2020-10-22 1:02 ` [PATCH V3 5/6] nvmet: use minimized version of blk_rq_append_bio Chaitanya Kulkarni
2020-10-22 1:02 ` [PATCH V3 6/6] nvmet: use inline bio for passthru fast path Chaitanya Kulkarni
2020-10-22 15:57 ` Logan Gunthorpe
2020-10-29 19:02 ` Chaitanya Kulkarni
2020-11-03 18:25 ` hch
2020-11-03 18:32 ` [PATCH V3 0/6] nvmet: passthru fixes and improvements Christoph Hellwig
2020-11-03 23:50 ` Chaitanya Kulkarni
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20201022010234.8304-4-chaitanya.kulkarni@wdc.com \
--to=chaitanya.kulkarni@wdc.com \
--cc=hch@lst.de \
--cc=kbusch@kernel.org \
--cc=linux-block@vger.kernel.org \
--cc=linux-nvme@lists.infradead.org \
--cc=logang@deltatee.com \
--cc=sagi@grimberg.me \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).