Commit fe7cb65d authored by John L. Hammond's avatar John L. Hammond Committed by Greg Kroah-Hartman

staging: lustre: remove LUSTRE_{,SRV_}LNET_PID

Remove LUSTRE_LNET_PID (12354) and LUSTRE_SRV_LNET_PID (12345) from
the libcfs headers and replace their uses with a new macro
LNET_PID_LUSTRE (also 12345) in lnet/types.h.
Signed-off-by: default avatarJohn L. Hammond <john.hammond@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-2675
Reviewed-on: http://review.whamcloud.com/11985Reviewed-by: default avatarJames Simmons <uja.ornl@gmail.com>
Reviewed-by: default avatarBob Glossman <bob.glossman@intel.com>
Reviewed-by: default avatarDmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: default avatarAndreas Dilger <andreas.dilger@intel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 09f2f175
......@@ -51,8 +51,6 @@
#define LERRCHKSUM(hexnum) (((hexnum) & 0xf) ^ ((hexnum) >> 4 & 0xf) ^ \
((hexnum) >> 8 & 0xf))
#define LUSTRE_SRV_LNET_PID LUSTRE_LNET_PID
#include <linux/list.h>
/* need both kernel and user-land acceptor */
......
......@@ -118,9 +118,6 @@ do { \
#define CDEBUG_STACK() (0L)
#endif /* __x86_64__ */
/* initial pid */
#define LUSTRE_LNET_PID 12345
#define __current_nesting_level() (0)
/**
......
......@@ -1842,7 +1842,10 @@ ksocknal_query(lnet_ni_t *ni, lnet_nid_t nid, unsigned long *when)
unsigned long now = cfs_time_current();
ksock_peer_t *peer = NULL;
rwlock_t *glock = &ksocknal_data.ksnd_global_lock;
lnet_process_id_t id = {.nid = nid, .pid = LUSTRE_SRV_LNET_PID};
lnet_process_id_t id = {
.nid = nid,
.pid = LNET_PID_LUSTRE,
};
read_lock(glock);
......@@ -2187,7 +2190,7 @@ ksocknal_ctl(lnet_ni_t *ni, unsigned int cmd, void *arg)
case IOC_LIBCFS_ADD_PEER:
id.nid = data->ioc_nid;
id.pid = LUSTRE_SRV_LNET_PID;
id.pid = LNET_PID_LUSTRE;
return ksocknal_add_peer(ni, id,
data->ioc_u32[0], /* IP */
data->ioc_u32[1]); /* port */
......
......@@ -2117,7 +2117,7 @@ static int lnet_ping(lnet_process_id_t id, int timeout_ms,
return -EINVAL;
if (id.pid == LNET_PID_ANY)
id.pid = LUSTRE_SRV_LNET_PID;
id.pid = LNET_PID_LUSTRE;
LIBCFS_ALLOC(info, infosz);
if (!info)
......
......@@ -1407,7 +1407,7 @@ lnet_send(lnet_nid_t src_nid, lnet_msg_t *msg, lnet_nid_t rtr_nid)
msg->msg_target_is_router = 1;
msg->msg_target.nid = lp->lp_nid;
msg->msg_target.pid = LUSTRE_SRV_LNET_PID;
msg->msg_target.pid = LNET_PID_LUSTRE;
}
/* 'lp' is our best choice of peer */
......
......@@ -53,7 +53,7 @@ lnet_configure(void *arg)
mutex_lock(&lnet_config_mutex);
if (!the_lnet.ln_niinit_self) {
rc = LNetNIInit(LUSTRE_SRV_LNET_PID);
rc = LNetNIInit(LNET_PID_LUSTRE);
if (rc >= 0) {
the_lnet.ln_niinit_self = 1;
rc = 0;
......@@ -99,7 +99,7 @@ lnet_dyn_configure(struct libcfs_ioctl_hdr *hdr)
rc = -EINVAL;
goto out_unlock;
}
rc = lnet_dyn_add_ni(LUSTRE_SRV_LNET_PID,
rc = lnet_dyn_add_ni(LNET_PID_LUSTRE,
conf->cfg_config_u.cfg_net.net_intf,
conf->cfg_config_u.cfg_net.net_peer_timeout,
conf->cfg_config_u.cfg_net.net_peer_tx_credits,
......
......@@ -1012,7 +1012,7 @@ lnet_ping_router_locked(lnet_peer_t *rtr)
lnet_handle_md_t mdh;
id.nid = rtr->lp_nid;
id.pid = LUSTRE_SRV_LNET_PID;
id.pid = LNET_PID_LUSTRE;
CDEBUG(D_NET, "Check: %s\n", libcfs_id2str(id));
rtr->lp_ping_notsent = 1;
......
......@@ -1612,7 +1612,7 @@ srpc_startup(void)
srpc_data.rpc_state = SRPC_STATE_NONE;
rc = LNetNIInit(LUSTRE_SRV_LNET_PID);
rc = LNetNIInit(LNET_PID_LUSTRE);
if (rc < 0) {
CERROR("LNetNIInit() has failed: %d\n", rc);
return rc;
......
......@@ -443,7 +443,7 @@ int ptlrpc_uuid_to_peer(struct obd_uuid *uuid,
lnet_nid_t dst_nid;
lnet_nid_t src_nid;
peer->pid = LUSTRE_SRV_LNET_PID;
peer->pid = LNET_PID_LUSTRE;
/* Choose the matching UUID that's closest */
while (lustre_uuid_to_peer(uuid->uuid, &dst_nid, count++) == 0) {
......@@ -513,7 +513,7 @@ static lnet_pid_t ptl_get_pid(void)
{
lnet_pid_t pid;
pid = LUSTRE_SRV_LNET_PID;
pid = LNET_PID_LUSTRE;
return pid;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment