ENTRY;
if (lock->l_conn_export == NULL) {
- static cfs_time_t next_dump = 0, last_dump = 0;
+ static time64_t next_dump, last_dump;
LDLM_ERROR(lock, "lock timed out (enqueued at %lld, %llds ago); "
"not entering recovery in server code, just going back to sleep",
(s64)lock->l_last_activity,
(s64)(ktime_get_real_seconds() -
lock->l_last_activity));
- if (cfs_time_after(cfs_time_current(), next_dump)) {
+ if (ktime_get_seconds() > next_dump) {
last_dump = next_dump;
- next_dump = cfs_time_shift(300);
+ next_dump = ktime_get_seconds() + 300;
ldlm_namespace_dump(D_DLMTRACE,
ldlm_lock_to_ns(lock));
if (last_dump == 0)
/* We use the same basis for both server side and client side functions
from a single node. */
-static unsigned int ldlm_cp_timeout(struct ldlm_lock *lock)
+static time64_t ldlm_cp_timeout(struct ldlm_lock *lock)
{
- unsigned int timeout;
+ time64_t timeout;
if (AT_OFF)
return obd_timeout;
* lock from another client. Server will evict the other client if it
* doesn't respond reasonably, and then give us the lock. */
timeout = at_get(ldlm_lock_to_ns_at(lock));
- return max(3 * timeout, ldlm_enqueue_min);
+ return max(3 * timeout, (time64_t) ldlm_enqueue_min);
}
/**
struct obd_device *obd;
struct obd_import *imp = NULL;
struct l_wait_info lwi;
- __u32 timeout;
+ time64_t timeout;
int rc = 0;
ENTRY;
timeout = ldlm_cp_timeout(lock);
lwd.lwd_lock = lock;
- lock->l_last_activity = cfs_time_current_sec();
+ lock->l_last_activity = ktime_get_real_seconds();
if (ldlm_is_no_timeout(lock)) {
LDLM_DEBUG(lock, "waiting indefinitely because of NO_TIMEOUT");
lock->l_export = NULL;
lock->l_blocking_ast = einfo->ei_cb_bl;
lock->l_flags |= (*flags & (LDLM_FL_NO_LRU | LDLM_FL_EXCL));
- lock->l_last_activity = cfs_time_current_sec();
+ lock->l_last_activity = ktime_get_real_seconds();
/* lock not sent to server yet */
if (reqp == NULL || *reqp == NULL) {