1#!/bin/bash 2# SPDX-License-Identifier: GPL-2.0 3 4. "$(cd "$(dirname "$0")" && pwd)"/test_common.sh 5TID="stress_08" 6ERR_CODE=0 7 8ublk_io_and_remove() 9{ 10 run_io_and_remove "$@" 11 ERR_CODE=$? 12 if [ ${ERR_CODE} -ne 0 ]; then 13 echo "$TID failure: $*" 14 _show_result $TID $ERR_CODE 15 fi 16} 17 18if ! _have_program fio; then 19 exit "$UBLK_SKIP_CODE" 20fi 21 22if ! _have_feature "ZERO_COPY"; then 23 exit "$UBLK_SKIP_CODE" 24fi 25if ! _have_feature "AUTO_BUF_REG"; then 26 exit "$UBLK_SKIP_CODE" 27fi 28if ! _have_feature "BATCH_IO"; then 29 exit "$UBLK_SKIP_CODE" 30fi 31 32_prep_test "stress" "run IO and remove device(zero copy)" 33 34_create_backfile 0 256M 35_create_backfile 1 128M 36_create_backfile 2 128M 37 38ublk_io_and_remove 8G -t null -q 4 -b & 39ublk_io_and_remove 256M -t loop -q 4 --auto_zc -b "${UBLK_BACKFILES[0]}" & 40ublk_io_and_remove 256M -t stripe -q 4 --auto_zc -b "${UBLK_BACKFILES[1]}" "${UBLK_BACKFILES[2]}" & 41ublk_io_and_remove 8G -t null -q 4 -z --auto_zc --auto_zc_fallback -b & 42wait 43 44_cleanup_test "stress" 45_show_result $TID $ERR_CODE 46