diff options
author | Mike Christie <michael.christie@oracle.com> | 2022-02-26 18:49:42 -0600 |
---|---|---|
committer | Mike Christie <michael.christie@oracle.com> | 2022-02-27 00:58:40 -0600 |
commit | 1e5874d413cbd71aa6b1b962f71427af6bc70036 (patch) | |
tree | 355ba090931d56ec0d66036ebd455efedbcf031c | |
parent | 0795abbadef865bf3338f127ab03c990c8690422 (diff) | |
download | open-iscsi-1e5874d413cbd71aa6b1b962f71427af6bc70036.tar.gz |
iscsid: speed up resync
We don't need to wait for the relogin to complete when sending the sync
response. The caller does not know if the sync did a relogin and does not
even check if it did or not. This has us return immediately.
Signed-off-by: Mike Christie <michael.christie@oracle.com>
-rw-r--r-- | usr/initiator.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/usr/initiator.c b/usr/initiator.c index c42e356..7801c0c 100644 --- a/usr/initiator.c +++ b/usr/initiator.c @@ -2017,8 +2017,13 @@ iscsi_sync_session(node_rec_t *rec, queue_task_t *qtask, uint32_t sid) if (err) goto destroy_session; + /* + * The caller only cares we have rebuilt our state, and can process + * errors from the kernel and new commands like logout, so send the + * response now. + */ qtask->rsp.command = MGMT_IPC_SESSION_SYNC; - session->conn[0].login_qtask = qtask; + mgmt_ipc_write_rsp(qtask, ISCSI_SUCCESS); log_debug(3, "Started sync iSCSI session %d", session->id); session_conn_reopen(&session->conn[0], STOP_CONN_RECOVER); |