NFS - Fix BIO size panics
commit91d4f22fdadc39c24db6782857a820bb2a89e4d3
authorMatthew Dillon <dillon@apollo.backplane.com>
Sat, 3 Oct 2009 00:09:13 +0000 (2 17:09 -0700)
committerMatthew Dillon <dillon@apollo.backplane.com>
Sat, 3 Oct 2009 00:18:01 +0000 (2 17:18 -0700)
tree2ba2e1a1baf61fc49efac835b397e46577e32309
parenta735296cc61212d12c2b1c6bd5fa14d19f0f7918
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