From 68fd2798224306e3afeea774580e99bc92f347bf Mon Sep 17 00:00:00 2001 From: yury Date: Thu, 6 Nov 2008 11:28:03 +0000 Subject: [PATCH] b=17310 Small add on patch for this bug. - quiet last fail_loc in ptlrpc_check_set() which is supposed to turn fail_loc off. We do not need it in log; - make sure that ptlrpc_set_next_timeout() yields 1s timeout (instead of 0s) for the set with rpcs in "unregistering" stage to prevent ptlrpcd from sleeping forever and hanging in test_45; - some comment cleanups in ptlrpc_set_next_timeout(); - in ptlrpc_unregister_reply() hit fail_loc and engage long unlink only for asyn == 1 which is connect in test_45. This makes sure that synchronous rpcs such as enqueue to mgs will not make test_45 longer than expected; - in ptlrpcd() make sure that we do not sleep on 0 timeout. --- lustre/ptlrpc/ptlrpcd.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lustre/ptlrpc/ptlrpcd.c b/lustre/ptlrpc/ptlrpcd.c index c75453d..9c0384f 100644 --- a/lustre/ptlrpc/ptlrpcd.c +++ b/lustre/ptlrpc/ptlrpcd.c @@ -184,10 +184,11 @@ static int ptlrpcd(void *arg) */ while (1) { struct l_wait_info lwi; - cfs_duration_t timeout; + int timeout; - timeout = cfs_time_seconds(ptlrpc_set_next_timeout(pc->pc_set)); - lwi = LWI_TIMEOUT(timeout, ptlrpc_expired_set, pc->pc_set); + timeout = ptlrpc_set_next_timeout(pc->pc_set); + lwi = LWI_TIMEOUT(cfs_time_seconds(timeout ? timeout : 1), + ptlrpc_expired_set, pc->pc_set); l_wait_event(pc->pc_set->set_waitq, ptlrpcd_check(pc), &lwi); -- 1.8.3.1