down(&kibnal_data.kib_listener_signal);
LASSERT (kibnal_data.kib_listener_sock == NULL);
- CDEBUG(D_WARNING, "Listener stopped\n");
+ CWARN("Listener stopped\n");
if (!clear_acceptq)
return;
}
}
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,8)
int
kibnal_listener_procint(ctl_table *table, int write, struct file *filp,
void *buffer, size_t *lenp)
+#else
+int
+kibnal_listener_procint(ctl_table *table, int write, struct file *filp,
+ void *buffer, size_t *lenp, loff_t *ppos)
+#endif
{
int *tunable = (int *)table->data;
int old_val;
tunable == &kibnal_tunables.kib_backlog);
old_val = *tunable;
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,8)
rc = proc_dointvec(table, write, filp, buffer, lenp);
-
+#else
+ rc = proc_dointvec(table, write, filp, buffer, lenp, ppos);
+#endif
if (write &&
(*tunable != old_val ||
kibnal_data.kib_listener_sock == NULL)) {
INIT_LIST_HEAD (&peer->ibp_list); /* not in the peer table yet */
INIT_LIST_HEAD (&peer->ibp_conns);
INIT_LIST_HEAD (&peer->ibp_tx_queue);
+ INIT_LIST_HEAD (&peer->ibp_connd_list); /* not queued for connecting */
peer->ibp_reconnect_time = jiffies;
peer->ibp_reconnect_interval = IBNAL_MIN_RECONNECT_INTERVAL;
LASSERT (peer->ibp_persistence == 0);
LASSERT (!kibnal_peer_active(peer));
LASSERT (peer->ibp_connecting == 0);
+ LASSERT (list_empty (&peer->ibp_connd_list));
LASSERT (list_empty (&peer->ibp_conns));
LASSERT (list_empty (&peer->ibp_tx_queue));
kibnal_get_peer (ptl_nid_t nid)
{
kib_peer_t *peer;
+ unsigned long flags;
- read_lock (&kibnal_data.kib_global_lock);
+ read_lock_irqsave(&kibnal_data.kib_global_lock, flags);
peer = kibnal_find_peer_locked (nid);
if (peer != NULL) /* +1 ref for caller? */
atomic_inc (&peer->ibp_refcount);
- read_unlock (&kibnal_data.kib_global_lock);
+ read_unlock_irqrestore(&kibnal_data.kib_global_lock, flags);
return (peer);
}
{
kib_peer_t *peer;
struct list_head *ptmp;
+ unsigned long flags;
int i;
- read_lock (&kibnal_data.kib_global_lock);
+ read_lock_irqsave(&kibnal_data.kib_global_lock, flags);
for (i = 0; i < kibnal_data.kib_peer_hash_size; i++) {
*portp = peer->ibp_port;
*persistencep = peer->ibp_persistence;
- read_unlock (&kibnal_data.kib_global_lock);
+ read_unlock_irqrestore(&kibnal_data.kib_global_lock,
+ flags);
return (0);
}
}
- read_unlock (&kibnal_data.kib_global_lock);
+ read_unlock_irqrestore(&kibnal_data.kib_global_lock, flags);
return (-ENOENT);
}
struct list_head *ptmp;
kib_conn_t *conn;
struct list_head *ctmp;
+ unsigned long flags;
int i;
- read_lock (&kibnal_data.kib_global_lock);
+ read_lock_irqsave(&kibnal_data.kib_global_lock, flags);
for (i = 0; i < kibnal_data.kib_peer_hash_size; i++) {
list_for_each (ptmp, &kibnal_data.kib_peers[i]) {
conn, conn->ibc_state, conn->ibc_peer->ibp_nid,
atomic_read (&conn->ibc_refcount));
atomic_inc (&conn->ibc_refcount);
- read_unlock (&kibnal_data.kib_global_lock);
+ read_unlock_irqrestore(&kibnal_data.kib_global_lock,
+ flags);
return (conn);
}
}
}
- read_unlock (&kibnal_data.kib_global_lock);
+ read_unlock_irqrestore(&kibnal_data.kib_global_lock, flags);
return (NULL);
}
if (conn->ibc_incarnation == incarnation)
continue;
- CDEBUG(D_NET, "Closing stale conn nid:"LPX64" incarnation:"LPX64"("LPX64")\n",
+ CDEBUG(D_NET, "Closing stale conn %p nid:"LPX64
+ " incarnation:"LPX64"("LPX64")\n", conn,
peer->ibp_nid, conn->ibc_incarnation, incarnation);
count++;