From 08c58c92ea8ed40bdce13c976c75186ecda2258b Mon Sep 17 00:00:00 2001 From: Yan Burman Date: Wed, 10 Sep 2014 08:53:11 +0000 Subject: [PATCH] isert: Improve IO processing latency while closing connections Signed-off-by: Yan Burman git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/iser@5791 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- iscsi-scst/kernel/isert-scst/iser_rdma.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/iscsi-scst/kernel/isert-scst/iser_rdma.c b/iscsi-scst/kernel/isert-scst/iser_rdma.c index 4e402520a..4867a2543 100644 --- a/iscsi-scst/kernel/isert-scst/iser_rdma.c +++ b/iscsi-scst/kernel/isert-scst/iser_rdma.c @@ -499,6 +499,10 @@ static void isert_conn_drained_do_work(struct work_struct *work) container_of(work, struct isert_connection, drain_work); #endif + /* notify upper layer */ + if (!test_bit(ISERT_CONNECTION_ABORTED, &isert_conn->flags)) + isert_connection_closed(&isert_conn->iscsi); + isert_conn_free(isert_conn); } @@ -528,9 +532,6 @@ static void isert_handle_wc_error(struct ib_wc *wc) switch (wr->wr_op) { case ISER_WR_SEND: if (unlikely(wr->send_wr.num_sge == 0)) { /* Drain WR */ - /* notify upper layer */ - if (!test_bit(ISERT_CONNECTION_ABORTED, &isert_conn->flags)) - isert_connection_closed(&isert_conn->iscsi); isert_sched_conn_drained(isert_conn); } else { isert_pdu_err(&isert_pdu->iscsi);