Whamcloud - gitweb
LU-4423 selftest: use jiffies_to_*() instead of cfs_duration_usec 19/27019/3
authorArnd Bergmann <arnd@arndb.de>
Tue, 9 May 2017 19:06:43 +0000 (15:06 -0400)
committerOleg Drokin <oleg.drokin@intel.com>
Sat, 20 May 2017 18:46:24 +0000 (18:46 +0000)
commitb49f7b3ac64c06be014be44d5b468dce5a75a240
treef273c906382e2f1e0af09264934a33af717e032f
parent2270ad3c85802d5fcd3cfcbd8bd109991d8d686f
LU-4423 selftest: use jiffies_to_*() instead of cfs_duration_usec

The cfs_duration_usec() function has a timeval as its output, which we
want to avoid in general because of the y2038 problem.

There are only two locations remaining in lustre, so we can for now
eplace one with jiffies_to_timeval(), which is a generic kernel function
that does the same thing, the other can just use jiffies_to_usecs()
and completely avoid the timeval.

This is not a full solution yet, but it's a small step that lets us
build a larger portion of lustre without this reference to timeval in
a header file, and avoid triggering automated checking tools that wants
to warn about timeval.

Linux-commit: 70513c5d17b9812cc218e8b4c7826ebb5f375d9a

Test-Parameters: trivial testlist=lnet-selftest

Change-Id: If39f4d4857a2b3210bb0dc634b8bb42530df83dc
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-on: https://review.whamcloud.com/27019
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Doug Oucharek <doug.s.oucharek@intel.com>
Reviewed-by: Olaf Weber <olaf.weber@hpe.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
libcfs/include/libcfs/linux/linux-time.h
lnet/selftest/conrpc.c
lnet/selftest/framework.c