Whamcloud - gitweb
LU-709 build: Remove last bit of HAVE_GFP_T
[fs/lustre-release.git] / lnet / lnet / acceptor.c
index 26d30e6..5dd52ca 100644 (file)
@@ -28,6 +28,8 @@
 /*
  * Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
  * Use is subject to license terms.
+ *
+ * Copyright (c) 2011, Whamcloud, Inc.
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
@@ -72,7 +74,6 @@ lnet_accept_magic(__u32 magic, __u32 constant)
 #define cfs_mt_wait_for_completion(c) cfs_wait_for_completion(c)
 #define cfs_mt_complete(c)            cfs_complete(c)
 #define cfs_mt_fini_completion(c)     cfs_fini_completion(c)
-#define cfs_create_thread(func, a)    cfs_kernel_thread(func, a, 0)
 
 EXPORT_SYMBOL(lnet_acceptor_port);
 
@@ -113,25 +114,24 @@ lnet_connect_console_error (int rc, lnet_nid_t peer_nid,
         switch (rc) {
         /* "normal" errors */
         case -ECONNREFUSED:
-                CDEBUG(D_NETERROR, "Connection to %s at host %u.%u.%u.%u "
-                       "on port %d was refused: "
-                       "check that Lustre is running on that node.\n",
-                       libcfs_nid2str(peer_nid),
-                       HIPQUAD(peer_ip), peer_port);
+                CNETERR("Connection to %s at host %u.%u.%u.%u on port %d was "
+                        "refused: check that Lustre is running on that node.\n",
+                        libcfs_nid2str(peer_nid),
+                        HIPQUAD(peer_ip), peer_port);
                 break;
         case -EHOSTUNREACH:
         case -ENETUNREACH:
-                CDEBUG(D_NETERROR, "Connection to %s at host %u.%u.%u.%u "
-                       "was unreachable: the network or that node may "
-                       "be down, or Lustre may be misconfigured.\n",
-                       libcfs_nid2str(peer_nid), HIPQUAD(peer_ip));
+                CNETERR("Connection to %s at host %u.%u.%u.%u "
+                        "was unreachable: the network or that node may "
+                        "be down, or Lustre may be misconfigured.\n",
+                        libcfs_nid2str(peer_nid), HIPQUAD(peer_ip));
                 break;
         case -ETIMEDOUT:
-                CDEBUG(D_NETERROR, "Connection to %s at host %u.%u.%u.%u on "
-                       "port %d took too long: that node may be hung "
-                       "or experiencing high load.\n",
-                       libcfs_nid2str(peer_nid),
-                       HIPQUAD(peer_ip), peer_port);
+                CNETERR("Connection to %s at host %u.%u.%u.%u on "
+                        "port %d took too long: that node may be hung "
+                        "or experiencing high load.\n",
+                        libcfs_nid2str(peer_nid),
+                        HIPQUAD(peer_ip), peer_port);
                 break;
         case -ECONNRESET:
                 LCONSOLE_ERROR_MSG(0x11b, "Connection to %s at host %u.%u.%u.%u"
@@ -311,8 +311,6 @@ lnet_accept(cfs_socket_t *sock, __u32 magic)
                         str = "'old' socknal/tcpnal";
                 else if (lnet_accept_magic(magic, LNET_PROTO_RA_MAGIC))
                         str = "'old' ranal";
-                else if (lnet_accept_magic(magic, LNET_PROTO_OPENIB_MAGIC))
-                        str = "'old' openibnal";
                 else
                         str = "unrecognised";
 
@@ -491,7 +489,7 @@ lnet_acceptor(void *arg)
         libcfs_sock_release(lnet_acceptor_state.pta_sock);
         lnet_acceptor_state.pta_sock = NULL;
 
-        LCONSOLE(0, "Acceptor stopping\n");
+        CDEBUG(D_NET, "Acceptor stopping\n");
 
         /* unblock lnet_acceptor_stop() */
         cfs_mt_complete(&lnet_acceptor_state.pta_signal);
@@ -545,7 +543,7 @@ lnet_acceptor_start(void)
         if (lnet_count_acceptor_nis() == 0)  /* not required */
                 return 0;
 
-        rc2 = cfs_create_thread(lnet_acceptor, (void *)(ulong_ptr_t)secure);
+        rc2 = cfs_create_thread(lnet_acceptor, (void *)(ulong_ptr_t)secure, 0);
         if (rc2 < 0) {
                 CERROR("Can't start acceptor thread: %d\n", rc);
                 cfs_mt_fini_completion(&lnet_acceptor_state.pta_signal);