test/nvme: wait after reloading nvme module
Make sure that all setting files under /sys/block/nvme* have time to get created properly. Change-Id: I9e3bf973fc09d2f5c38be3b29aa1fea4137c0402 Signed-off-by: Karol Latecki <karol.latecki@intel.com> Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/476557 Reviewed-by: Maciej Wawryk <maciejx.wawryk@intel.com> Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
This commit is contained in:
parent
cfb6aec8ab
commit
a34d7d7b2f
@ -310,6 +310,20 @@ function run_bdevperf(){
|
||||
sleep 1
|
||||
}
|
||||
|
||||
function wait_for_nvme_reload() {
|
||||
local nvmes=$1
|
||||
|
||||
shopt -s extglob
|
||||
for disk in $nvmes; do
|
||||
cmd="ls /sys/block/$disk/queue/*@(iostats|rq_affinity|nomerges|io_poll_delay)*"
|
||||
until $cmd 2>/dev/null; do
|
||||
echo "Waiting for full nvme driver reload..."
|
||||
sleep 0.5
|
||||
done
|
||||
done
|
||||
shopt -q extglob
|
||||
}
|
||||
|
||||
function usage()
|
||||
{
|
||||
set +x
|
||||
|
@ -70,6 +70,7 @@ elif [ $PLUGIN = "kernel-io-uring" ]; then
|
||||
|
||||
modprobe -rv nvme
|
||||
modprobe nvme poll_queues=8
|
||||
wait_for_nvme_reload $disk_names
|
||||
|
||||
backup_dir="/tmp/nvme_param_bak"
|
||||
mkdir -p $backup_dir
|
||||
@ -196,6 +197,7 @@ if [ $PLUGIN = "kernel-io-uring" ]; then
|
||||
# Reload the nvme driver so that other test runs are not affected
|
||||
modprobe -rv nvme
|
||||
modprobe nvme
|
||||
wait_for_nvme_reload $disk_names
|
||||
|
||||
for disk in $disk_names; do
|
||||
echo "INFO: Restoring device parameters for $disk"
|
||||
|
Loading…
Reference in New Issue
Block a user