dur = (cfs_duration_t)cfs_time_sub(crpc->crp_stamp,
(cfs_time_t)console_session.ses_id.ses_stamp);
- cfs_duration_usec(dur, &tv);
+ jiffies_to_timeval(dur, &tv);
if (copy_to_user(&ent->rpe_peer,
- &nd->nd_id, sizeof(lnet_process_id_t)) ||
+ &nd->nd_id, sizeof(struct lnet_process_id)) ||
copy_to_user(&ent->rpe_stamp, &tv, sizeof(tv)) ||
copy_to_user(&ent->rpe_state,
&nd->nd_state, sizeof(nd->nd_state)) ||
return 0;
}
-static lnet_process_id_packed_t *
+static struct lnet_process_id_packed *
lstcon_next_id(int idx, int nkiov, lnet_kiov_t *kiov)
{
- lnet_process_id_packed_t *pid;
+ struct lnet_process_id_packed *pid;
int i;
i = idx / SFW_ID_PER_PAGE;
LASSERT (i < nkiov);
- pid = (lnet_process_id_packed_t *)page_address(kiov[i].kiov_page);
+ pid = (struct lnet_process_id_packed *)page_address(kiov[i].kiov_page);
return &pid[idx % SFW_ID_PER_PAGE];
}
lstcon_dstnodes_prep(lstcon_group_t *grp, int idx,
int dist, int span, int nkiov, lnet_kiov_t *kiov)
{
- lnet_process_id_packed_t *pid;
+ struct lnet_process_id_packed *pid;
lstcon_ndlink_t *ndl;
lstcon_node_t *nd;
int start;
npg = sfw_id_pages(test->tes_span);
nob = (feats & LST_FEAT_BULK_LEN) == 0 ?
npg * PAGE_SIZE :
- sizeof(lnet_process_id_packed_t) * test->tes_span;
+ sizeof(struct lnet_process_id_packed) * test->tes_span;
}
rc = lstcon_rpc_prep(nd, SRPC_SERVICE_TEST, feats, npg, nob, crpc);
srpc_debug_reqst_t *drq;
lstcon_ndlink_t *ndl;
lstcon_node_t *nd;
- time_t intv;
+ int intv;
int count = 0;
int rc;
return;
}
- if (!console_session.ses_expired &&
- cfs_time_current_sec() - console_session.ses_laststamp >
- (time_t)console_session.ses_timeout)
- console_session.ses_expired = 1;
+ if (!console_session.ses_expired &&
+ ktime_get_real_seconds() - console_session.ses_laststamp >
+ (time64_t)console_session.ses_timeout)
+ console_session.ses_expired = 1;
trans = console_session.ses_ping;
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,
CDEBUG(D_NET, "Ping %d nodes in session\n", count);
- ptimer->stt_expires = (cfs_time_t)(cfs_time_current_sec() + LST_PING_INTERVAL);
- stt_add_timer(ptimer);
+ ptimer->stt_expires = ktime_get_real_seconds() + LST_PING_INTERVAL;
+ stt_add_timer(ptimer);
mutex_unlock(&console_session.ses_mutex);
}
return rc;
}
- ptimer = &console_session.ses_ping_timer;
- ptimer->stt_expires = (cfs_time_t)(cfs_time_current_sec() + LST_PING_INTERVAL);
+ ptimer = &console_session.ses_ping_timer;
+ ptimer->stt_expires = ktime_get_real_seconds() + LST_PING_INTERVAL;
- stt_add_timer(ptimer);
+ stt_add_timer(ptimer);
return 0;
}