diff mbox series

[1/2] Revert "RDMA/isert: Fix a recently introduced regression related to logout"

Message ID 20200213050900.19094-1-bvanassche@acm.org (mailing list archive)
State Accepted
Headers show
Series [1/2] Revert "RDMA/isert: Fix a recently introduced regression related to logout" | expand

Commit Message

Bart Van Assche Feb. 13, 2020, 5:08 a.m. UTC
Since commit 04060db41178 introduces soft lockups when toggling network
interfaces, revert it.

Cc: Rahul Kundu <rahul.kundu@chelsio.com>
Cc: Mike Marciniszyn <mike.marciniszyn@intel.com>
Cc: Sagi Grimberg <sagi@grimberg.me>
Reported-by: Dakshaja Uppalapati <dakshaja@chelsio.com>
Fixes: 04060db41178 ("scsi: RDMA/isert: Fix a recently introduced regression related to logout")
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
---
 drivers/infiniband/ulp/isert/ib_isert.c | 12 ++++++++++++
 drivers/target/iscsi/iscsi_target.c     |  6 +++---
 2 files changed, 15 insertions(+), 3 deletions(-)

Comments

Bart Van Assche Feb. 13, 2020, 5:25 a.m. UTC | #1
On 2020-02-12 21:08, Bart Van Assche wrote:
> [ ... ]

Oops, the cover letter has not been included. This is the cover letter I
wanted to include:

[PATCH 0/2] Revert two recent iSCSI / iSER patches

Hi Martin,

Recently Dakshaja Uppalapati reported a regression in the iSER driver
and confirmed that the regression is fixed by reverting the two most
recent iSCSI / iSER patches. Hence this patch series with two reverts.

Thanks,

Bart.

Bart Van Assche (2):
  Revert "RDMA/isert: Fix a recently introduced regression related to
    logout"
  Revert "target: iscsi: Wait for all commands to finish before freeing
    a session"

 drivers/infiniband/ulp/isert/ib_isert.c | 12 ++++++++++++
 drivers/target/iscsi/iscsi_target.c     | 16 +++++-----------
 include/scsi/iscsi_proto.h              |  1 -
 3 files changed, 17 insertions(+), 12 deletions(-)
Marciniszyn, Mike Feb. 14, 2020, 2:28 p.m. UTC | #2
> 
> [PATCH 0/2] Revert two recent iSCSI / iSER patches
> 

Bart,

This will mean we will again see failures in our internal iSer testing.

What is the status of a final fix?

If you have something to try, I would be glad to test...

Mike
Bart Van Assche Feb. 14, 2020, 7:07 p.m. UTC | #3
On 2/14/20 6:28 AM, Marciniszyn, Mike wrote:
>>
>> [PATCH 0/2] Revert two recent iSCSI / iSER patches
>>
> 
> Bart,
> 
> This will mean we will again see failures in our internal iSer testing.
> 
> What is the status of a final fix?
> 
> If you have something to try, I would be glad to test...

Hi Mike,

Please take another look at this patch series. No new regressions should 
be introduced except if someone runs a bisect that lands in the middle 
of this patch series. Patch 1/2 reintroduces a regression but patches 
1/2 and 2/2 combined should restore iSER to the state of that driver in 
kernel v5.4.

Thanks,

Bart.
Martin K. Petersen Feb. 14, 2020, 10:14 p.m. UTC | #4
Bart,

> Since commit 04060db41178 introduces soft lockups when toggling
> network interfaces, revert it.

Applied 1+2 to 5.6/scsi-fixes. Thanks!
diff mbox series

Patch

diff --git a/drivers/infiniband/ulp/isert/ib_isert.c b/drivers/infiniband/ulp/isert/ib_isert.c
index b273e421e910..a1a035270cab 100644
--- a/drivers/infiniband/ulp/isert/ib_isert.c
+++ b/drivers/infiniband/ulp/isert/ib_isert.c
@@ -2575,6 +2575,17 @@  isert_wait4logout(struct isert_conn *isert_conn)
 	}
 }
 
+static void
+isert_wait4cmds(struct iscsi_conn *conn)
+{
+	isert_info("iscsi_conn %p\n", conn);
+
+	if (conn->sess) {
+		target_sess_cmd_list_set_waiting(conn->sess->se_sess);
+		target_wait_for_sess_cmds(conn->sess->se_sess);
+	}
+}
+
 /**
  * isert_put_unsol_pending_cmds() - Drop commands waiting for
  *     unsolicitate dataout
@@ -2622,6 +2633,7 @@  static void isert_wait_conn(struct iscsi_conn *conn)
 
 	ib_drain_qp(isert_conn->qp);
 	isert_put_unsol_pending_cmds(conn);
+	isert_wait4cmds(conn);
 	isert_wait4logout(isert_conn);
 
 	queue_work(isert_release_wq, &isert_conn->release_work);
diff --git a/drivers/target/iscsi/iscsi_target.c b/drivers/target/iscsi/iscsi_target.c
index b94ed4e30770..7251a87bb576 100644
--- a/drivers/target/iscsi/iscsi_target.c
+++ b/drivers/target/iscsi/iscsi_target.c
@@ -4149,6 +4149,9 @@  int iscsit_close_connection(
 	iscsit_stop_nopin_response_timer(conn);
 	iscsit_stop_nopin_timer(conn);
 
+	if (conn->conn_transport->iscsit_wait_conn)
+		conn->conn_transport->iscsit_wait_conn(conn);
+
 	/*
 	 * During Connection recovery drop unacknowledged out of order
 	 * commands for this connection, and prepare the other commands
@@ -4234,9 +4237,6 @@  int iscsit_close_connection(
 	target_sess_cmd_list_set_waiting(sess->se_sess);
 	target_wait_for_sess_cmds(sess->se_sess);
 
-	if (conn->conn_transport->iscsit_wait_conn)
-		conn->conn_transport->iscsit_wait_conn(conn);
-
 	ahash_request_free(conn->conn_tx_hash);
 	if (conn->conn_rx_hash) {
 		struct crypto_ahash *tfm;