return nfs_append_addr_option(sap, salen, mi->options);
}
-/*
- * Distinguish between permanent and temporary errors.
- *
- * Returns 0 if the passed-in error is temporary, thus the
- * mount system call should be retried; returns one if the
- * passed-in error is permanent, thus the mount system call
- * should not be retried.
- */
-static int nfs_is_permanent_error(int error)
-{
- switch (error) {
- case ESTALE:
- case ETIMEDOUT:
- case ECONNREFUSED:
- return 0; /* temporary */
- default:
- return 1; /* permanent */
- }
-}
-
/*
* Get NFS/mnt server addresses from mount options
*
return nfs_try_nfs23mount(mi);
}
+/*
+ * Distinguish between permanent and temporary errors.
+ *
+ * Basically, we retry if communication with the server has
+ * failed so far, but fail immediately if there is a local
+ * error (like a bad mount option).
+ *
+ * ESTALE is also a temporary error because some servers
+ * return ESTALE when a share is temporarily offline.
+ *
+ * Returns 1 if we should fail immediately, or 0 if we
+ * should retry.
+ */
+static int nfs_is_permanent_error(int error)
+{
+ switch (error) {
+ case ESTALE:
+ case ETIMEDOUT:
+ case ECONNREFUSED:
+ return 0; /* temporary */
+ default:
+ return 1; /* permanent */
+ }
+}
+
/*
* Handle "foreground" NFS mounts.
*