From SAM-4, section 5.13 (Sense Data); “When a command terminates with a CHECK CONDITION status, sense data shall be returned in the same I_T_L_Q nexus transaction (see 3.1.50) as the CHECK CONDITION status. After the sense data is returned, it shall be cleared except when it is associated with a unit attention condition and the UA_INTLCK_CTRL field in the Control mode page (see SPC-4) contains 10b or 11b.” SPDK does not set UA_INTLCK_CTRL to 10b or 11b, so we set the unit attention condition immediately against a single IO or Admin IO after reporting it via a CHECK CONDITION. Once the failed IO received at iSCSI initiator side, it will be retried. In the case of resize operation, if there is no IO from iSCSI initiator side, the unit attention condition will be delayed to report until the first IO is received at the iSCSI target side. Meanwhile, we clear the resizing (newly added) flag on our SCSI LUN structure after first time we report the resize unit attention condition. The kernel initiator won’t actually resize the corresponding block device automatically. It will report a uevent, and then you can set up udev rules to trigger a rescan. SPDK iSCSI initiator will automatically report the LUN size change. Change-Id: Ifc85b8d4d3fbea13e76fb5d1faf1ac6c8f662e6c Signed-off-by: GangCao <gang.cao@intel.com> Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/11086 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Xiaodong Liu <xiaodong.liu@intel.com> Reviewed-by: Changpeng Liu <changpeng.liu@intel.com> Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
72 lines
2.5 KiB
Bash
Executable File
72 lines
2.5 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
testdir=$(readlink -f $(dirname $0))
|
|
rootdir=$(readlink -f $testdir/../..)
|
|
source $rootdir/test/common/autotest_common.sh
|
|
|
|
if [ ! $(uname -s) = Linux ]; then
|
|
exit 0
|
|
fi
|
|
|
|
source $rootdir/test/iscsi_tgt/common.sh
|
|
|
|
# Run cleanup once to make sure we remove any stale iscsiadm
|
|
# entries if they were missed in previous runs
|
|
iscsicleanup
|
|
|
|
# Network configuration
|
|
create_veth_interfaces
|
|
|
|
trap 'cleanup_veth_interfaces; exit 1' SIGINT SIGTERM EXIT
|
|
|
|
run_test "iscsi_tgt_sock" ./test/iscsi_tgt/sock/sock.sh
|
|
if [[ -d /usr/local/calsoft ]]; then
|
|
run_test "iscsi_tgt_calsoft" ./test/iscsi_tgt/calsoft/calsoft.sh
|
|
else
|
|
skip_run_test_with_warning "WARNING: Calsoft binaries not found, skipping test!"
|
|
fi
|
|
run_test "iscsi_tgt_filesystem" ./test/iscsi_tgt/filesystem/filesystem.sh
|
|
run_test "iscsi_tgt_reset" ./test/iscsi_tgt/reset/reset.sh
|
|
run_test "iscsi_tgt_rpc_config" ./test/iscsi_tgt/rpc_config/rpc_config.sh
|
|
run_test "iscsi_tgt_iscsi_lvol" ./test/iscsi_tgt/lvol/iscsi_lvol.sh
|
|
run_test "iscsi_tgt_fio" ./test/iscsi_tgt/fio/fio.sh
|
|
run_test "iscsi_tgt_qos" ./test/iscsi_tgt/qos/qos.sh
|
|
run_test "iscsi_tgt_ip_migration" ./test/iscsi_tgt/ip_migration/ip_migration.sh
|
|
run_test "iscsi_tgt_trace_record" ./test/iscsi_tgt/trace_record/trace_record.sh
|
|
run_test "iscsi_tgt_login_redirection" ./test/iscsi_tgt/login_redirection/login_redirection.sh
|
|
|
|
if [ $RUN_NIGHTLY -eq 1 ]; then
|
|
if [ $SPDK_TEST_PMDK -eq 1 ]; then
|
|
run_test "iscsi_tgt_pmem" ./test/iscsi_tgt/pmem/iscsi_pmem.sh 4096 10
|
|
fi
|
|
run_test "iscsi_tgt_ext4test" ./test/iscsi_tgt/ext4test/ext4test.sh
|
|
run_test "iscsi_tgt_digests" ./test/iscsi_tgt/digests/digests.sh
|
|
fi
|
|
if [ $SPDK_TEST_RBD -eq 1 ]; then
|
|
if ! hash ceph; then
|
|
echo "ERROR: SPDK_TEST_RBD requested but no ceph installed!"
|
|
false
|
|
fi
|
|
run_test "iscsi_tgt_rbd" ./test/iscsi_tgt/rbd/rbd.sh
|
|
fi
|
|
|
|
trap 'cleanup_veth_interfaces; exit 1' SIGINT SIGTERM EXIT
|
|
|
|
if [ $SPDK_TEST_NVMF -eq 1 ]; then
|
|
# Test configure remote NVMe device from rpc and conf file
|
|
run_test "iscsi_tgt_fio_remote_nvme" ./test/iscsi_tgt/nvme_remote/fio_remote_nvme.sh
|
|
fi
|
|
|
|
if [ $RUN_NIGHTLY -eq 1 ]; then
|
|
run_test "iscsi_tgt_fuzz" ./test/iscsi_tgt/fuzz/fuzz.sh
|
|
run_test "iscsi_tgt_multiconnection" ./test/iscsi_tgt/multiconnection/multiconnection.sh
|
|
fi
|
|
|
|
if [ $SPDK_TEST_ISCSI_INITIATOR -eq 1 ]; then
|
|
run_test "iscsi_tgt_initiator" ./test/iscsi_tgt/initiator/initiator.sh
|
|
run_test "iscsi_tgt_bdev_io_wait" ./test/iscsi_tgt/bdev_io_wait/bdev_io_wait.sh
|
|
run_test "iscsi_tgt_resize" ./test/iscsi_tgt/resize/resize.sh
|
|
fi
|
|
|
|
cleanup_veth_interfaces
|
|
trap - SIGINT SIGTERM EXIT
|