[PATCH 2/2] iscsi: set session to FREE state after unbind session in remove session

2022-04-13 Thread 'Wenchao Hao' via open-iscsi
__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

[PATCH 1/2] scsi: iscsi: introduce session UNBOUND state to avoid multiple unbind event

2022-04-13 Thread 'Wenchao Hao' via open-iscsi
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 ---

[PATCH 0/2] Fix multiple iscsi session unbind event sent to userspace

2022-04-13 Thread 'Wenchao Hao' via open-iscsi
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