From: Luis Chamberlain <mcgrof@kernel.org>
To: linux-block@vger.kernel.org
Cc: Sebastian.Chlad@suse.com, daniel.wagner@suse.com, hare@suse.com,
Luis Chamberlain <mcgrof@kernel.org>
Subject: [PATCH] common/multipath-over-rdma: make block scheduler directory optional
Date: Wed, 29 Jul 2020 15:21:13 +0000 [thread overview]
Message-ID: <20200729152113.1250-1-mcgrof@kernel.org> (raw)
We currently fail if the following tests if the directory
/lib/modules/$(uname -r)/kernel/block does not exist. Just make
this optional. Older distributions won't have this directory.
srp/001
srp/002
srp/013
srp/014
Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>
---
common/multipath-over-rdma | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/common/multipath-over-rdma b/common/multipath-over-rdma
index 676d283..f004124 100644
--- a/common/multipath-over-rdma
+++ b/common/multipath-over-rdma
@@ -696,10 +696,13 @@ setup_test() {
# Load the I/O scheduler kernel modules
(
- cd "/lib/modules/$(uname -r)/kernel/block" &&
- for m in *.ko; do
- [ -e "$m" ] && modprobe "${m%.ko}"
- done
+ KERNEL_BLOCK="/lib/modules/$(uname -r)/kernel/block"
+ if [ -d $KERNEL_BLOCK ]; then
+ cd $KERNEL_BLOCK &&
+ for m in *.ko; do
+ [ -e "$m" ] && modprobe "${m%.ko}"
+ done
+ fi
)
if [ -d /sys/kernel/debug/dynamic_debug ]; then
--
2.27.0
next reply other threads:[~2020-07-29 15:21 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-29 15:21 Luis Chamberlain [this message]
2020-07-30 8:12 ` [PATCH] common/multipath-over-rdma: make block scheduler directory optional Daniel Wagner
2020-08-04 21:12 ` Omar Sandoval
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=20200729152113.1250-1-mcgrof@kernel.org \
--to=mcgrof@kernel.org \
--cc=Sebastian.Chlad@suse.com \
--cc=daniel.wagner@suse.com \
--cc=hare@suse.com \
--cc=linux-block@vger.kernel.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;
as well as URLs for NNTP newsgroup(s).