numam-spdk/module
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
..
accel accel: Don't query the channel queue depth. Rely on -EBUSY 2022-01-20 07:54:55 +00:00
bdev Lib/iSCSI: add the LUN Resize support 2022-01-20 07:56:23 +00:00
blob blob: use uint64_t for unmap and write_zeroes lba count 2021-10-14 08:17:16 +00:00
blobfs blobfs: check return value of strdup in blobfs_fuse_start() 2021-06-16 08:53:21 +00:00
env_dpdk so_ver: increase all major versions 2021-02-05 14:43:47 +00:00
event nvmf: remove accept poller from generic layer 2021-12-14 13:18:33 +00:00
scheduler gscheduler: use current tsc for decision. 2021-12-31 09:21:27 +00:00
sock sock: Fix SPDK_ZEROCOPY do not work for IPV6 2021-11-30 09:09:03 +00:00
Makefile scheduler: create public API and subsystem for scheduler/governor 2021-09-07 07:33:03 +00:00