Whamcloud - gitweb
LU-2665 mdc: Keep resend FLocks
[fs/lustre-release.git] / libcfs / libcfs / darwin / darwin-tcpip.c
index f1604af..406eb7e 100644 (file)
@@ -1,6 +1,4 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
+/*
  * GPL HEADER START
  *
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -26,7 +24,7 @@
  * GPL HEADER END
  */
 /*
- * Copyright  2008 Sun Microsystems, Inc. All rights reserved
+ * Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
  * Use is subject to license terms.
  */
 /*
@@ -181,9 +179,9 @@ libcfs_ipif_enumerate (char ***namesp)
         nalloc = 16;    /* first guess at max interfaces */
         toobig = 0;
         for (;;) {
-                if (nalloc * sizeof(*ifr) > CFS_PAGE_SIZE) {
+               if (nalloc * sizeof(*ifr) > PAGE_CACHE_SIZE) {
                         toobig = 1;
-                        nalloc = CFS_PAGE_SIZE/sizeof(*ifr);
+                       nalloc = PAGE_CACHE_SIZE/sizeof(*ifr);
                         CWARN("Too many interfaces: only enumerating first %d\n",
                               nalloc);
                 }
@@ -699,7 +697,7 @@ libcfs_sock_connect (cfs_socket_t **sockp, int *fatal,
         }
 
         *fatal = !(rc == -EADDRNOTAVAIL || rc == -EADDRINUSE);
-        CDEBUG(*fatal ? D_NETERROR : D_NET,
+        CDEBUG_LIMIT(*fatal ? D_NETERROR : D_NET,
                "Error %d connecting %u.%u.%u.%u/%d -> %u.%u.%u.%u/%d\n", rc,
                HIPQUAD(local_ip), local_port, HIPQUAD(peer_ip), peer_port);
 
@@ -823,9 +821,9 @@ libcfs_ipif_enumerate (char ***namesp)
         nalloc = 16;    /* first guess at max interfaces */
         toobig = 0;
         for (;;) {
-                if (nalloc * sizeof(*ifr) > CFS_PAGE_SIZE) {
+               if (nalloc * sizeof(*ifr) > PAGE_CACHE_SIZE) {
                         toobig = 1;
-                        nalloc = CFS_PAGE_SIZE/sizeof(*ifr);
+                       nalloc = PAGE_CACHE_SIZE/sizeof(*ifr);
                         CWARN("Too many interfaces: only enumerating first %d\n",
                               nalloc);
                 }
@@ -1311,8 +1309,7 @@ libcfs_sock_connect (struct socket **sockp, int *fatal,
         if (rc != 0) {
                 CFS_NET_EX;
                 if (rc != EADDRNOTAVAIL && rc != EADDRINUSE)
-                        CDEBUG(D_NETERROR,
-                               "Error %d connecting %u.%u.%u.%u/%d -> %u.%u.%u.%u/%d\n", rc,
+                        CNETERR("Error %d connecting %u.%u.%u.%u/%d -> %u.%u.%u.%u/%d\n", rc,
                                HIPQUAD(local_ip), local_port, HIPQUAD(peer_ip), peer_port);
                 goto out;
         }
@@ -1325,8 +1322,7 @@ libcfs_sock_connect (struct socket **sockp, int *fatal,
                 so->so_error = 0;
                 splx(s);
                 CFS_NET_EX;
-                CDEBUG(D_NETERROR,
-                       "Error %d connecting %u.%u.%u.%u/%d -> %u.%u.%u.%u/%d\n", rc,
+                CNETERR("Error %d connecting %u.%u.%u.%u/%d -> %u.%u.%u.%u/%d\n", rc,
                        HIPQUAD(local_ip), local_port, HIPQUAD(peer_ip), peer_port);
                 goto out;
         }