alistair23-linux/fs/ocfs2/cluster
Tina Ruchandani 40476b8294 ocfs2: use 64bit variables to track heartbeat time
o2hb_elapsed_msecs computes the time taken for a disk heartbeat.
'struct timeval' variables are used to store start and end times.  On
32-bit systems, the 'tv_sec' component of 'struct timeval' will overflow
in year 2038 and beyond.

This patch solves the overflow with the following:

1. Replace o2hb_elapsed_msecs using 'ktime_t' values to measure start
   and end time, and built-in function 'ktime_ms_delta' to compute the
   elapsed time.  ktime_get_real() is used since the code prints out the
   wallclock time.

2. Changes format string to print time as a single 64-bit nanoseconds
   value ("%lld") instead of seconds and microseconds.  This simplifies
   the code since converting ktime_t to that format would need expensive
   computation.  However, the debug log string is less readable than the
   previous format.

Signed-off-by: Tina Ruchandani <ruchandani.tina@gmail.com>
Suggested by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Mark Fasheh <mfasheh@suse.de>
Cc: Joel Becker <jlbec@evilplan.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2015-09-04 16:54:41 -07:00
..
heartbeat.c ocfs2: use 64bit variables to track heartbeat time 2015-09-04 16:54:41 -07:00
heartbeat.h ocfs2: fix deadlock between o2hb thread and o2net_wq 2014-10-09 22:25:47 -04:00
Makefile ocfs2: remove versioning information 2014-01-21 16:19:41 -08:00
masklog.c ocfs2: remove __mlog_cpu_guess 2015-06-24 17:49:39 -07:00
masklog.h ocfs2: reduce object size of mlog uses 2015-06-24 17:49:39 -07:00
netdebug.c fs/ocfs2/cluster/netdebug.c: use seq_open_private() not seq_open() 2014-10-09 22:25:47 -04:00
nodemanager.c ocfs2: remove versioning information 2014-01-21 16:19:41 -08:00
nodemanager.h
ocfs2_heartbeat.h
ocfs2_nodemanager.h ocfs2/dlm: Add message DLM_QUERY_REGION 2010-10-09 10:26:23 -07:00
quorum.c ocfs2: quorum: add a log for node not fenced 2014-08-29 16:28:17 -07:00
quorum.h
sys.c VERIFY_OCTAL_PERMISSIONS: stricter checking for sysfs perms. 2014-03-24 12:21:00 +10:30
sys.h
tcp.c ocfs2: o2net: should remove debugfs in o2net_init() out branch 2015-06-24 17:49:39 -07:00
tcp.h ocfs2: o2net: set tcp user timeout to max value 2014-08-29 16:28:16 -07:00
tcp_internal.h ocfs2: fix wrong comment 2015-02-10 14:30:28 -08:00