When a "mount -u" switches an NFS mount point from TCP to UDP,
any thread doing an I/O RPC with a transfer size greater than NFS_UDPMAXDATA will be hung indefinitely, retrying the RPC. After a discussion on freebsd-fs@, I decided to add a warning message for this case, as suggested by Jeremy Chadwick. Suggested by: freebsd at jdc.parodius.com (Jeremy Chadwick) MFC after: 2 weeks
This commit is contained in:
parent
a8122d16b5
commit
87b633678b
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=230803
@ -999,6 +999,19 @@ nfs_mount(struct mount *mp)
|
|||||||
error = EIO;
|
error = EIO;
|
||||||
goto out;
|
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,
|
* When doing an update, we can't change version,
|
||||||
* security, switch lockd strategies or change cookie
|
* security, switch lockd strategies or change cookie
|
||||||
|
@ -56,6 +56,7 @@ __FBSDID("$FreeBSD$");
|
|||||||
#include <sys/socketvar.h>
|
#include <sys/socketvar.h>
|
||||||
#include <sys/sockio.h>
|
#include <sys/sockio.h>
|
||||||
#include <sys/sysctl.h>
|
#include <sys/sysctl.h>
|
||||||
|
#include <sys/syslog.h>
|
||||||
#include <sys/vnode.h>
|
#include <sys/vnode.h>
|
||||||
#include <sys/signalvar.h>
|
#include <sys/signalvar.h>
|
||||||
|
|
||||||
@ -1116,6 +1117,19 @@ nfs_mount(struct mount *mp)
|
|||||||
error = EIO;
|
error = EIO;
|
||||||
goto out;
|
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
|
* When doing an update, we can't change from or to
|
||||||
* v3, switch lockd strategies or change cookie translation
|
* v3, switch lockd strategies or change cookie translation
|
||||||
|
Loading…
Reference in New Issue
Block a user