{
XDR ping_xdr;
struct rpc_msg ping_msg;
+ int rpc_version;
/*
* Non nfs mounts like /afs/glue.umd.edu have ended up here.
} else
plog(XLOG_INFO, "%s: nfs_version: %d", __func__, (int) nfs_version);
- rpc_msg_init(&ping_msg, NFS_PROGRAM, nfs_version, NFSPROC_NULL);
+ /*
+ * There is really no ti-rpc version for NFSv4; most servers respond
+ * with "program unavailable", which is ok since we don't check the
+ * payload, we just care about the pings. Some servers though are
+ * antisocial (Isilon) and don't respond (which is their right to do).
+ * Eventually we should make a new mechanism to do server pings for
+ * NFSv4, but for now it is easiest to downgrade the RPC version to 3.
+ */
+ rpc_version = nfs_version == 4 ? 3 : nfs_version;
+
+ rpc_msg_init(&ping_msg, NFS_PROGRAM, rpc_version, NFSPROC_NULL);
/*
* Create an XDR endpoint
case ENETUNREACH:
case EHOSTDOWN:
case EHOSTUNREACH:
+ dlog("Failed to NFS ping to %s (%d)", fs->fs_host, error);
np->np_ping = MAX_ALLOWED_PINGS; /* immediately down */
np->np_ttl = (time_t) 0;
/*