From: "Theodore Ts'o" <tytso@mit.edu>
To: Luis Chamberlain <mcgrof@kernel.org>
Cc: dwagner@suse.de, osandov@fb.com, linux-block@vger.kernel.org
Subject: Re: [PATCH] blktests: replace module removal with patient module removal
Date: Sat, 5 Feb 2022 12:50:17 -0500 [thread overview]
Message-ID: <Yf642Rr4mDsZ7HnS@mit.edu> (raw)
In-Reply-To: <20211116172926.587062-1-mcgrof@kernel.org>
On Tue, Nov 16, 2021 at 09:29:26AM -0800, Luis Chamberlain wrote:
> diff --git a/common/rc b/common/rc
> index 85e6314..2b551bf 100644
> --- a/common/rc
> +++ b/common/rc
> @@ -321,15 +321,143 @@ _uptime_s() {
> awk '{ print int($1) }' /proc/uptime
> }
>
> -# Arguments: module to unload ($1) and retry count ($2).
> -unload_module() {
> - local i m=$1 rc=${2:-1}
> -
> - [ ! -e "/sys/module/$m" ] && return 0
> - for ((i=rc;i>0;i--)); do
> - modprobe -r "$m"
> - [ ! -e "/sys/module/$m" ] && return 0
> - sleep .1
> +# Set MODPROBE_PATIENT_RM_TIMEOUT_SECONDS to "forever" if you want the patient
> +# modprobe removal to run forever trying to remove a module.
> +MODPROBE_REMOVE_PATIENT=""
> +modprobe --help | grep -q -1 "remove-patiently"
Could you add the same guard I suggested for fstests for ancient
versions of modprobe? e.g.,:
modprobe --help >& /dev/null && modprobe --help | grep -q -1 "remove-patiently"
Thanks!
- Ted
next prev parent reply other threads:[~2022-02-05 17:50 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-16 17:29 [PATCH] blktests: replace module removal with patient module removal Luis Chamberlain
2021-11-18 1:38 ` Chaitanya Kulkarni
2021-12-08 12:53 ` Luis Chamberlain
2022-01-20 20:25 ` Luis Chamberlain
2022-01-26 5:39 ` Chaitanya Kulkarni
2022-02-05 2:33 ` Luis Chamberlain
2022-02-06 3:57 ` Bart Van Assche
2022-02-05 17:50 ` Theodore Ts'o [this message]
2022-02-08 1:10 ` Bart Van Assche
2022-02-08 21:21 ` Luis Chamberlain
2022-02-08 22:26 ` Bart Van Assche
2022-04-13 22:46 ` 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=Yf642Rr4mDsZ7HnS@mit.edu \
--to=tytso@mit.edu \
--cc=dwagner@suse.de \
--cc=linux-block@vger.kernel.org \
--cc=mcgrof@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.