Send OSP_DISCONNECT only on health import. Otherwise,
force local disconnect for unhealthy imports.
Signed-off-by: Mikhail Pershin <mpershin@whamcloud.com>
Change-Id: Icd9f171271f4e17a65503fcc710ad3aaa2b84e1e
Reviewed-on: https://review.whamcloud.com/44753
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
* never added.) */
(void)ptlrpc_pinger_del_import(imp);
+ /* Send disconnect on healthy import, do force disconnect otherwise */
+ spin_lock(&imp->imp_lock);
+ imp->imp_obd->obd_force = imp->imp_state != LUSTRE_IMP_FULL;
+ spin_unlock(&imp->imp_lock);
+
rc = ptlrpc_disconnect_import(imp, 0);
if (rc != 0)
CERROR("%s: can't disconnect: rc = %d\n", obd->obd_name, rc);