nvme: move nvme_qpair_complete_error_reqs
We are going to use it earlier in this file in an upcoming patch. Signed-off-by: Jim Harris <james.r.harris@intel.com> Change-Id: Ie388ca76370e53465edb73a99d191492580603c9 Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/453930 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
This commit is contained in:
parent
f96a814f35
commit
b9b7ed0af2
@ -500,6 +500,20 @@ nvme_qpair_init(struct spdk_nvme_qpair *qpair, uint16_t id,
|
||||
return 0;
|
||||
}
|
||||
|
||||
void
|
||||
nvme_qpair_complete_error_reqs(struct spdk_nvme_qpair *qpair)
|
||||
{
|
||||
struct nvme_request *req;
|
||||
|
||||
while (!STAILQ_EMPTY(&qpair->err_req_head)) {
|
||||
req = STAILQ_FIRST(&qpair->err_req_head);
|
||||
STAILQ_REMOVE_HEAD(&qpair->err_req_head, stailq);
|
||||
nvme_qpair_manual_complete_request(qpair, req,
|
||||
req->cpl.status.sct,
|
||||
req->cpl.status.sc, 0, true);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
nvme_qpair_deinit(struct spdk_nvme_qpair *qpair)
|
||||
{
|
||||
@ -605,20 +619,6 @@ nvme_qpair_enable(struct spdk_nvme_qpair *qpair)
|
||||
qpair->is_enabled = true;
|
||||
}
|
||||
|
||||
void
|
||||
nvme_qpair_complete_error_reqs(struct spdk_nvme_qpair *qpair)
|
||||
{
|
||||
struct nvme_request *req;
|
||||
|
||||
while (!STAILQ_EMPTY(&qpair->err_req_head)) {
|
||||
req = STAILQ_FIRST(&qpair->err_req_head);
|
||||
STAILQ_REMOVE_HEAD(&qpair->err_req_head, stailq);
|
||||
nvme_qpair_manual_complete_request(qpair, req,
|
||||
req->cpl.status.sct,
|
||||
req->cpl.status.sc, 0, true);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
nvme_qpair_disable(struct spdk_nvme_qpair *qpair)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user