Content-Type: multipart/mixed; boundary="===============4916387485170086975==" MIME-Version: 1.0 From: Vikas Gupta Subject: [SPDK] Destroy QP process in nvmf Date: Tue, 01 Jan 2019 20:08:50 +0530 Message-ID: <77719bf1cae5908f714edcd97fe6da6e@mail.gmail.com> List-ID: To: spdk@lists.01.org --===============4916387485170086975== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Hi, I would like to draw attention in destroy QP process in nvmf that there is possibility that requests could be processed even after destroy QP in one of the scenario. When a disk (hot plug) is removed from the target the related subsystem is paused and in fly requests are queued as below in nvmf/request.c */* Check if the subsystem is paused (if there is a subsystem) */* * if (qpair->ctrlr) {* * struct spdk_nvmf_subsystem_poll_group *sgroup =3D &qpair->group->sgroups[qpair->ctrlr->subsys->id];* * if (sgroup->state !=3D SPDK_NVMF_SUBSYSTEM_ACTIVE) {* * /* The subsystem is not currently active. Queue this request. */* * TAILQ_INSERT_TAIL(&sgroup->queued, req, link);* * return;* * }* * } * By the time system is resumed the QP would have been destroyed and we may still process the stale QP`s requests with below code in nvmf.c function spdk_nvmf_poll_group_resume_subsystem(). * /* Release all queued requests */* * TAILQ_FOREACH_SAFE(req, &sgroup->queued, link, tmp) {* * TAILQ_REMOVE(&sgroup->queued, req, link);* * spdk_nvmf_request_exec(req);* * } * I think we should remove the stale QP requests from the sgroup`s queue before we destroy the QP. Please let me know if my understanding is correct. Thanks, Vikas --===============4916387485170086975==--