]> git.karo-electronics.de Git - linux-beck.git/commitdiff
staging: lustre: remove LUSTRE_{,SRV_}LNET_PID
authorJohn L. Hammond <john.hammond@intel.com>
Mon, 22 Feb 2016 22:29:07 +0000 (17:29 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 23 Feb 2016 02:05:49 +0000 (18:05 -0800)
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: John L. Hammond <john.hammond@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-2675
Reviewed-on: http://review.whamcloud.com/11985
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/lustre/include/linux/libcfs/libcfs.h
drivers/staging/lustre/include/linux/libcfs/linux/libcfs.h
drivers/staging/lustre/lnet/klnds/socklnd/socklnd.c
drivers/staging/lustre/lnet/lnet/api-ni.c
drivers/staging/lustre/lnet/lnet/lib-move.c
drivers/staging/lustre/lnet/lnet/module.c
drivers/staging/lustre/lnet/lnet/router.c
drivers/staging/lustre/lnet/selftest/rpc.c
drivers/staging/lustre/lustre/ptlrpc/events.c

index dc9b88f2f9779a98c0545ac7219a5501cdf23ae8..5c598c8dbfb5fce0ec4f26087c108b178c685e74 100644 (file)
@@ -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 */
index aac59008ad1ab5444497bffb8646857ef0a922bb..d94b2661658a648027f2d6952da38f00359ef509 100644 (file)
@@ -118,9 +118,6 @@ do {                                                                    \
 #define CDEBUG_STACK() (0L)
 #endif /* __x86_64__ */
 
-/* initial pid  */
-#define LUSTRE_LNET_PID          12345
-
 #define __current_nesting_level() (0)
 
 /**
index 49d716d6e98329dd682f258578de837a857f561a..854814ca60ccc00eb3910bc3818bb0ba854db547 100644 (file)
@@ -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 */
index 7583ae4f5ec1f66850b699ab86442a15b7bd866c..3bed4c31b05bbd3ef9d91a5d683cc2ac44dca9ab 100644 (file)
@@ -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)
index f2b1116e9dd9bfdbe0a93a201ed99e81c733cd32..a342ce0b85e0d71966ed6d4bf4b918c2fc5c4baf 100644 (file)
@@ -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 */
index e9b1e697f15a608a450c4d543bd52226e1acb306..8f053d75e577561482060ac9d888dbb457b9ee9d 100644 (file)
@@ -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,
index 7e7afc4b029b417c66e84413667e8ad452bb01a6..d748931ba68dfd1b5d3c304d759e52e9fd2a9243 100644 (file)
@@ -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;
index f95fd9b323333865991880b8ad4aad5b2f58930b..4213198d89417245efd94c3b791f6f60fa438961 100644 (file)
@@ -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;
index 64eaa0e85c3c52af0a54b82c949dad2efda3b8e2..ffceba5df543d897de265548a5083138a7bec700 100644 (file)
@@ -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;
 }