From: Randy Jennings <randyj@purestorage.com>
To: lsf-pc@lists.linux-foundation.org, linux-nvme@lists.infradead.org
Cc: cleech@redhat.com, mkhalfella@purestorage.com
Subject: [PATCH 2/7] nvmet: put all nvmet_req.execute calls behind a function name
Date: Thu, 30 Apr 2026 17:29:08 -0600 [thread overview]
Message-ID: <20260430232913.129271-3-randyj@purestorage.com> (raw)
In-Reply-To: <20260430232913.129271-1-randyj@purestorage.com>
From: Chris Leech <cleech@redhat.com>
This is setup for being able to manipluate the outstanding requests.
Signed-off-by: Chris Leech <cleech@redhat.com>
---
drivers/nvme/target/fc.c | 4 ++--
drivers/nvme/target/loop.c | 2 +-
drivers/nvme/target/nvmet.h | 1 +
drivers/nvme/target/rdma.c | 4 ++--
drivers/nvme/target/tcp.c | 4 ++--
5 files changed, 8 insertions(+), 7 deletions(-)
diff --git a/drivers/nvme/target/fc.c b/drivers/nvme/target/fc.c
index 0d9784004c9b..93b904864390 100644
--- a/drivers/nvme/target/fc.c
+++ b/drivers/nvme/target/fc.c
@@ -2391,7 +2391,7 @@ nvmet_fc_fod_op_done(struct nvmet_fc_fcp_iod *fod)
}
/* data transfer complete, resume with nvmet layer */
- fod->req.execute(&fod->req);
+ nvmet_execute_request(&fod->req);
break;
case NVMET_FCOP_READDATA:
@@ -2600,7 +2600,7 @@ nvmet_fc_handle_fcp_rqst(struct nvmet_fc_tgtport *tgtport,
* can invoke the nvmet_layer now. If read data, cmd completion will
* push the data
*/
- fod->req.execute(&fod->req);
+ nvmet_execute_request(&fod->req);
return;
transport_error:
diff --git a/drivers/nvme/target/loop.c b/drivers/nvme/target/loop.c
index fc8e7c9ad858..678d619083a6 100644
--- a/drivers/nvme/target/loop.c
+++ b/drivers/nvme/target/loop.c
@@ -127,7 +127,7 @@ static void nvme_loop_execute_work(struct work_struct *work)
struct nvme_loop_iod *iod =
container_of(work, struct nvme_loop_iod, work);
- iod->req.execute(&iod->req);
+ nvmet_execute_request(&iod->req);
}
static blk_status_t nvme_loop_queue_rq(struct blk_mq_hw_ctx *hctx,
diff --git a/drivers/nvme/target/nvmet.h b/drivers/nvme/target/nvmet.h
index 5319765eaf5c..acb2f0f3cdc8 100644
--- a/drivers/nvme/target/nvmet.h
+++ b/drivers/nvme/target/nvmet.h
@@ -994,4 +994,5 @@ struct nvmet_feat_arbitration {
u8 ab;
};
+static inline void nvmet_execute_request(struct nvmet_req *req) { req->execute(req); }
#endif /* _NVMET_H */
diff --git a/drivers/nvme/target/rdma.c b/drivers/nvme/target/rdma.c
index 9c12b2361a6d..5beb33629500 100644
--- a/drivers/nvme/target/rdma.c
+++ b/drivers/nvme/target/rdma.c
@@ -773,7 +773,7 @@ static void nvmet_rdma_read_data_done(struct ib_cq *cq, struct ib_wc *wc)
if (unlikely(status))
nvmet_req_complete(&rsp->req, status);
else
- rsp->req.execute(&rsp->req);
+ nvmet_execute_request(&rsp->req);
}
static void nvmet_rdma_write_data_done(struct ib_cq *cq, struct ib_wc *wc)
@@ -958,7 +958,7 @@ static bool nvmet_rdma_execute_command(struct nvmet_rdma_rsp *rsp)
queue->cm_id->port_num, &rsp->read_cqe, NULL))
nvmet_req_complete(&rsp->req, NVME_SC_DATA_XFER_ERROR);
} else {
- rsp->req.execute(&rsp->req);
+ nvmet_execute_request(&rsp->req);
}
return true;
diff --git a/drivers/nvme/target/tcp.c b/drivers/nvme/target/tcp.c
index 15416ff0eac4..fe811b55e0f8 100644
--- a/drivers/nvme/target/tcp.c
+++ b/drivers/nvme/target/tcp.c
@@ -606,7 +606,7 @@ static void nvmet_tcp_execute_request(struct nvmet_tcp_cmd *cmd)
if (unlikely(cmd->flags & NVMET_TCP_F_INIT_FAILED))
nvmet_tcp_queue_response(&cmd->req);
else
- cmd->req.execute(&cmd->req);
+ nvmet_execute_request(&cmd->req);
}
static int nvmet_try_send_data_pdu(struct nvmet_tcp_cmd *cmd)
@@ -1072,7 +1072,7 @@ static int nvmet_tcp_done_recv_pdu(struct nvmet_tcp_queue *queue)
goto out;
}
- queue->cmd->req.execute(&queue->cmd->req);
+ nvmet_execute_request(&queue->cmd->req);
out:
nvmet_prepare_receive_pdu(queue);
return ret;
--
2.54.0
next prev parent reply other threads:[~2026-04-30 23:29 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-30 23:29 [PATCH 0/7] NOT FOR MERGE nvmet code to exercise CCR/CQT Randy Jennings
2026-04-30 23:29 ` [PATCH 1/7] fixup: nvme fix CCR command Randy Jennings
2026-04-30 23:29 ` Randy Jennings [this message]
2026-04-30 23:29 ` [PATCH 3/7] nvmet: add delay debugfs file to nvmet_ctrl Randy Jennings
2026-04-30 23:29 ` [PATCH 4/7] nvmet: delay requests Randy Jennings
2026-04-30 23:29 ` [PATCH 5/7] nvmet: Added debugfs fatal opcode Randy Jennings
2026-04-30 23:29 ` [PATCH 6/7] nvmet: kill nvme controller when fatal opcode is received Randy Jennings
2026-04-30 23:29 ` [PATCH 7/7] Force CCR operation to fail Randy Jennings
2026-05-10 22:39 ` [PATCH 0/7] NOT FOR MERGE nvmet code to exercise CCR/CQT Sagi Grimberg
2026-05-11 19:14 ` Randy Jennings
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=20260430232913.129271-3-randyj@purestorage.com \
--to=randyj@purestorage.com \
--cc=cleech@redhat.com \
--cc=linux-nvme@lists.infradead.org \
--cc=lsf-pc@lists.linux-foundation.org \
--cc=mkhalfella@purestorage.com \
/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