perf/nvme: simplify discover_bdevs()
This function does need to handle legacy configs and it's single use did not request any wait_for_spdk_bdev. Remove those arguments. Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com> Change-Id: Ic988762c7ca622ff538aeb7bd2bb529e6e6d56e4 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4616 Community-CI: Mellanox Build Bot Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Reviewed-by: Paul Luse <paul.e.luse@intel.com> Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
This commit is contained in:
parent
e251e40422
commit
d48992413c
@ -3,8 +3,7 @@
|
||||
function discover_bdevs() {
|
||||
local rootdir=$1
|
||||
local config_file=$2
|
||||
local cfg_type=$3
|
||||
local wait_for_spdk_bdev=${4:-30}
|
||||
local wait_for_spdk_bdev=30
|
||||
local rpc_server=/var/tmp/spdk-discover-bdevs.sock
|
||||
|
||||
if [ ! -e $config_file ]; then
|
||||
@ -12,14 +11,10 @@ function discover_bdevs() {
|
||||
return 1
|
||||
fi
|
||||
|
||||
if [ -z $cfg_type ]; then
|
||||
cfg_type="-c"
|
||||
fi
|
||||
|
||||
# Start the bdev service to query for the list of available
|
||||
# bdevs.
|
||||
$rootdir/test/app/bdev_svc/bdev_svc -r $rpc_server -i 0 \
|
||||
$cfg_type $config_file &> /dev/null &
|
||||
--json $config_file &> /dev/null &
|
||||
stubpid=$!
|
||||
while ! [ -e /var/run/spdk_bdev0 ]; do
|
||||
# If this counter drops to zero, errexit will be caught to abort the test
|
||||
@ -135,7 +130,7 @@ function get_numa_node() {
|
||||
done
|
||||
elif [[ "$plugin" =~ "bdev" ]]; then
|
||||
local bdevs
|
||||
bdevs=$(discover_bdevs $rootdir $testdir/bdev.conf --json)
|
||||
bdevs=$(discover_bdevs $rootdir $testdir/bdev.conf)
|
||||
for name in $disks; do
|
||||
local bdev_bdf
|
||||
bdev_bdf=$(jq -r ".[] | select(.name==\"$name\").driver_specific.nvme.pci_address" <<< $bdevs)
|
||||
|
Loading…
Reference in New Issue
Block a user