+53
−3
+1
−0
Loading
We ensure current pending tasks are aborted and no new task or PDU is pending after LUN is unplugged now. Then we have to ensure all task completions and aborts are sent to initiator. However, we had removed pending tasks without any notification to initiator. For this implementation, we are not surprised if initiator waits for in-flight commands for a long time. Due to recent refinements of LUN hotplug, we can wait safely that all existing tasks complete or abort. In _iscsi_conn_hotremove_lun(), after aborting R2Ts, start a poller to wait until all PDUs for the LUN are flushed. Then close the LUN. We can safely free deferred PDUs for the LUN because they are already flushed. Signed-off-by:Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Change-Id: I869b79a7c93d2e8a4a1577cc20d3b466548dfaaa Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/476033 Tested-by:
SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by:
Changpeng Liu <changpeng.liu@intel.com> Reviewed-by:
Jim Harris <james.r.harris@intel.com>