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>,
Sagi Grimberg <sagi@grimberg.me>, Hannes Reinecke <hare@suse.de>,
Daniel Wagner <dwagner@suse.de>
Subject: [PATCH blktests v3 2/2] nvme/rc: Cleanup fc resource before module unloading
Date: Wed, 3 May 2023 10:38:16 +0200 [thread overview]
Message-ID: <20230503083816.18792-3-dwagner@suse.de> (raw)
In-Reply-To: <20230503083816.18792-1-dwagner@suse.de>
Cleanup all fc resources before unloading the module, so it the
operations are in reverse order how we setup them.
Also unload the nvme-fcloop after usage.
Signed-off-by: Daniel Wagner <dwagner@suse.de>
---
tests/nvme/rc | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/tests/nvme/rc b/tests/nvme/rc
index ec0cc2d8d8cc..24803afe8879 100644
--- a/tests/nvme/rc
+++ b/tests/nvme/rc
@@ -260,6 +260,11 @@ _cleanup_nvmet() {
shopt -u nullglob
trap SIGINT
+ 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
@@ -268,10 +273,6 @@ _cleanup_nvmet() {
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}"
- fi
}
_setup_nvmet() {
--
2.40.0
next prev parent reply other threads:[~2023-05-03 8:40 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-03 8:38 [PATCH blktests v3 0/2] nvme_trtype=fc fixes Daniel Wagner
2023-05-03 8:38 ` [PATCH blktests v3 1/2] nvme/rc: Cleanup fc ports in reverse order Daniel Wagner
2023-05-03 8:38 ` Daniel Wagner [this message]
2023-06-01 9:01 ` [PATCH blktests v3 0/2] nvme_trtype=fc fixes Daniel Wagner
2023-06-06 5:24 ` Shinichiro Kawasaki
2023-06-06 6:07 ` Daniel Wagner
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=20230503083816.18792-3-dwagner@suse.de \
--to=dwagner@suse.de \
--cc=hare@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=sagi@grimberg.me \
--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
all inboxes | Powered by JetHome®