Give the VFS initialisation functions an update:
authorHiten Pandya <hmp@dragonflybsd.org>
Tue, 16 Mar 2004 18:42:35 +0000 (18:42 +0000)
committerHiten Pandya <hmp@dragonflybsd.org>
Tue, 16 Mar 2004 18:42:35 +0000 (18:42 +0000)
commit0041cddb7d1c26ebbc8e96e5f1fbf1b4f80f06e5
treef2fe83109ca1fd19eb45466219be32e4b728fbd9
parentf08b83b9f4fe2898ed661eef1e344364a501ceab
Give the VFS initialisation functions an update:

* Use a better fix for revision 1.3 of vfs_init.c (ours).
  I have integrated the change from FreeBSD's vfs_init.c
  revision 1.59.  Serious issues are fixed with this
  change and a much more cleaner way of handling disappearing
  VFS operation vectors.  At least vfs_opv_numops are
  allocated and recycled as appropriate.  The number of
  pre-allocated vfs_opv_numops can be changed at boot time
  by a tunable.  $FreeBSD$ ID tag updated accordingly.

  NOTE: this *removes* the temporary fix committed my dillon@
  a few days ago, by giving it a more cleaner solution.

* Use M_VNODE instead of M_TEMP for storing VFS buffers and
  vectors.

* Document the functions in this file to make it easier
  for file system implementors.

* Cleanup unused variables in vfs_add_vnops().

* Use M_ZERO instead of malloc+bzero.

* Do not panic when a VFS operation is not available,
  instead return EOPNOTSUPP.  This is better because
  the error value can be passed up by the system calls
  instead of giving an obscure panic about unavailable
  VFS operation.  One can run into this when a VFS op
  call is made when no filesystem supports that
  particular op.  A similar change was made by Peter
  Wemm in FreeBSD's sys/kern/vfs_init.c.

* Better document the various stages of vfs_opv_recalc().

Note, our value of the minimum number of available VFS operation
vectors is `96' at the moment, since a few tests show that the
previous code initialised to values of between 53-60.  The default
probably can be tuned a little bit better; although tunable access
is available at boot to `vfs.opv_numops'.

Reviewed by: Matt Dillon
sys/kern/vfs_init.c