diff options
author | kris <kris@FreeBSD.org> | 2007-01-30 00:26:04 +0000 |
---|---|---|
committer | kris <kris@FreeBSD.org> | 2007-01-30 00:26:04 +0000 |
commit | 365d5c4ba7faba7e495b6c54a4de4905ea474b2b (patch) | |
tree | b784181e3e99ea8df0bd9888544e1ad2fdeee3ef /sys/nfsclient | |
parent | 1fff60d4b20349a0d5bdf918aab88061a054c7e6 (diff) | |
download | FreeBSD-src-365d5c4ba7faba7e495b6c54a4de4905ea474b2b.zip FreeBSD-src-365d5c4ba7faba7e495b6c54a4de4905ea474b2b.tar.gz |
Instead of always hard-coding the socket type for the nfs root mount as
SOCK_DGRAM (i.e. UDP), respect the value configured earlier. This allows
TCP NFS root mounts using e.g. the boot.nfsroot.options="tcp" tunable.
In this case some of the connection parameters like the retry timer were
previously set appropriately for TCP but inappropriately for the UDP
socket that was actually used, leading to e.g. extremely long recovery
times (O(hours)) after a nfs server reboot.
Reviewed by: mohans
MFC After: 2 weeks
Diffstat (limited to 'sys/nfsclient')
-rw-r--r-- | sys/nfsclient/nfs_vfsops.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/nfsclient/nfs_vfsops.c b/sys/nfsclient/nfs_vfsops.c index e1055ea..aa9d9bb 100644 --- a/sys/nfsclient/nfs_vfsops.c +++ b/sys/nfsclient/nfs_vfsops.c @@ -430,7 +430,7 @@ nfs_mountroot(struct mount *mp, struct thread *td) * Do enough of ifconfig(8) so that the critical net interface can * talk to the server. */ - error = socreate(nd->myif.ifra_addr.sa_family, &so, SOCK_DGRAM, 0, + error = socreate(nd->myif.ifra_addr.sa_family, &so, nd->root_args.sotype, 0, td->td_ucred, td); if (error) panic("nfs_mountroot: socreate(%04x): %d", |