Whamcloud - gitweb
LU-9019 libcfs: avoid using HZ and msecs_to_jiffies() 20/35520/2
authorJames Simmons <uja.ornl@yahoo.com>
Mon, 15 Jul 2019 15:28:32 +0000 (11:28 -0400)
committerOleg Drokin <green@whamcloud.com>
Wed, 24 Jul 2019 04:20:45 +0000 (04:20 +0000)
commit0c2cc920370e5dcf99e141610020d75082d2898c
tree3488c11278bec32bada77cfee2400273c4309316
parent092ecd66127eade284550b83192fa004ff55501b
LU-9019 libcfs: avoid using HZ and msecs_to_jiffies()

HZ is a constant selected with the configuration of the kernel
and msecs_to_jiffies() is a inline function in jiffies.h. Because
we are out of tree that means prebuilt lustre packages could be
installed on a node with different values which impact the
behavior of the file system. This was addressed earlier but
regression have crept back in. Fix up all those instances by
replacing msec_to_jiffies() and HZ with cfs_time_seconds() which
translates seconds to jiffies with nsec_to_jiffies(). Add to
spelling.txt to avoid new regressions.

Change-Id: Ie13efe83774db498bb5475ed47a057bbd42d47bf
Signed-off-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-on: https://review.whamcloud.com/35520
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Yang Sheng <ys@whamcloud.com>
Reviewed-by: Jian Yu <yujian@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
21 files changed:
contrib/scripts/spelling.txt
libcfs/libcfs/fail.c
libcfs/libcfs/linux/linux-crypto.c
lnet/klnds/o2iblnd/o2iblnd_cb.c
lnet/lnet/api-ni.c
lnet/lnet/lib-socket.c
lustre/ldlm/ldlm_lib.c
lustre/ldlm/ldlm_resource.c
lustre/lfsck/lfsck_lib.c
lustre/llite/llite_lib.c
lustre/llite/statahead.c
lustre/lov/lov_io.c
lustre/mdt/mdt_handler.c
lustre/mgc/mgc_request.c
lustre/obdclass/integrity.c
lustre/obdclass/obd_mount_server.c
lustre/osc/osc_request.c
lustre/osd-ldiskfs/osd_handler.c
lustre/osp/osp_precreate.c
lustre/ptlrpc/gss/gss_svc_upcall.c
lustre/ptlrpc/sec.c