From: Luis Chamberlain <mcgrof@kernel.org>
To: osandov@fb.com, linux-block@vger.kernel.org
Cc: bvanassche@acm.org, Luis Chamberlain <mcgrof@kernel.org>
Subject: [PATCH 1/2] null_blk: add ability to use a quiet modprobe
Date: Wed, 12 May 2021 06:14:19 +0000 [thread overview]
Message-ID: <20210512061420.13611-2-mcgrof@kernel.org> (raw)
In-Reply-To: <20210512061420.13611-1-mcgrof@kernel.org>
We may want to ignore modprobe errors. For instance when
doing error injection.
Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>
---
common/null_blk | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/common/null_blk b/common/null_blk
index 6611db0..720dcd8 100644
--- a/common/null_blk
+++ b/common/null_blk
@@ -19,9 +19,15 @@ _init_null_blk() {
_remove_null_blk_devices
local zoned=""
+ local modprobe_load_args=""
+
+ if [ ! -z "$NULL_BLK_QUIET_MODPROBE" ]; then
+ modprobe_load_args="-q"
+ fi
+
if (( RUN_FOR_ZONED )); then zoned="zoned=1"; fi
- if ! modprobe -r null_blk || ! modprobe null_blk "$@" "${zoned}" ; then
+ if ! modprobe -r null_blk || ! modprobe null_blk $modprobe_load_args "$@" "${zoned}" ; then
return 1
fi
--
2.30.2
next prev parent reply other threads:[~2021-05-12 7:02 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-12 6:14 [PATCH 0/2] blktests: add add_disk() error handling testing Luis Chamberlain
2021-05-12 6:14 ` Luis Chamberlain [this message]
2021-05-12 6:14 ` [PATCH 2/2] block: add add_disk() error handling tests Luis Chamberlain
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=20210512061420.13611-2-mcgrof@kernel.org \
--to=mcgrof@kernel.org \
--cc=bvanassche@acm.org \
--cc=linux-block@vger.kernel.org \
--cc=osandov@fb.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.