__iscsi_unbind_session() set session state to ISCSI_SESSION_UNBOUND, which
would overwrite the ISCSI_SESSION_FREE state.
Signed-off-by: Wenchao Hao
---
drivers/scsi/scsi_transport_iscsi.c | 26 --
1 file changed, 16 insertions(+), 10 deletions(-)
diff --git
Fix the issue of kernel send multiple ISCSI_KEVENT_UNBIND_SESSION event.
If session is in UNBOUND state, do not perform unbind operations anymore,
else unbind session and set session to UNBOUND state.
Reference:https://github.com/open-iscsi/open-iscsi/issues/338
Signed-off-by: Wenchao Hao
---
kernel would send ISCSI_KEVENT_UNBIND_SESSION twice to userspace, for
open-iscsi, this would trigger iscsi_stop twice. We should fix this issue.
Here introduced a new session state ISCSI_SESSION_UNBOUND to address it.
Once session state is ISCSI_KEVENT_UNBIND_SESSION, it means