summaryrefslogtreecommitdiff
path: root/drivers/staging/lustre/lnet/lnet/router.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/staging/lustre/lnet/lnet/router.c')
-rw-r--r--drivers/staging/lustre/lnet/lnet/router.c23
1 files changed, 11 insertions, 12 deletions
diff --git a/drivers/staging/lustre/lnet/lnet/router.c b/drivers/staging/lustre/lnet/lnet/router.c
index 926923a104c5..ac38ad271071 100644
--- a/drivers/staging/lustre/lnet/lnet/router.c
+++ b/drivers/staging/lustre/lnet/lnet/router.c
@@ -22,7 +22,7 @@
*/
#define DEBUG_SUBSYSTEM S_LNET
-#include <linux/lnet/lib-lnet.h>
+#include "../../include/linux/lnet/lib-lnet.h"
#if defined(LNET_ROUTER)
@@ -107,9 +107,9 @@ lnet_peers_start_down(void)
}
void
-lnet_notify_locked(lnet_peer_t *lp, int notifylnd, int alive, cfs_time_t when)
+lnet_notify_locked(lnet_peer_t *lp, int notifylnd, int alive, unsigned long when)
{
- if (cfs_time_before(when, lp->lp_timestamp)) { /* out of date information */
+ if (time_before(when, lp->lp_timestamp)) { /* out of date information */
CDEBUG(D_NET, "Out of date\n");
return;
}
@@ -135,7 +135,7 @@ lnet_notify_locked(lnet_peer_t *lp, int notifylnd, int alive, cfs_time_t when)
CDEBUG(D_NET, "set %s %d\n", libcfs_nid2str(lp->lp_nid), alive);
}
-void
+static void
lnet_ni_notify_locked(lnet_ni_t *ni, lnet_peer_t *lp)
{
int alive;
@@ -273,7 +273,7 @@ static void lnet_shuffle_seed(void)
}
/* NB expects LNET_LOCK held */
-void
+static void
lnet_add_route_to_rnet (lnet_remotenet_t *rnet, lnet_route_t *route)
{
unsigned int len = 0;
@@ -796,7 +796,7 @@ lnet_update_ni_status_locked(void)
timeout = router_ping_timeout +
MAX(live_router_check_interval, dead_router_check_interval);
- now = cfs_time_current_sec();
+ now = get_seconds();
list_for_each_entry(ni, &the_lnet.ln_nis, ni_list) {
if (ni->ni_lnd->lnd_type == LOLND)
continue;
@@ -866,7 +866,6 @@ lnet_create_rc_data_locked(lnet_peer_t *gateway)
if (pi == NULL)
goto out;
- memset(pi, 0, LNET_PINGINFO_SIZE);
for (i = 0; i < LNET_MAX_RTR_NIS; i++) {
pi->pi_ni[i].ns_nid = LNET_NID_ANY;
pi->pi_ni[i].ns_status = LNET_NI_STATUS_INVALID;
@@ -932,7 +931,7 @@ static void
lnet_ping_router_locked (lnet_peer_t *rtr)
{
lnet_rc_data_t *rcd = NULL;
- cfs_time_t now = cfs_time_current();
+ unsigned long now = cfs_time_current();
int secs;
lnet_peer_addref_locked(rtr);
@@ -1498,10 +1497,10 @@ lnet_rtrpools_alloc(int im_a_router)
}
int
-lnet_notify(lnet_ni_t *ni, lnet_nid_t nid, int alive, cfs_time_t when)
+lnet_notify(lnet_ni_t *ni, lnet_nid_t nid, int alive, unsigned long when)
{
struct lnet_peer *lp = NULL;
- cfs_time_t now = cfs_time_current();
+ unsigned long now = cfs_time_current();
int cpt = lnet_cpt_of_nid(nid);
LASSERT (!in_interrupt ());
@@ -1577,7 +1576,7 @@ lnet_get_tunables (void)
#else
int
-lnet_notify (lnet_ni_t *ni, lnet_nid_t nid, int alive, cfs_time_t when)
+lnet_notify (lnet_ni_t *ni, lnet_nid_t nid, int alive, unsigned long when)
{
return -EOPNOTSUPP;
}
@@ -1588,7 +1587,7 @@ lnet_router_checker (void)
static time_t last = 0;
static int running = 0;
- time_t now = cfs_time_current_sec();
+ time_t now = get_seconds();
int interval = now - last;
int rc;
__u64 version;