Linux block layer
 help / color / mirror / Atom feed
From: John Garry <john.g.garry@oracle.com>
To: Daniel Wagner <dwagner@suse.de>
Cc: shinichiro.kawasaki@wdc.com, linux-block@vger.kernel.org,
	linux-nvme@lists.infradead.org, nilay@linux.ibm.com
Subject: Re: [PATCH blktests] nvme/068: add a test for multipath delayed removal
Date: Mon, 27 Apr 2026 13:51:17 +0100	[thread overview]
Message-ID: <2512cec3-31a8-4703-a50e-85289c860d25@oracle.com> (raw)
In-Reply-To: <655129a4-de84-4c10-9e55-f75143684b7c@flourine.local>

On 27/04/2026 13:17, Daniel Wagner wrote:
> On Wed, Apr 15, 2026 at 10:41:11AM +0000, John Garry wrote:
>> +	# Part a: Prove that writes fail when no path returns. Any reads or
>> +	#	  writes are queued during the delayed removal period. If no
>> +	#	  paths return before the timer expires, then those IOs should
>> +	#	  fail.
>> +	#	  During the delayed removal period, ensure that the module
>> +	#	  refcnt is incremented, to prove that we cannot remove the
>> +	#	  driver during this period.
>> +	nvmedev=$(_find_nvme_dev "${def_subsysnqn}")
>> +	ns=$(_find_nvme_ns "${def_subsys_uuid}")
>> +	refcnt=$(_module_use_count nvme_core)
>> +	echo 10 > "/sys/block/"$ns"/delayed_removal_secs"
>> +	refcnt_orig=$(_module_use_count nvme_core)
>> +	_nvme_disconnect_ctrl "${nvmedev}"
>> +	sleep 1
> Is there a better alternative to sleep for these tests? I'm worried
> about reliability and the extra runtime added by idling.

I suppose that I could check sysfs to ensure that the controller has 
disappeared (instead of the sleep) for the disconnect. And similar idea 
for reconnect.

However some of what we want to test is still based on timing - for 
example, if we set delayed removal timeout to X seconds, we want to 
ensure that the gendisk is gone after X seconds. So we need the X second 
delay. Currently X is 10, but can shorten that.

sound ok?




  reply	other threads:[~2026-04-27 12:51 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-15 10:41 [PATCH blktests] nvme/068: add a test for multipath delayed removal John Garry
2026-04-15 17:58 ` Chaitanya Kulkarni
2026-04-16 11:18 ` Nilay Shroff
2026-04-16 11:45   ` John Garry
2026-04-16 12:50 ` Shinichiro Kawasaki
2026-04-16 13:03   ` John Garry
2026-04-17  2:22     ` Shinichiro Kawasaki
2026-04-27 12:17 ` Daniel Wagner
2026-04-27 12:51   ` John Garry [this message]
2026-04-28 12:42     ` Daniel Wagner

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=2512cec3-31a8-4703-a50e-85289c860d25@oracle.com \
    --to=john.g.garry@oracle.com \
    --cc=dwagner@suse.de \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-nvme@lists.infradead.org \
    --cc=nilay@linux.ibm.com \
    --cc=shinichiro.kawasaki@wdc.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox