numam-spdk/test/iscsi_tgt
GangCao 6b7e9d0af2 Lib/iSCSI: add the LUN Resize support
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>
2022-01-20 07:56:23 +00:00
..
bdev_io_wait test/iscsi: remove VPP tests 2020-08-17 08:19:46 +00:00
calsoft spelling: test 2021-12-03 08:13:22 +00:00
digests autotest: Replace fio.py with a bash wrapper in tests 2021-05-12 08:48:10 +00:00
ext4test script/gen_nvme: do not generate legacy configuration 2020-10-22 17:08:41 +00:00
filesystem test/iscsi: remove VPP tests 2020-08-17 08:19:46 +00:00
fio autotest: Replace fio.py with a bash wrapper in tests 2021-05-12 08:48:10 +00:00
fuzz test/iscsi: remove VPP tests 2020-08-17 08:19:46 +00:00
initiator test/iscsi: remove VPP tests 2020-08-17 08:19:46 +00:00
ip_migration test/iscsi: wait for tgt termination before creating new node 2021-07-27 08:12:46 +00:00
login_redirection autotest: Replace fio.py with a bash wrapper in tests 2021-05-12 08:48:10 +00:00
lvol autotest: Replace fio.py with a bash wrapper in tests 2021-05-12 08:48:10 +00:00
multiconnection autotest: Replace fio.py with a bash wrapper in tests 2021-05-12 08:48:10 +00:00
nvme_remote spelling: test 2021-12-03 08:13:22 +00:00
perf spelling: test 2021-12-03 08:13:22 +00:00
pmem rpc: update a method create_pmem_pool 2021-07-13 08:58:21 +00:00
qos autotest: Replace fio.py with a bash wrapper in tests 2021-05-12 08:48:10 +00:00
rbd test/rbd: explicit keyring & conf test 2022-01-17 09:44:56 +00:00
reset autotest: Replace fio.py with a bash wrapper in tests 2021-05-12 08:48:10 +00:00
resize Lib/iSCSI: add the LUN Resize support 2022-01-20 07:56:23 +00:00
rpc_config spelling: test 2021-12-03 08:13:22 +00:00
sock test/iscsi: remove VPP tests 2020-08-17 08:19:46 +00:00
trace_record autotest: Replace fio.py with a bash wrapper in tests 2021-05-12 08:48:10 +00:00
common.sh test: add bdev_wait_for_examine to static JSON configs 2021-05-13 10:07:07 +00:00
iscsi_tgt.sh Lib/iSCSI: add the LUN Resize support 2022-01-20 07:56:23 +00:00