summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
Diffstat (limited to 'sys')
-rw-r--r--sys/fs/nfsclient/nfs_clvfsops.c13
-rw-r--r--sys/nfsclient/nfs_vfsops.c14
2 files changed, 27 insertions, 0 deletions
diff --git a/sys/fs/nfsclient/nfs_clvfsops.c b/sys/fs/nfsclient/nfs_clvfsops.c
index e882d00..ce128af 100644
--- a/sys/fs/nfsclient/nfs_clvfsops.c
+++ b/sys/fs/nfsclient/nfs_clvfsops.c
@@ -999,6 +999,19 @@ nfs_mount(struct mount *mp)
error = EIO;
goto out;
}
+
+ /*
+ * If a change from TCP->UDP is done and there are thread(s)
+ * that have I/O RPC(s) in progress with a tranfer size
+ * greater than NFS_MAXDGRAMDATA, those thread(s) will be
+ * hung, retrying the RPC(s) forever. Usually these threads
+ * will be seen doing an uninterruptible sleep on wait channel
+ * "newnfsreq" (truncated to "newnfsre" by procstat).
+ */
+ if (args.sotype == SOCK_DGRAM && nmp->nm_sotype == SOCK_STREAM)
+ tprintf(td->td_proc, LOG_WARNING,
+ "Warning: mount -u that changes TCP->UDP can result in hung threads\n");
+
/*
* When doing an update, we can't change version,
* security, switch lockd strategies or change cookie
diff --git a/sys/nfsclient/nfs_vfsops.c b/sys/nfsclient/nfs_vfsops.c
index 82891f9..58384e8 100644
--- a/sys/nfsclient/nfs_vfsops.c
+++ b/sys/nfsclient/nfs_vfsops.c
@@ -56,6 +56,7 @@ __FBSDID("$FreeBSD$");
#include <sys/socketvar.h>
#include <sys/sockio.h>
#include <sys/sysctl.h>
+#include <sys/syslog.h>
#include <sys/vnode.h>
#include <sys/signalvar.h>
@@ -1116,6 +1117,19 @@ nfs_mount(struct mount *mp)
error = EIO;
goto out;
}
+
+ /*
+ * If a change from TCP->UDP is done and there are thread(s)
+ * that have I/O RPC(s) in progress with a tranfer size
+ * greater than NFS_MAXDGRAMDATA, those thread(s) will be
+ * hung, retrying the RPC(s) forever. Usually these threads
+ * will be seen doing an uninterruptible sleep on wait channel
+ * "newnfsreq" (truncated to "newnfsre" by procstat).
+ */
+ if (args.sotype == SOCK_DGRAM && nmp->nm_sotype == SOCK_STREAM)
+ tprintf(curthread->td_proc, LOG_WARNING,
+ "Warning: mount -u that changes TCP->UDP can result in hung threads\n");
+
/*
* When doing an update, we can't change from or to
* v3, switch lockd strategies or change cookie translation
OpenPOWER on IntegriCloud