From: Cheng Shao Date: Tue, 11 Feb 2014 03:36:16 +0000 (-0800) Subject: LU-4582 mgc: replace hard-coded MGC_ENQUEUE_LIMIT value X-Git-Tag: 2.5.60~31 X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=commitdiff_plain;h=fb7ac6a880b71cb9e0252bcbb6d9bbb4b4ddf7fd LU-4582 mgc: replace hard-coded MGC_ENQUEUE_LIMIT value During client mount, the client will send an LDLM_ENQUEUE request to MGS with send delay set to MGC_ENQUEUE_LIMIT, which is hard coded to 50 seconds. On the other hand, the interval for pinger is deduced from obd_timeout. When obd_timeout is configured for a longer period of time, so does the pinger. We know that connecting to the secondary MGS node is triggered by the pinger. Now that we have a longer interval, the pinger will not be able to try the secondary before the LDLM_ENQUEUE request fails the mount using the same delay limit. This code change will replace the hard-coded send delay being mentioned above with a value that is long enough to give the client a chance to connect to the secondary MGS if exists. Xyratex-bug-id: MRP-1516 Signed-off-by: Cheng Shao Change-Id: I256c533ca80a93e547afa21c4722d628911ae919 Reviewed-on: http://review.whamcloud.com/9217 Reviewed-by: Ryan Haasken Reviewed-by: Dmitry Eremin Tested-by: Jenkins Tested-by: Maloo Reviewed-by: Oleg Drokin --- diff --git a/lustre/mgc/mgc_request.c b/lustre/mgc/mgc_request.c index 99ba813..aa9afc5 100644 --- a/lustre/mgc/mgc_request.c +++ b/lustre/mgc/mgc_request.c @@ -1001,7 +1001,10 @@ static int mgc_blocking_ast(struct ldlm_lock *lock, struct ldlm_lock_desc *desc, } /* Not sure where this should go... */ -#define MGC_ENQUEUE_LIMIT 50 +/* This is the timeout value for MGS_CONNECT request plus a ping interval, such + * that we can have a chance to try the secondary MGS if any. */ +#define MGC_ENQUEUE_LIMIT (INITIAL_CONNECT_TIMEOUT + (AT_OFF ? 0 : at_min) \ + + PING_INTERVAL) #define MGC_TARGET_REG_LIMIT 10 #define MGC_SEND_PARAM_LIMIT 10