From a188106dfd9df0e58982401de957cc7136999f56 Mon Sep 17 00:00:00 2001 From: Andreas Dilger Date: Sun, 5 May 2019 01:56:25 -0600 Subject: [PATCH] LU-11830 libcfs: quiet print format warning The watchdog code was reworked in master but generates a warning on b2_12 due to mismatched print format vs. time64_t. Test-Parameters: trivial Signed-off-by: Andreas Dilger Change-Id: I65beef9b5567c45802778afd78e3fde7299406f8 Reviewed-on: https://review.whamcloud.com/34805 Tested-by: Jenkins Tested-by: Maloo Reviewed-by: Ben Evans Reviewed-by: Arshad Hussain Reviewed-by: Oleg Drokin --- libcfs/libcfs/watchdog.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/libcfs/libcfs/watchdog.c b/libcfs/libcfs/watchdog.c index 4c437ab..dd451dd 100644 --- a/libcfs/libcfs/watchdog.c +++ b/libcfs/libcfs/watchdog.c @@ -176,9 +176,9 @@ static void lcw_dump_stack(struct lc_watchdog *lcw) delta_time = current_time - lcw_last_watchdog_time; if (delta_time < libcfs_watchdog_ratelimit && lcw_recent_watchdog_count > 3) { - LCONSOLE_WARN("Service thread pid %u was inactive for %lu.%.02lus. Watchdog stack traces are limited to 3 per %d seconds, skipping this one.\n", + LCONSOLE_WARN("Service thread pid %u was inactive for %llu.%.02lus. Watchdog stack traces are limited to 3 per %d seconds, skipping this one.\n", (int)lcw->lcw_pid, - timediff.tv_sec, + (unsigned long long)timediff.tv_sec, timediff.tv_nsec / (NSEC_PER_SEC / 100), libcfs_watchdog_ratelimit); } else { @@ -190,9 +190,9 @@ static void lcw_dump_stack(struct lc_watchdog *lcw) lcw_recent_watchdog_count = 0; } - LCONSOLE_WARN("Service thread pid %u was inactive for %lu.%.02lus. The thread might be hung, or it might only be slow and will resume later. Dumping the stack trace for debugging purposes:\n", + LCONSOLE_WARN("Service thread pid %u was inactive for %llu.%.02lus. The thread might be hung, or it might only be slow and will resume later. Dumping the stack trace for debugging purposes:\n", (int)lcw->lcw_pid, - timediff.tv_sec, + (unsigned long long)timediff.tv_sec, timediff.tv_nsec / (NSEC_PER_SEC / 100)); lcw_dump(lcw); } @@ -391,9 +391,9 @@ static void lcw_update_time(struct lc_watchdog *lcw, const char *message) struct timespec64 timediff; timediff = ktime_to_timespec64(lapse); - LCONSOLE_WARN("Service thread pid %u %s after %lu.%.02lus. This indicates the system was overloaded (too many service threads, or there were not enough hardware resources).\n", + LCONSOLE_WARN("Service thread pid %u %s after %llu.%.02lus. This indicates the system was overloaded (too many service threads, or there were not enough hardware resources).\n", lcw->lcw_pid, message, - timediff.tv_sec, + (unsigned long long)timediff.tv_sec, timediff.tv_nsec / (NSEC_PER_SEC / 100)); } lcw->lcw_last_touched = newtime; -- 1.8.3.1