From: rread Date: Fri, 14 Nov 2003 22:04:23 +0000 (+0000) Subject: Wake up the pinger after adding an import, to reset the timer. X-Git-Tag: v1_7_0_51~2^7~241 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=65430109788e6d8efdda5466a5e84a6e39484f52;p=fs%2Flustre-release.git Wake up the pinger after adding an import, to reset the timer. --- diff --git a/lustre/ptlrpc/pinger.c b/lustre/ptlrpc/pinger.c index f8661cf..2815aaf 100644 --- a/lustre/ptlrpc/pinger.c +++ b/lustre/ptlrpc/pinger.c @@ -175,11 +175,15 @@ static int ptlrpc_pinger_main(void *arg) if (time_to_next_ping > 0) { lwi = LWI_TIMEOUT(time_to_next_ping, NULL, NULL); l_wait_event(thread->t_ctl_waitq, - thread->t_flags & SVC_STOPPING, &lwi); + thread->t_flags & (SVC_STOPPING|SVC_EVENT), + &lwi); if (thread->t_flags & SVC_STOPPING) { thread->t_flags &= ~SVC_STOPPING; EXIT; break; + } else if (thread->t_flags & SVC_EVENT) { + /* woken after adding import to reset timer */ + thread->t_flags &= ~SVC_EVENT; } } } @@ -270,6 +274,9 @@ int ptlrpc_pinger_add_import(struct obd_import *imp) /* XXX sort, blah blah */ list_add_tail(&imp->imp_pinger_chain, &pinger_imports); class_import_get(imp); + + pinger_thread->t_flags |= SVC_EVENT; + wake_up(&pinger_thread->t_ctl_waitq); up(&pinger_sem); RETURN(0);