]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
staging/lustre: Remove unneeded ldlm_timeout control
authorOleg Drokin <green@linuxhacker.ru>
Mon, 6 Jul 2015 16:48:45 +0000 (12:48 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 14 Jul 2015 02:47:20 +0000 (19:47 -0700)
ldlm_timeout is used server-side to determine AST timeouts,
so it makes no sense on the client, esp. since it's not really used
anywhere.
Remove all traces of it except from the config where make
it a noop.

Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/lustre/lustre/include/obd_support.h
drivers/staging/lustre/lustre/ldlm/ldlm_lockd.c
drivers/staging/lustre/lustre/obdclass/class_obd.c
drivers/staging/lustre/lustre/obdclass/linux/linux-sysctl.c
drivers/staging/lustre/lustre/obdclass/obd_config.c

index 73e2d4880b9b392c924b7f1e6e8e0fb7bd8648f3..f6b369206ace63b204b2f5768fa425acec4dc42c 100644 (file)
@@ -56,9 +56,7 @@ extern unsigned int obd_dump_on_eviction;
 /* obd_timeout should only be used for recovery, not for
    networking / disk / timings affected by load (use Adaptive Timeouts) */
 extern unsigned int obd_timeout;         /* seconds */
-extern unsigned int ldlm_timeout;       /* seconds */
 extern unsigned int obd_timeout_set;
-extern unsigned int ldlm_timeout_set;
 extern unsigned int at_min;
 extern unsigned int at_max;
 extern unsigned int at_history;
@@ -105,8 +103,6 @@ int obd_alloc_fail(const void *ptr, const char *name, const char *type,
 
 /* Timeout definitions */
 #define OBD_TIMEOUT_DEFAULT         100
-#define LDLM_TIMEOUT_DEFAULT       20
-#define MDS_LDLM_TIMEOUT_DEFAULT       6
 /* Time to wait for all clients to reconnect during recovery (hard limit) */
 #define OBD_RECOVERY_TIME_HARD   (obd_timeout * 9)
 /* Time to wait for all clients to reconnect during recovery (soft limit) */
index 941eb4e720392f83355f85bc95b6471dadeeb24f..ac79db952da78babfedf328047d798526e74780a 100644 (file)
@@ -76,15 +76,6 @@ inline unsigned long round_timeout(unsigned long timeout)
        return cfs_time_seconds((int)cfs_duration_sec(cfs_time_sub(timeout, 0)) + 1);
 }
 
-/* timeout for initial callback (AST) reply (bz10399) */
-static inline unsigned int ldlm_get_rq_timeout(void)
-{
-       /* Non-AT value */
-       unsigned int timeout = min(ldlm_timeout, obd_timeout / 3);
-
-       return timeout < 1 ? 1 : timeout;
-}
-
 #define ELT_STOPPED   0
 #define ELT_READY     1
 #define ELT_TERMINATE 2
index 8ebe2e6c1696e91f8bd88dd68da62fcea086ba88..34b16c044df8f79857d3b853765ece46510f4aa2 100644 (file)
@@ -78,12 +78,8 @@ atomic_t obd_dirty_pages;
 EXPORT_SYMBOL(obd_dirty_pages);
 unsigned int obd_timeout = OBD_TIMEOUT_DEFAULT;   /* seconds */
 EXPORT_SYMBOL(obd_timeout);
-unsigned int ldlm_timeout = LDLM_TIMEOUT_DEFAULT; /* seconds */
-EXPORT_SYMBOL(ldlm_timeout);
 unsigned int obd_timeout_set;
 EXPORT_SYMBOL(obd_timeout_set);
-unsigned int ldlm_timeout_set;
-EXPORT_SYMBOL(ldlm_timeout_set);
 /* Adaptive timeout defs here instead of ptlrpc module for /proc/sys/ access */
 unsigned int at_min = 0;
 EXPORT_SYMBOL(at_min);
index e800bd6c54914ddfca6133b95b2f986a33e033b0..eda5f30e8f30c9b7bc2dcc5a51784b879c6302ea 100644 (file)
@@ -61,8 +61,6 @@ static int proc_set_timeout(struct ctl_table *table, int write,
        int rc;
 
        rc = proc_dointvec(table, write, buffer, lenp, ppos);
-       if (ldlm_timeout >= obd_timeout)
-               ldlm_timeout = max(obd_timeout / 3, 1U);
        return rc;
 }
 
@@ -136,13 +134,6 @@ static struct ctl_table obd_table[] = {
                .mode     = 0644,
                .proc_handler = &proc_dointvec
        },
-       {
-               .procname = "ldlm_timeout",
-               .data     = &ldlm_timeout,
-               .maxlen   = sizeof(int),
-               .mode     = 0644,
-               .proc_handler = &proc_set_timeout
-       },
        {
                .procname = "max_dirty_mb",
                .data     = &obd_max_dirty_pages,
index 3435720c96bbda90a79682db7bc5b7c5140c03d9..93805ac93c5a8e78f31189db7277ab329c705210 100644 (file)
@@ -1123,12 +1123,7 @@ int class_process_config(struct lustre_cfg *lcfg)
                goto out;
        }
        case LCFG_SET_LDLM_TIMEOUT: {
-               CDEBUG(D_IOCTL, "changing lustre ldlm_timeout from %d to %d\n",
-                      ldlm_timeout, lcfg->lcfg_num);
-               ldlm_timeout = max(lcfg->lcfg_num, 1U);
-               if (ldlm_timeout >= obd_timeout)
-                       ldlm_timeout = max(obd_timeout / 3, 1U);
-               ldlm_timeout_set = 1;
+               /* ldlm_timeout is not used on the client */
                err = 0;
                goto out;
        }