Whamcloud - gitweb
git://git.whamcloud.com
/
fs
/
lustre-release.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
LU-10391 lnet: change tp_nid to 16byte in lnet_test_peer.
[fs/lustre-release.git]
/
lnet
/
lnet
/
lib-move.c
diff --git
a/lnet/lnet/lib-move.c
b/lnet/lnet/lib-move.c
index
3b07768
..
cdd84d6
100644
(file)
--- a/
lnet/lnet/lib-move.c
+++ b/
lnet/lnet/lib-move.c
@@
-190,13
+190,15
@@
void lnet_usr_translate_stats(struct lnet_ioctl_element_msg_stats *msg_stats,
}
int
}
int
-lnet_fail_nid(lnet_nid_t nid, unsigned int threshold)
+lnet_fail_nid(lnet_nid_t nid
4
, unsigned int threshold)
{
struct lnet_test_peer *tp;
struct list_head *el;
struct list_head *next;
{
struct lnet_test_peer *tp;
struct list_head *el;
struct list_head *next;
+ struct lnet_nid nid;
LIST_HEAD(cull);
LIST_HEAD(cull);
+ lnet_nid4_to_nid(nid4, &nid);
/* NB: use lnet_net_lock(0) to serialize operations on test peers */
if (threshold != 0) {
/* Adding a new entry */
/* NB: use lnet_net_lock(0) to serialize operations on test peers */
if (threshold != 0) {
/* Adding a new entry */
@@
-219,8
+221,8
@@
lnet_fail_nid(lnet_nid_t nid, unsigned int threshold)
tp = list_entry(el, struct lnet_test_peer, tp_list);
if (tp->tp_threshold == 0 || /* needs culling anyway */
tp = list_entry(el, struct lnet_test_peer, tp_list);
if (tp->tp_threshold == 0 || /* needs culling anyway */
-
nid == LNET_NID_ANY ||
/* removing all entries */
-
tp->tp_nid == nid) {
/* matched this one */
+
LNET_NID_IS_ANY(&nid) ||
/* removing all entries */
+
nid_same(&tp->tp_nid, &nid)) {
/* matched this one */
list_move(&tp->tp_list, &cull);
}
}
list_move(&tp->tp_list, &cull);
}
}
@@
-237,14
+239,16
@@
lnet_fail_nid(lnet_nid_t nid, unsigned int threshold)
}
static int
}
static int
-fail_peer
(lnet_nid_t nid
, int outgoing)
+fail_peer
(lnet_nid_t nid4
, int outgoing)
{
struct lnet_test_peer *tp;
struct list_head *el;
struct list_head *next;
{
struct lnet_test_peer *tp;
struct list_head *el;
struct list_head *next;
+ struct lnet_nid nid;
LIST_HEAD(cull);
int fail = 0;
LIST_HEAD(cull);
int fail = 0;
+ lnet_nid4_to_nid(nid4, &nid);
/* NB: use lnet_net_lock(0) to serialize operations on test peers */
lnet_net_lock(0);
/* NB: use lnet_net_lock(0) to serialize operations on test peers */
lnet_net_lock(0);
@@
-262,8
+266,8
@@
fail_peer (lnet_nid_t nid, int outgoing)
continue;
}
continue;
}
- if (
tp->tp_nid == LNET_NID_ANY ||
/* fail every peer */
- nid
== tp->tp_nid) {
/* fail this peer */
+ if (
LNET_NID_IS_ANY(&tp->tp_nid) ||
/* fail every peer */
+ nid
_same(&nid, &tp->tp_nid)) {
/* fail this peer */
fail = 1;
if (tp->tp_threshold != LNET_MD_THRESH_INF) {
fail = 1;
if (tp->tp_threshold != LNET_MD_THRESH_INF) {