Linux block layer
 help / color / mirror / Atom feed
From: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
To: Jesse Taube <jtaubepe@redhat.com>
Cc: linux-block@vger.kernel.org, linux-nvme@lists.infradead.org,
	 John Meneghini <jmeneghi@redhat.com>,
	Daniel Wagner <dwagner@suse.de>
Subject: Re: [PATCH blktests 1/2] nvme: Add _setup_nvmet_port_marginal
Date: Fri, 14 Aug 2026 20:28:52 +0900	[thread overview]
Message-ID: <an77IhZTP02mcn5E@shinmob> (raw)
In-Reply-To: <20260812174503.3705830-2-jtaubepe@redhat.com>

On Aug 12, 2026 / 13:45, Jesse Taube wrote:
> Adds functionality to set up a NVME port in marginal state.
> This is useful for testing the behavior of the NVME driver when a port
> is in a marginal state.
> 
> Signed-off-by: Jesse Taube <jtaubepe@redhat.com>
> ---
>  common/nvme | 30 ++++++++++++++++++++++++++++++
>  1 file changed, 30 insertions(+)
> 
> diff --git a/common/nvme b/common/nvme
> index f399937..d389e18 100644
> --- a/common/nvme
> +++ b/common/nvme
> @@ -153,6 +153,15 @@ _nvme_fcloop_add_tport() {
>  	echo "wwnn=${wwnn},wwpn=${wwpn}" > ${loopctl}/add_target_port
>  }
>  
> +_nvme_fcloop_set_rport_marginal() {
> +	local wwnn="$1"
> +	local wwpn="$2"
> +	local marginal="$3"
> +	local loopctl=/sys/class/fcloop/ctl
> +
> +	echo "wwnn=${wwnn},wwpn=${wwpn},marginal=${marginal}" > ${loopctl}/set_marginal_rport

Nit: Most of blktests filess keep each line within 80 characters.
     Folding the line above into two lines is a bit better for small
     terminals.

	echo "wwnn=${wwnn},wwpn=${wwpn},marginal=${marginal}" \
		> ${loopctl}/set_marginal_rport


> +}
> +
>  _nvme_fcloop_del_rport() {
>  	local local_wwnn="$1"
>  	local local_wwpn="$2"
> @@ -763,6 +772,27 @@ _create_nvmet_port() {
>  	echo "${port}"
>  }
>  
> +_setup_nvmet_port_marginal() {
> +	local -i port="$1"
> +	local state="${2}"
> +
> +	if [[ ! "${nvme_trtype}" == "fc" ]]; then

Nit: it can be a bit shorter:

	if [[ "${nvme_trtype}" != "fc" ]]; then

  parent reply	other threads:[~2026-08-14 11:29 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-12 17:45 [PATCH blktests 0/2] Test multipath and marginal ports Jesse Taube
2026-08-12 17:45 ` [PATCH blktests 1/2] nvme: Add _setup_nvmet_port_marginal Jesse Taube
2026-08-12 19:03   ` John Meneghini
2026-08-14 11:28   ` Shin'ichiro Kawasaki [this message]
2026-08-12 17:45 ` [PATCH blktests 2/2] nvme/070: Test multipath and marginal ports Jesse Taube
2026-08-12 19:03   ` John Meneghini
2026-08-14 11:47   ` Shin'ichiro Kawasaki
2026-08-14 11:24 ` [PATCH blktests 0/2] " Shin'ichiro Kawasaki
2026-08-14 14:18   ` Jesse Taube

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=an77IhZTP02mcn5E@shinmob \
    --to=shinichiro.kawasaki@wdc.com \
    --cc=dwagner@suse.de \
    --cc=jmeneghi@redhat.com \
    --cc=jtaubepe@redhat.com \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-nvme@lists.infradead.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