Whamcloud - gitweb
LU-12931 general: fix some cfs_time_seconds() inconsistencies. 68/36668/2
authorMr NeilBrown <neilb@suse.de>
Mon, 4 Nov 2019 01:58:18 +0000 (12:58 +1100)
committerOleg Drokin <green@whamcloud.com>
Fri, 6 Dec 2019 00:57:28 +0000 (00:57 +0000)
mgc_process_log:
  the value stored in 'secs' has units of 'jiffes' which is
  confusing.  So change the name to 'timeout'.
ptl_recover_import:
  the value stored in 'secs' has units of 'jffied' which is
  confusing.  It is reported in a CDEBUG message as 'seconds'.
  So rename to 'timeout' and report 'obd_timeout', which is in
  seconds.

Signed-off-by: Mr NeilBrown <neilb@suse.de>
Change-Id: I1c92c3ed45dc8a7ce9b82eb823e2db8779c881fa
Reviewed-on: https://review.whamcloud.com/36668
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Petros Koutoupis <pkoutoupis@cray.com>
Reviewed-by: Shaun Tancheff <stancheff@cray.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/mgc/mgc_request.c
lustre/ptlrpc/recover.c

index 40eab2e..200720c 100644 (file)
@@ -2073,7 +2073,7 @@ restart:
                    atomic_read(&mgc->u.cli.cl_mgc_refcount) > 0 && !retry) {
                        struct obd_import *imp;
                        struct l_wait_info lwi;
                    atomic_read(&mgc->u.cli.cl_mgc_refcount) > 0 && !retry) {
                        struct obd_import *imp;
                        struct l_wait_info lwi;
-                       int secs = cfs_time_seconds(obd_timeout);
+                       long timeout = cfs_time_seconds(obd_timeout);
 
                        mutex_unlock(&cld->cld_lock);
                        imp = class_exp2cliimp(mgc->u.cli.cl_mgc_mgsexp);
 
                        mutex_unlock(&cld->cld_lock);
                        imp = class_exp2cliimp(mgc->u.cli.cl_mgc_mgsexp);
@@ -2086,7 +2086,7 @@ restart:
                         * FULL or closed */
                        ptlrpc_pinger_force(imp);
 
                         * FULL or closed */
                        ptlrpc_pinger_force(imp);
 
-                       lwi = LWI_TIMEOUT(secs, NULL, NULL);
+                       lwi = LWI_TIMEOUT(timeout, NULL, NULL);
                        l_wait_event(imp->imp_recovery_waitq,
                                     !mgc_import_in_recovery(imp), &lwi);
 
                        l_wait_event(imp->imp_recovery_waitq,
                                     !mgc_import_in_recovery(imp), &lwi);
 
index ce46093..62890ec 100644 (file)
@@ -346,12 +346,12 @@ int ptlrpc_recover_import(struct obd_import *imp, char *new_uuid, int async)
 
        if (!async) {
                struct l_wait_info lwi;
 
        if (!async) {
                struct l_wait_info lwi;
-               long secs = cfs_time_seconds(obd_timeout);
+               long timeout = cfs_time_seconds(obd_timeout);
 
 
-               CDEBUG(D_HA, "%s: recovery started, waiting %lu seconds\n",
-                      obd2cli_tgt(imp->imp_obd), secs);
+               CDEBUG(D_HA, "%s: recovery started, waiting %u seconds\n",
+                      obd2cli_tgt(imp->imp_obd), obd_timeout);
 
 
-               lwi = LWI_TIMEOUT(secs, NULL, NULL);
+               lwi = LWI_TIMEOUT(timeout, NULL, NULL);
                rc = l_wait_event(imp->imp_recovery_waitq,
                                  !ptlrpc_import_in_recovery(imp), &lwi);
                CDEBUG(D_HA, "%s: recovery finished\n",
                rc = l_wait_event(imp->imp_recovery_waitq,
                                  !ptlrpc_import_in_recovery(imp), &lwi);
                CDEBUG(D_HA, "%s: recovery finished\n",