From 1e879636a287474cf7bcd74812bb0517d806a690 Mon Sep 17 00:00:00 2001 From: Shuhei Matsumoto Date: Tue, 8 Oct 2019 07:27:24 +0900 Subject: [PATCH] lib/iscsi: Handle IN_LOGIN as the same way as RUNNING for flushing PDUs Previously When the connection is in login processing, flushing PDUs had been done by tight loop. Login processing will not fill out send buffers but we can use poller to flush PDUs as same as when the connection is running iscsi_conn_flush_pdus(). Hence change the check condition to include INVALID state to use poller in iscsi_conn_flush_pdus(). This change is necessary because the subsequent patches will change iscsi_conn_flush_pdus() not to flush PDUs when the connection is not invalid or running. Signed-off-by: Shuhei Matsumoto Change-Id: I543a912bf1aa957df7033184ce5989ac92367e49 Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/470702 Reviewed-by: Jim Harris Reviewed-by: Changpeng Liu Tested-by: SPDK CI Jenkins --- lib/iscsi/conn.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/iscsi/conn.c b/lib/iscsi/conn.c index f343c7b3c..3ef2d41ec 100644 --- a/lib/iscsi/conn.c +++ b/lib/iscsi/conn.c @@ -1267,7 +1267,7 @@ iscsi_conn_flush_pdus(void *_conn) struct spdk_iscsi_conn *conn = _conn; int rc; - if (conn->state == ISCSI_CONN_STATE_RUNNING) { + if (conn->state <= ISCSI_CONN_STATE_RUNNING) { rc = iscsi_conn_flush_pdus_internal(conn); if (rc == 0 && conn->flush_poller != NULL) { spdk_poller_unregister(&conn->flush_poller);