From: Alexander Boyko <alexander.boyko@xxxxxxx> Failover of node does not produce disconnect event, only inactive. Add sending disconnected events. HPE-bug-id: LUS-10750 WC-bug-id: https://jira.whamcloud.com/browse/LU-15724 Lustre-commit: e55fc043679cdfadf ("LU-15724 osp: wakeup all precreate threads") Signed-off-by: Alexander Boyko <alexander.boyko@xxxxxxx> Reviewed-on: https://review.whamcloud.com/47005 Reviewed-by: Alexey Lyashkov <alexey.lyashkov@xxxxxxx> Reviewed-by: Sergey Cheremencev <sergey.cheremencev@xxxxxxx> Reviewed-by: Oleg Drokin <green@xxxxxxxxxxxxx> Signed-off-by: James Simmons <jsimmons@xxxxxxxxxxxxx> --- fs/lustre/ptlrpc/import.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/fs/lustre/ptlrpc/import.c b/fs/lustre/ptlrpc/import.c index 3dc987cf..c0aee34 100644 --- a/fs/lustre/ptlrpc/import.c +++ b/fs/lustre/ptlrpc/import.c @@ -1726,6 +1726,10 @@ int ptlrpc_disconnect_import(struct obd_import *imp, int noclose) memset(&imp->imp_remote_handle, 0, sizeof(imp->imp_remote_handle)); spin_unlock(&imp->imp_lock); + obd_import_event(imp->imp_obd, imp, IMP_EVENT_DISCON); + if (!noclose) + obd_import_event(imp->imp_obd, imp, IMP_EVENT_INACTIVE); + if (rc == -ETIMEDOUT || rc == -ENOTCONN || rc == -ESHUTDOWN) rc = 0; -- 1.8.3.1