kernel - Fix NFS client & server bugs
authorMatthew Dillon <dillon@apollo.backplane.com>
Mon, 18 Oct 2010 04:48:47 +0000 (21:48 -0700)
committerMatthew Dillon <dillon@apollo.backplane.com>
Mon, 18 Oct 2010 05:17:22 +0000 (22:17 -0700)
commit5e6f1ca5638786e461bf6ef12bbce88f52fdabb1
tree470b990a383b750ef69e7bc0d2cca7ff268e4621
parentdb1f2f6ee7235850deec730b827aff71e2b15e21
kernel - Fix NFS client & server bugs

* A very long standing bug in the server cache was finally whacked.  The
  write-gather code was improperly returning the wrong mbuf for the server
  to reply with, causing client stalls.  This behavior depends on the client
  doing burst asynchronous writes.  Newer releases of DragonFly do burst
  asynchronous writes but older ones tended not to.

* The server cache was not MPSAFE.  Add a MP token to fix that.

* Remove critical sectons from the server cache which are no longer needed.

* Fix a potential client-side rpc request race where a request's
  NEEDSXMIT flag is not set until after the request possibly blocks,
  which can lead to issues if another thread picks up the request
  and then believes that it has already been transmitted when it
  has not.

* Document a big problem with NFSv2 and HAMMER-served directories.  NFSv2
  only has 32-bit directory cookies.  It is possible to work around the
  problem by using rdirplus (which is the default now).  However, some
  servers may not be able to handle rdirplus with a NFSv2 mount.

  Users who need to serve out NFSv2 cannot serve HAMMER directories
  with NFSv2 unless the clients support rdirplus.

  Our defaults are NFSv3 and rdirplus and NFSv3 does NOT have this problem.

Reported-by: Thomas Nikolajsen <thomas.nikolajsen@mail.dk>
sys/vfs/nfs/nfs_bio.c
sys/vfs/nfs/nfs_serv.c
sys/vfs/nfs/nfs_socket.c
sys/vfs/nfs/nfs_srvcache.c
sys/vfs/nfs/nfs_vfsops.c
sys/vfs/nfs/nfs_vnops.c