mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -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
|
|
@ -562,7 +562,15 @@ isert_connect_request(struct rdma_cm_id *cma_id, struct rdma_cm_event *event)
|
|||
struct isert_device *device;
|
||||
struct ib_device *ib_dev = cma_id->device;
|
||||
int ret = 0;
|
||||
u8 pi_support = np->tpg_np->tpg->tpg_attrib.t10_pi;
|
||||
u8 pi_support;
|
||||
|
||||
spin_lock_bh(&np->np_thread_lock);
|
||||
if (!np->enabled) {
|
||||
spin_unlock_bh(&np->np_thread_lock);
|
||||
pr_debug("iscsi_np is not enabled, reject connect request\n");
|
||||
return rdma_reject(cma_id, NULL, 0);
|
||||
}
|
||||
spin_unlock_bh(&np->np_thread_lock);
|
||||
|
||||
pr_debug("Entering isert_connect_request cma_id: %p, context: %p\n",
|
||||
cma_id, cma_id->context);
|
||||
|
|
@ -653,6 +661,7 @@ isert_connect_request(struct rdma_cm_id *cma_id, struct rdma_cm_event *event)
|
|||
goto out_mr;
|
||||
}
|
||||
|
||||
pi_support = np->tpg_np->tpg->tpg_attrib.t10_pi;
|
||||
if (pi_support && !device->pi_capable) {
|
||||
pr_err("Protection information requested but not supported\n");
|
||||
ret = -EINVAL;
|
||||
|
|
|
|||
Loading…
Reference in a new issue