All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] nvmet: Do not check for sg_cnt being zero for read/write commands.
@ 2017-02-07 23:35 Parav Pandit
  2017-02-08  8:24 ` Christoph Hellwig
  0 siblings, 1 reply; 6+ messages in thread
From: Parav Pandit @ 2017-02-07 23:35 UTC (permalink / raw)


sg_cnt cannot be zero for inline or sge mode from the fabric drivers
because nvme read/write commands have minimum of one block to be
read or written. (nlb dw12 is 0 based value).
So sg_cnt check for 0 is not useful.

Reviewed-by: Max Gurtovoy <maxg at mellanox.com>
Signed-off-by: Parav Pandit <parav at mellanox.com>
---
 drivers/nvme/target/io-cmd.c | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/drivers/nvme/target/io-cmd.c b/drivers/nvme/target/io-cmd.c
index 4195115..e6a3a8a 100644
--- a/drivers/nvme/target/io-cmd.c
+++ b/drivers/nvme/target/io-cmd.c
@@ -49,11 +49,6 @@ static void nvmet_execute_rw(struct nvmet_req *req)
 	blk_qc_t cookie;
 	int op, op_flags = 0, i;
 
-	if (!req->sg_cnt) {
-		nvmet_req_complete(req, 0);
-		return;
-	}
-
 	if (req->cmd->rw.opcode == nvme_cmd_write) {
 		op = REQ_OP_WRITE;
 		op_flags = REQ_SYNC | REQ_IDLE;
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2017-02-08 20:06 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-02-07 23:35 [PATCH] nvmet: Do not check for sg_cnt being zero for read/write commands Parav Pandit
2017-02-08  8:24 ` Christoph Hellwig
2017-02-08  9:43   ` Sagi Grimberg
2017-02-08 11:54     ` Christoph Hellwig
2017-02-08 15:11   ` Parav Pandit
2017-02-08 20:06   ` Parav Pandit

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.