public inbox for linux-block@vger.kernel.org
 help / color / mirror / Atom feed
From: Omar Sandoval <osandov@osandov.com>
To: Luis Chamberlain <mcgrof@kernel.org>
Cc: linux-block@vger.kernel.org, Sebastian.Chlad@suse.com,
	daniel.wagner@suse.com, hare@suse.com
Subject: Re: [PATCH] common/multipath-over-rdma: make block scheduler directory optional
Date: Tue, 4 Aug 2020 14:12:57 -0700	[thread overview]
Message-ID: <20200804211257.GA8438@vader> (raw)
In-Reply-To: <20200729152113.1250-1-mcgrof@kernel.org>

On Wed, Jul 29, 2020 at 03:21:13PM +0000, Luis Chamberlain wrote:
> 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 &&

This has a couple of shellcheck errors about unquoted variables. Fixed
those up and applied, thanks.

> +				for m in *.ko; do
> +					[ -e "$m" ] && modprobe "${m%.ko}"
> +				done
> +		fi
>  	)
>  
>  	if [ -d /sys/kernel/debug/dynamic_debug ]; then
> -- 
> 2.27.0
> 

      parent reply	other threads:[~2020-08-04 21:13 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-29 15:21 [PATCH] common/multipath-over-rdma: make block scheduler directory optional Luis Chamberlain
2020-07-30  8:12 ` Daniel Wagner
2020-08-04 21:12 ` Omar Sandoval [this message]

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=20200804211257.GA8438@vader \
    --to=osandov@osandov.com \
    --cc=Sebastian.Chlad@suse.com \
    --cc=daniel.wagner@suse.com \
    --cc=hare@suse.com \
    --cc=linux-block@vger.kernel.org \
    --cc=mcgrof@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