+2
−2
Loading
_iscsi_conn_remove_lun() which is the callback to LUN hot-removal returns immediately without closing the LUN if the connecion is already in exiting, then expects that the LUN will be closed by after the connection moves to the exited state. LUN hot removal process doesn't check any R2T task if it is not pending in SCSI layer but connection close process checks any R2T task even if it is not pending in SCSI layer. LUN hot removal will not complete until all LUN accesses are closed. iscsi_conn_close_lun() checks if the LUN is already closed or not, and so it will be no harm even if _iscsi_conn_remove_lun() calls iscsi_conn_close_lun(). If the connection is in exited state, all LUNs are already closed. This patch changes _iscsi_conn_remove_lun() to return immediately if the connection is in exited state. Signed-off-by:Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Change-Id: Iad6ecdc37493fa9f2d7ccab262a2c75dac2fcd48 Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/472507 Tested-by:
SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by:
Ziye Yang <ziye.yang@intel.com> Reviewed-by:
Jim Harris <james.r.harris@intel.com> Reviewed-by:
Paul Luse <paul.e.luse@intel.com> Reviewed-by:
Ben Walker <benjamin.walker@intel.com>