Whamcloud - gitweb
LU-4423 ptlrpc: use 64-bit times for request times 77/24977/14
authorArnd Bergmann <arnd@arndb.de>
Mon, 1 May 2017 18:07:59 +0000 (14:07 -0400)
committerOleg Drokin <oleg.drokin@intel.com>
Tue, 9 May 2017 03:44:33 +0000 (03:44 +0000)
commitde7a14b5463754c39272a423e4fd5489874a01b8
treeb025a5381da9f0615f47665f570daf2ae83d483e
parent4ce3219eb8e6a07c5c37e4b425b29195488005c3
LU-4423 ptlrpc: use 64-bit times for request times

All request timestamps and deadlines in lustre are recorded in time_t
and timeval units, which overflow in 2038 on 32-bit systems.

In this patch, I'm converting them to time64_t and timespec64,
respectively. Unfortunately, this makes a relatively large patch,
but I could not find an obvious way to split it up some more without
breaking atomicity of the change.

Also unfortunately, this introduces two instances of div_u64_rem()
in the request path, which can be slow on 32-bit architectures. This
can probably be avoided by a larger restructuring of the code, but
it is unlikely that lustre is used in performance critical setups
on 32-bit architectures, so it seems better to optimize for correctness
rather than speed here.

Linux-commit: 219e6de627243c8dbc701eaafe1c30c481d1f82c

Change-Id: Iff3c2bdb50bbb34d27edd4402838f915c16530f4
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/24977
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
15 files changed:
libcfs/autoconf/lustre-libcfs.m4
libcfs/include/libcfs/linux/linux-time.h
lustre/include/lustre_import.h
lustre/include/lustre_net.h
lustre/mdc/mdc_locks.c
lustre/mdc/mdc_reint.c
lustre/osc/osc_request.c
lustre/ptlrpc/client.c
lustre/ptlrpc/events.c
lustre/ptlrpc/import.c
lustre/ptlrpc/lproc_ptlrpc.c
lustre/ptlrpc/niobuf.c
lustre/ptlrpc/pack_generic.c
lustre/ptlrpc/service.c
lustre/target/tgt_handler.c