[PATCH blktests] nvme/068: add a test for multipath delayed removal

Daniel Wagner dwagner at suse.de
Mon Apr 27 05:17:01 PDT 2026


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.



More information about the Linux-nvme mailing list