Whamcloud - gitweb
LU-4423 libcfs: use 64-bit times for cfs_srand seed 51/23351/2
authorArnd Bergmann <arnd@arndb.de>
Tue, 25 Oct 2016 01:58:26 +0000 (21:58 -0400)
committerOleg Drokin <oleg.drokin@intel.com>
Sun, 1 Jan 2017 01:58:52 +0000 (01:58 +0000)
commit2d1be90507fc1f42f565d9e672c634b3855cb978
tree2d1dc94a7532519e79439648721b5de26defe813
parent9ee0787384daab9ba76ecaa31e1f2b9b41afdd9a
LU-4423 libcfs: use 64-bit times for cfs_srand seed

Several functions in Lustre call cfs_srand with do_gettimeofday
as the seed to get a pseudo-random number.
There is no bug here, but changing it to use ktime_get_ts64()
gets us closer to deprecating do_gettimeofday() and makes it slightly
more random.

Affected functions are:
lnet_shuffle_seed, init_lustre_lite and class_handle_init

Linux-commit: 1f4fc343c008981d3a91351c030e2c29f5cd1b1c

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Change-Id: I86d156afd71456d7d5412ebb8a2e519367d4f81d
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/23351
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Frank Zago <fzago@cray.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lnet/lnet/router.c
lustre/llite/super25.c
lustre/obdclass/lustre_handles.c