NFS - Fix BIO size panics
authorMatthew Dillon <dillon@apollo.backplane.com>
Sat, 3 Oct 2009 00:09:13 +0000 (17:09 -0700)
committerMatthew Dillon <dillon@apollo.backplane.com>
Sat, 3 Oct 2009 00:09:13 +0000 (17:09 -0700)
commitb672fc169da19f4fc264f567efbc13f1a349146d
treea149f6c4528bbb0313e67ac0d46f0fa4ef488a50
parent1a8fe9c56129cc3b455d083df141468a3d492ef4
NFS - Fix BIO size panics

* NFS calculates the BIO block size and stores it in mnt_stat.f_iosize.
  This field was getting overwritten with default values by STATFS
  being passing &mp->mnt_stat from the kernel.

  Conditionalize the field so it no longer gets overwritten, and also
  correct nm_rsize/nm_wsize tests to use the smaller of the two
  specifications for the BIO block size.

* Fixes diskless NFS root mounts, and NFS mounts which use smaller
  blocksizes.

Reported-by: Rumko <rumcic@gmail.com>, and others
sys/vfs/nfs/nfs_vfsops.c