From 451a2634a967a4784340ba1c47182e0bdb4d56e1 Mon Sep 17 00:00:00 2001 From: Mr NeilBrown Date: Mon, 4 Nov 2019 12:58:18 +1100 Subject: [PATCH] LU-12931 general: fix some cfs_time_seconds() inconsistencies. 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 Change-Id: I1c92c3ed45dc8a7ce9b82eb823e2db8779c881fa Reviewed-on: https://review.whamcloud.com/36668 Tested-by: jenkins Reviewed-by: James Simmons Tested-by: Maloo Reviewed-by: Andreas Dilger Reviewed-by: Petros Koutoupis Reviewed-by: Shaun Tancheff Reviewed-by: Oleg Drokin --- lustre/mgc/mgc_request.c | 4 ++-- lustre/ptlrpc/recover.c | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lustre/mgc/mgc_request.c b/lustre/mgc/mgc_request.c index 40eab2e..200720c 100644 --- a/lustre/mgc/mgc_request.c +++ b/lustre/mgc/mgc_request.c @@ -2073,7 +2073,7 @@ restart: 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); @@ -2086,7 +2086,7 @@ restart: * 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); diff --git a/lustre/ptlrpc/recover.c b/lustre/ptlrpc/recover.c index ce460934..62890ec 100644 --- a/lustre/ptlrpc/recover.c +++ b/lustre/ptlrpc/recover.c @@ -346,12 +346,12 @@ int ptlrpc_recover_import(struct obd_import *imp, char *new_uuid, int async) 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", -- 1.8.3.1