Whamcloud - gitweb
adjust gss upcall timeout value just be secinit timeout, service gss upcall
authorericm <ericm>
Wed, 7 Sep 2005 17:07:16 +0000 (17:07 +0000)
committerericm <ericm>
Wed, 7 Sep 2005 17:07:16 +0000 (17:07 +0000)
might be very slow.

lustre/sec/gss/gss_internal.h
lustre/sec/gss/sec_gss.c
lustre/sec/gss/svcsec_gss.c

index 66dd290..f659940 100644 (file)
@@ -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)
index c901197..33b4291 100644 (file)
@@ -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              *
  **********************************************/
index 8bff6bf..9c96c3c 100644 (file)
@@ -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;
 }