- switch (rc) {
- /* "normal" errors */
- case -ECONNREFUSED:
- CNETERR("Connection to %s at host %pI4h on port %d was "
- "refused: check that Lustre is running on that node.\n",
- libcfs_nid2str(peer_nid), &peer_ip, peer_port);
- break;
- case -EHOSTUNREACH:
- case -ENETUNREACH:
- CNETERR("Connection to %s at host %pI4h "
- "was unreachable: the network or that node may "
- "be down, or Lustre may be misconfigured.\n",
- libcfs_nid2str(peer_nid), &peer_ip);
- break;
- case -ETIMEDOUT:
- CNETERR("Connection to %s at host %pI4h on "
- "port %d took too long: that node may be hung "
- "or experiencing high load.\n",
- libcfs_nid2str(peer_nid), &peer_ip, peer_port);
- break;
- case -ECONNRESET:
- LCONSOLE_ERROR_MSG(0x11b, "Connection to %s at host %pI4h"
- " on port %d was reset: "
- "is it running a compatible version of "
- "Lustre and is %s one of its NIDs?\n",
- libcfs_nid2str(peer_nid), &peer_ip,
- peer_port, libcfs_nid2str(peer_nid));
- break;
- case -EPROTO:
- LCONSOLE_ERROR_MSG(0x11c, "Protocol error connecting to %s at "
- "host %pI4h on port %d: is it running "
- "a compatible version of Lustre?\n",
- libcfs_nid2str(peer_nid), &peer_ip,
- peer_port);
- break;
- case -EADDRINUSE:
- LCONSOLE_ERROR_MSG(0x11d, "No privileged ports available to "
- "connect to %s at host %pI4h on port "
- "%d\n", libcfs_nid2str(peer_nid),
- &peer_ip, peer_port);
- break;
- default:
- LCONSOLE_ERROR_MSG(0x11e, "Unexpected error %d connecting to %s"
- " at host %pI4h on port %d\n", rc,
- libcfs_nid2str(peer_nid),
- &peer_ip, peer_port);
- break;
- }
+ switch (rc) {
+ /* "normal" errors */
+ case -ECONNREFUSED:
+ CNETERR("Connection to %s at host %pISp was refused: check that Lustre is running on that node.\n",
+ libcfs_nid2str(peer_nid), sa);
+ break;
+ case -EHOSTUNREACH:
+ case -ENETUNREACH:
+ CNETERR("Connection to %s at host %pIS was unreachable: the network or that node may be down, or Lustre may be misconfigured.\n",
+ libcfs_nid2str(peer_nid), sa);
+ break;
+ case -ETIMEDOUT:
+ CNETERR("Connection to %s at host %pISp took too long: that node may be hung or experiencing high load.\n",
+ libcfs_nid2str(peer_nid), sa);
+ break;
+ case -ECONNRESET:
+ LCONSOLE_ERROR_MSG(0x11b,
+ "Connection to %s at host %pISp was reset: is it running a compatible version of Lustre and is %s one of its NIDs?\n",
+ libcfs_nid2str(peer_nid), sa,
+ libcfs_nid2str(peer_nid));
+ break;
+ case -EPROTO:
+ LCONSOLE_ERROR_MSG(0x11c,
+ "Protocol error connecting to %s at host %pISp: is it running a compatible version of Lustre?\n",
+ libcfs_nid2str(peer_nid), sa);
+ break;
+ case -EADDRINUSE:
+ LCONSOLE_ERROR_MSG(0x11d,
+ "No privileged ports available to connect to %s at host %pISp\n",
+ libcfs_nid2str(peer_nid), sa);
+ break;
+ default:
+ LCONSOLE_ERROR_MSG(0x11e,
+ "Unexpected error %d connecting to %s at host %pISp\n",
+ rc, libcfs_nid2str(peer_nid), sa);
+ break;
+ }