From: ericm Date: Wed, 7 Sep 2005 17:07:16 +0000 (+0000) Subject: adjust gss upcall timeout value just be secinit timeout, service gss upcall X-Git-Tag: v1_7_100~759 X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=commitdiff_plain;h=e6e9b8baa8c2db4385bf2e2a692463ae41eb43ac adjust gss upcall timeout value just be secinit timeout, service gss upcall might be very slow. --- diff --git a/lustre/sec/gss/gss_internal.h b/lustre/sec/gss/gss_internal.h index 66dd290..f659940 100644 --- a/lustre/sec/gss/gss_internal.h +++ b/lustre/sec/gss/gss_internal.h @@ -107,6 +107,30 @@ int rawobj_extract_alloc(rawobj_t *obj, __u32 **buf, __u32 *buflen); int rawobj_extract_local(rawobj_t *obj, __u32 **buf, __u32 *buflen); /* + * definition of several timeout values + */ +#define GSS_TIMEOUT_DELTA (5) +#define CRED_REFRESH_UPCALL_TIMEOUT \ + ({ \ + int timeout = obd_timeout - GSS_TIMEOUT_DELTA; \ + \ + if (timeout < GSS_TIMEOUT_DELTA * 2) \ + timeout = GSS_TIMEOUT_DELTA * 2; \ + timeout; \ + }) +#define SECINIT_RPC_TIMEOUT \ + ({ \ + int timeout = CRED_REFRESH_UPCALL_TIMEOUT - \ + GSS_TIMEOUT_DELTA; \ + if (timeout < GSS_TIMEOUT_DELTA) \ + timeout = GSS_TIMEOUT_DELTA; \ + timeout; \ + }) +#define SECFINI_RPC_TIMEOUT (GSS_TIMEOUT_DELTA) + +#define SVCSEC_UPCALL_TIMEOUT (SECINIT_RPC_TIMEOUT) + +/* * mark of the interface between kernel and lgssd/lsvcgssd */ #define GSSD_INTERFACE_VERSION (1) diff --git a/lustre/sec/gss/sec_gss.c b/lustre/sec/gss/sec_gss.c index c901197..33b4291 100644 --- a/lustre/sec/gss/sec_gss.c +++ b/lustre/sec/gss/sec_gss.c @@ -80,26 +80,6 @@ struct rpc_clnt; #define GSS_CREDCACHE_EXPIRE (30 * 60) /* 30 minute */ -#define GSS_TIMEOUT_DELTA (5) -#define CRED_REFRESH_UPCALL_TIMEOUT \ - ({ \ - int timeout = obd_timeout - GSS_TIMEOUT_DELTA; \ - \ - if (timeout < GSS_TIMEOUT_DELTA * 2) \ - timeout = GSS_TIMEOUT_DELTA * 2; \ - timeout; \ - }) -#define SECINIT_RPC_TIMEOUT \ - ({ \ - int timeout = CRED_REFRESH_UPCALL_TIMEOUT - \ - GSS_TIMEOUT_DELTA; \ - if (timeout < GSS_TIMEOUT_DELTA) \ - timeout = GSS_TIMEOUT_DELTA; \ - timeout; \ - }) -#define SECFINI_RPC_TIMEOUT (GSS_TIMEOUT_DELTA) - - /********************************************** * gss security init/fini helper * **********************************************/ diff --git a/lustre/sec/gss/svcsec_gss.c b/lustre/sec/gss/svcsec_gss.c index 8bff6bf..9c96c3c 100644 --- a/lustre/sec/gss/svcsec_gss.c +++ b/lustre/sec/gss/svcsec_gss.c @@ -268,8 +268,9 @@ gssd_upcall(struct rsi *item, struct cache_req *chandle) } } read_unlock(&rsi_cache.hash_lock); - } while ((get_seconds() - starttime) <= 15); - CERROR("15s timeout while waiting cache refill\n"); + } while ((get_seconds() - starttime) <= SVCSEC_UPCALL_TIMEOUT); + CERROR("%ds timeout while waiting cache refill\n", + SVCSEC_UPCALL_TIMEOUT); return NULL; }