4 if [ $SYSTEM = "FreeBSD" ] ; then
5 echo "blob_io_wait.sh cannot run on FreeBSD currently."
9 testdir
=$
(readlink
-f $
(dirname $0))
10 rootdir
=$
(readlink
-f $testdir/..
/..
/..
)
11 source $rootdir/test
/common
/autotest_common.sh
12 source $rootdir/test
/nvmf
/common.sh
13 rpc_py
="$rootdir/scripts/rpc.py"
16 timing_enter blob_bdev_io_wait
18 truncate
-s 64M
$testdir/aio.bdev
20 $rootdir/test
/app
/bdev_svc
/bdev_svc
&
23 trap "killprocess $bdev_svc_pid; exit 1" SIGINT SIGTERM EXIT
25 waitforlisten
$bdev_svc_pid
26 $rpc_py construct_aio_bdev
$testdir/aio.bdev aio0
4096
27 $rpc_py construct_lvol_store aio0 lvs0
28 $rpc_py construct_lvol_bdev
-l lvs0 lvol0
32
30 killprocess
$bdev_svc_pid
32 # Minimal number of bdev io pool (128) and cache (1)
33 echo "[Bdev]" > $testdir/bdevperf.conf
34 echo "BdevIoPoolSize 128" >> $testdir/bdevperf.conf
35 echo "BdevIoCacheSize 1" >> $testdir/bdevperf.conf
36 echo "[AIO]" >> $testdir/bdevperf.conf
37 echo "AIO $testdir/aio.bdev aio0 4096" >> $testdir/bdevperf.conf
39 $rootdir/test
/bdev
/bdevperf
/bdevperf
-c $testdir/bdevperf.conf
-q 128 -o 4096 -w write -t 5 -r /var
/tmp
/spdk.sock
&
41 waitforlisten
$bdev_perf_pid
42 $rpc_py enable_bdev_histogram aio0
-e
44 $rpc_py get_bdev_histogram aio0 |
$rootdir/scripts
/histogram.py
45 $rpc_py enable_bdev_histogram aio0
-d
48 $rootdir/test
/bdev
/bdevperf
/bdevperf
-c $testdir/bdevperf.conf
-q 128 -o 4096 -w read -t 5 -r /var
/tmp
/spdk.sock
&
50 waitforlisten
$bdev_perf_pid
51 $rpc_py enable_bdev_histogram aio0
-e
53 $rpc_py get_bdev_histogram aio0 |
$rootdir/scripts
/histogram.py
54 $rpc_py enable_bdev_histogram aio0
-d
57 $rootdir/test
/bdev
/bdevperf
/bdevperf
-c $testdir/bdevperf.conf
-q 128 -o 4096 -w unmap
-t 1
60 rm -rf $testdir/bdevperf.conf
61 rm -rf $testdir/aio.bdev
62 trap - SIGINT SIGTERM EXIT
64 report_test_completion
"blob_io_wait"
65 timing_exit bdev_io_wait