NFS - Fix numerous issues with NFS root mounts, primarily for vkernels
authorMatthew Dillon <dillon@apollo.backplane.com>
Sat, 10 Oct 2009 00:56:34 +0000 (17:56 -0700)
committerMatthew Dillon <dillon@apollo.backplane.com>
Sat, 10 Oct 2009 00:56:34 +0000 (17:56 -0700)
commitb9a7a2bd9ad2f9f23579d9721b65ab0daecd7486
tree95915020a8c728a40f12ac2400f251e357e9cc6a
parentb58aa6d01fe6dcb712c52b8e3bab9c88e7f59a88
NFS - Fix numerous issues with NFS root mounts, primarily for vkernels

vkernels do not inherit BOOTP data from PXE and because of this a number
of code paths are run which are not run in non-vkernel NFS mounts.

* Fix a kernel memory check that was failing for vkernels and causing a
  panic.

* Change the default BOOTP socket type from UDP to TCP.

* Adjust the default vfs.nfs.maxasyncbio value based on available mbuf
  clusters.  The value will be adjusted down for systems with small
  memory footprints.

  Otherwise NFS can trivially run the system out of mbufs.

* Fix bugs in the NFS BIO queueing code related to values of
  vfs.nfs.maxasyncbio lower then the maximum.

* Remove the BOOTP_NFSV3 option when probing for the type of NFS mount
  (V2 or V3).  The BOOTP_NFSV3 kernel option is no longer required for
  root mounts to default to NFSv3.

  This also works around a bug related to large write()s with NFSv2 which
  has not yet been found.

Reported-by: Rumko <rumcic@gmail.com>
sys/vfs/nfs/bootp_subr.c
sys/vfs/nfs/nfs_iod.c
sys/vfs/nfs/nfs_mountrpc.c
sys/vfs/nfs/nfs_socket.c
sys/vfs/nfs/nfs_subs.c
sys/vfs/nfs/nfsmountrpc.h
sys/vm/pmap.h