Storage Performance Development Kit (SPDK)
 help / color / mirror / Atom feed
From: Vikas Gupta <vikas.gupta at broadcom.com>
To: spdk@lists.01.org
Subject: [SPDK] Destroy QP process in nvmf
Date: Tue, 01 Jan 2019 20:08:50 +0530	[thread overview]
Message-ID: <77719bf1cae5908f714edcd97fe6da6e@mail.gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 1516 bytes --]

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 =
&qpair->group->sgroups[qpair->ctrlr->subsys->id];*

*                if (sgroup->state != 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

                 reply	other threads:[~2019-01-01 14:38 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=77719bf1cae5908f714edcd97fe6da6e@mail.gmail.com \
    --to=spdk@lists.01.org \
    /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