From: Daniel Wagner <dwagner@suse.de>
To: linux-nvme@lists.infradead.org
Cc: linux-kernel@vger.kernel.org, linux-block@vger.kernel.org,
Chaitanya Kulkarni <kch@nvidia.com>,
Shin'ichiro Kawasaki <shinichiro@fastmail.com>,
Daniel Wagner <dwagner@suse.de>
Subject: [PATCH blktests v2 2/2] nvme-rc: Cleanup fc resource before module unloading
Date: Wed, 19 Apr 2023 10:47:57 +0200 [thread overview]
Message-ID: <20230419084757.24846-3-dwagner@suse.de> (raw)
In-Reply-To: <20230419084757.24846-1-dwagner@suse.de>
Before we unload the module we should cleanup the fc resources first,
basically reorder the shutdown sequence to be in reverse order of the
setup path.
Also unload the nvme-fcloop after usage.
While at it also update the rdma stop_soft_rdma before the module
unloading for the same reasoning.
Signed-off-by: Daniel Wagner <dwagner@suse.de>
---
tests/nvme/rc | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/tests/nvme/rc b/tests/nvme/rc
index ec0cc2d8d8cc..41f196b037d6 100644
--- a/tests/nvme/rc
+++ b/tests/nvme/rc
@@ -260,18 +260,20 @@ _cleanup_nvmet() {
shopt -u nullglob
trap SIGINT
- modprobe -rq nvme-"${nvme_trtype}" 2>/dev/null
- if [[ "${nvme_trtype}" != "loop" ]]; then
- modprobe -rq nvmet-"${nvme_trtype}" 2>/dev/null
- fi
- modprobe -rq nvmet 2>/dev/null
if [[ "${nvme_trtype}" == "rdma" ]]; then
stop_soft_rdma
fi
if [[ "${nvme_trtype}" == "fc" ]]; then
_cleanup_fcloop "${def_local_wwnn}" "${def_local_wwpn}" \
"${def_remote_wwnn}" "${def_remote_wwpn}"
+ modprobe -rq nvme-fcloop
fi
+
+ modprobe -rq nvme-"${nvme_trtype}" 2>/dev/null
+ if [[ "${nvme_trtype}" != "loop" ]]; then
+ modprobe -rq nvmet-"${nvme_trtype}" 2>/dev/null
+ fi
+ modprobe -rq nvmet 2>/dev/null
}
_setup_nvmet() {
--
2.40.0
next prev parent reply other threads:[~2023-04-19 8:48 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-19 8:47 [PATCH blktests v2 0/2] nvme_trtype=fc fixes Daniel Wagner
2023-04-19 8:47 ` [PATCH blktests v2 1/2] nvme-rc: Cleanup fc ports in reverse order Daniel Wagner
2023-04-19 9:41 ` Sagi Grimberg
2023-04-30 10:07 ` Shinichiro Kawasaki
2023-05-03 8:12 ` Daniel Wagner
2023-04-19 8:47 ` Daniel Wagner [this message]
2023-04-19 9:41 ` [PATCH blktests v2 2/2] nvme-rc: Cleanup fc resource before module unloading Chaitanya Kulkarni
2023-04-19 10:36 ` Daniel Wagner
2023-04-30 10:08 ` Shinichiro Kawasaki
2023-04-19 9:44 ` Sagi Grimberg
2023-04-19 10:42 ` Daniel Wagner
2023-04-19 10:45 ` Sagi Grimberg
2023-04-30 10:34 ` Shinichiro Kawasaki
2023-05-01 14:10 ` Sagi Grimberg
2023-05-02 6:13 ` Shinichiro Kawasaki
2023-04-19 21:15 ` Chaitanya Kulkarni
2023-04-30 10:05 ` Shinichiro Kawasaki
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=20230419084757.24846-3-dwagner@suse.de \
--to=dwagner@suse.de \
--cc=kch@nvidia.com \
--cc=linux-block@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-nvme@lists.infradead.org \
--cc=shinichiro@fastmail.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;
as well as URLs for NNTP newsgroup(s).