summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
9ea9c66)
The lustre selftest code has multiple time stamps that are kept
as 'time_t' or 'unsigned long' and can therefore overflow on
32-bit systems.
This changes the code to use time64_t instead.
Linux-commit:
d9f79e6bf02c109f117132163239bfffa6475ccb
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Change-Id: I74d704d104e7398af411e73180fac57c0b943eb7
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/23352
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>
int brw_inject_one_error(void)
{
int brw_inject_one_error(void)
{
if (brw_inject_errors <= 0) return 0;
if (brw_inject_errors <= 0) return 0;
- if ((tv.tv_usec & 1) == 0) return 0;
+ if (((ts.tv_nsec / NSEC_PER_USEC) & 1) == 0)
+ return 0;
return brw_inject_errors--;
}
return brw_inject_errors--;
}
srpc_debug_reqst_t *drq;
lstcon_ndlink_t *ndl;
lstcon_node_t *nd;
srpc_debug_reqst_t *drq;
lstcon_ndlink_t *ndl;
lstcon_node_t *nd;
if (nd->nd_state != LST_NODE_ACTIVE)
continue;
if (nd->nd_state != LST_NODE_ACTIVE)
continue;
- intv = cfs_duration_sec(cfs_time_sub(cfs_time_current(),
- nd->nd_stamp));
- if (intv < (time_t)nd->nd_timeout / 2)
+ intv = cfs_duration_sec(jiffies - nd->nd_stamp);
+ if (intv < nd->nd_timeout / 2)
continue;
rc = lstcon_rpc_init(nd, SRPC_SERVICE_DEBUG,
continue;
rc = lstcon_rpc_init(nd, SRPC_SERVICE_DEBUG,
LASSERT (!sn->sn_timer_active);
sn->sn_timer_active = 1;
LASSERT (!sn->sn_timer_active);
sn->sn_timer_active = 1;
- timer->stt_expires = cfs_time_add(sn->sn_timeout,
- ktime_get_real_seconds());
+ timer->stt_expires = ktime_get_real_seconds()+ sn->sn_timeout;
stt_add_timer(timer);
return;
}
stt_add_timer(timer);
return;
}
INIT_LIST_HEAD(&timer->stt_list);
timer->stt_data = rpc;
timer->stt_func = srpc_client_rpc_expired;
INIT_LIST_HEAD(&timer->stt_list);
timer->stt_data = rpc;
timer->stt_func = srpc_client_rpc_expired;
- timer->stt_expires = cfs_time_add(rpc->crpc_timeout,
- ktime_get_real_seconds());
+ timer->stt_expires = ktime_get_real_seconds() + rpc->crpc_timeout;
stt_add_timer(timer);
return;
}
stt_add_timer(timer);
return;
}
LASSERT(!stt_data.stt_shuttingdown);
LASSERT(timer->stt_func != NULL);
LASSERT(list_empty(&timer->stt_list));
LASSERT(!stt_data.stt_shuttingdown);
LASSERT(timer->stt_func != NULL);
LASSERT(list_empty(&timer->stt_list));
- LASSERT(cfs_time_after(timer->stt_expires, ktime_get_real_seconds()));
+ LASSERT(timer->stt_expires > ktime_get_real_seconds());
/* a simple insertion sort */
list_for_each_prev(pos, STTIMER_SLOT(timer->stt_expires)) {
stt_timer_t *old = list_entry(pos, stt_timer_t, stt_list);
/* a simple insertion sort */
list_for_each_prev(pos, STTIMER_SLOT(timer->stt_expires)) {
stt_timer_t *old = list_entry(pos, stt_timer_t, stt_list);
- if (cfs_time_aftereq(timer->stt_expires, old->stt_expires))
+ if (timer->stt_expires >= old->stt_expires)
break;
}
list_add(&timer->stt_list, pos);
break;
}
list_add(&timer->stt_list, pos);
while (!list_empty(slot)) {
timer = list_entry(slot->next, stt_timer_t, stt_list);
while (!list_empty(slot)) {
timer = list_entry(slot->next, stt_timer_t, stt_list);
- if (cfs_time_after(timer->stt_expires, now))
+ if (timer->stt_expires > now)
break;
list_del_init(&timer->stt_list);
break;
list_del_init(&timer->stt_list);