All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bart Van Assche <bvanassche@acm.org>
To: Luis Chamberlain <mcgrof@kernel.org>,
	dwagner@suse.de, osandov@fb.com, linux-block@vger.kernel.org
Subject: Re: [PATCH] blktests: replace module removal with patient module removal
Date: Mon, 7 Feb 2022 17:10:24 -0800	[thread overview]
Message-ID: <caa2ba82-b3e8-6d5a-d411-241eb147f697@acm.org> (raw)
In-Reply-To: <20211116172926.587062-1-mcgrof@kernel.org>

On 11/16/21 09:29, Luis Chamberlain wrote:
> for a while now. More wider testig is welcomed.
                               ^^^^^^
                               testing?

> @@ -427,14 +428,8 @@ stop_soft_rdma() {
>   		      echo "$i ..."
>   		      rdma link del "${i}" || echo "Failed to remove ${i}"
>   		done
> -	if ! unload_module rdma_rxe 10; then
> -		echo "Unloading rdma_rxe failed"
> -		return 1
> -	fi
> -	if ! unload_module siw 10; then
> -		echo "Unloading siw failed"
> -		return 1
> -	fi
> +	_patient_rmmod rdma_rxe || return 1
> +	_patient_rmmod 1siw  || return 1

The above clearly has not been tested. There is an easy to spot typo in 
the above change. Please test your changes before publishing these.

> +	if [[ ! -z "$MODPROBE_PATIENT_RM_TIMEOUT_SECONDS" ]]; then

Please use -n instead of ! -z.

> +	if [[ -f /sys/module/$module/refcnt ]]; then

Has this patch been analyzed with 'make check'? I expect checkpatch to 
complain about missing double quotes for the above statement.

> +# Patiently tries to wait to remove a module by ensuring first
      ^^^^^^^^^^^^^^^^^^^^^^^
Tries to wait patiently?

> +	if [[ ! -z $MODPROBE_REMOVE_PATIENT ]]; then

Please use -n instead of ! -z and surround the variable expansion with 
double quotes.

> +	# If we have extra time left. Use the time left to now try to
> +	# persistently remove the module. We do this because although through

What is persistent module removal? Is that perhaps removing a module 
such that it cannot be loaded again?

>   	for m in ib_srpt iscsi_target_mod target_core_pscsi target_core_iblock \
>   			 target_core_file target_core_stgt target_core_user \
>   			 target_core_mod
> -	do
> -		unload_module $m 10 || return $?
> -	done
> +	_patient_rmmod $m || return $1

Please proofread your changes and test your changes before posting 
these. I think that both "do" and "done" should have been preserved above.

Thanks,

Bart.

  parent reply	other threads:[~2022-02-08  1:20 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
2022-02-08  1:10 ` Bart Van Assche [this message]
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=caa2ba82-b3e8-6d5a-d411-241eb147f697@acm.org \
    --to=bvanassche@acm.org \
    --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.