to avoid cases when anyone sending an RPC observes the connection
in this state while it's going to reconnect right away.
Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Change-Id: I9ca89051c4176fe321262f8b2f52969c382e401e
Reviewed-on: https://review.whamcloud.com/37523
Reviewed-by: Mike Pershin <mpershin@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
imp->imp_state != LUSTRE_IMP_CLOSED) {
LASSERTF(imp->imp_state == LUSTRE_IMP_CONNECTING,
"%s\n", ptlrpc_import_state_name(imp->imp_state));
imp->imp_state != LUSTRE_IMP_CLOSED) {
LASSERTF(imp->imp_state == LUSTRE_IMP_CONNECTING,
"%s\n", ptlrpc_import_state_name(imp->imp_state));
- imp->imp_state = LUSTRE_IMP_IDLE;
memset(&imp->imp_remote_handle, 0,
sizeof(imp->imp_remote_handle));
/* take our DISCONNECT into account */
memset(&imp->imp_remote_handle, 0,
sizeof(imp->imp_remote_handle));
/* take our DISCONNECT into account */
import_set_state_nolock(imp, LUSTRE_IMP_NEW);
ptlrpc_reset_reqs_generation(imp);
connect = 1;
import_set_state_nolock(imp, LUSTRE_IMP_NEW);
ptlrpc_reset_reqs_generation(imp);
connect = 1;
+ } else {
+ /* do not expose transient IDLE state */
+ import_set_state_nolock(imp, LUSTRE_IMP_IDLE);