mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04:00
Target/iscsi,iser: Avoid accepting transport connections during stop stage
When the target is in stop stage, iSER transport initiates RDMA disconnects. The iSER initiator may wish to establish a new connection over the still existing network portal. In this case iSER transport should not accept and resume new RDMA connections. In order to learn that, iscsi_np is added with enabled flag so the iSER transport can check when deciding weather to accept and resume a new connection request. The iscsi_np is enabled after successful transport setup, and disabled before iscsi_np login threads are cleaned up. Signed-off-by: Sagi Grimberg <[email protected]> Cc: [email protected] # 3.10+ Signed-off-by: Nicholas Bellinger <[email protected]>
This commit is contained in:
parent
531b7bf4bd
commit
14f4b54fe3
4 changed files with 13 additions and 1 deletions
|
|
@ -775,6 +775,7 @@ struct iscsi_np {
|
|||
int np_ip_proto;
|
||||
int np_sock_type;
|
||||
enum np_thread_state_table np_thread_state;
|
||||
bool enabled;
|
||||
enum iscsi_timer_flags_table np_login_timer_flags;
|
||||
u32 np_exports;
|
||||
enum np_flags_table np_flags;
|
||||
|
|
|
|||
|
|
@ -984,6 +984,7 @@ int iscsi_target_setup_login_socket(
|
|||
}
|
||||
|
||||
np->np_transport = t;
|
||||
np->enabled = true;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -184,6 +184,7 @@ static void iscsit_clear_tpg_np_login_thread(
|
|||
return;
|
||||
}
|
||||
|
||||
tpg_np->tpg_np->enabled = false;
|
||||
iscsit_reset_np_thread(tpg_np->tpg_np, tpg_np, tpg, shutdown);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue