kernel - NFS - fix another B_CLUSTEROK / B_NEEDCOMMIT races
authorMatthew Dillon <dillon@apollo.backplane.com>
Fri, 22 Jan 2010 05:09:51 +0000 (21:09 -0800)
committerMatthew Dillon <dillon@apollo.backplane.com>
Fri, 22 Jan 2010 05:09:51 +0000 (21:09 -0800)
commit8ae5c7e01448df9bc6797560538ae7b4b16be6f4
tree4b7dce71bf79dae086de0315e866da38dfd40b19
parent2c3e272fbe28c2dfebedccd28a1c32893e33b297
kernel - NFS - fix another B_CLUSTEROK / B_NEEDCOMMIT races

* nfs_flush_docommit() was not handling the case where B_NEEDCOMMIT
  might get cleared by vfs_busy_pages() due to late detection of
  a modified VM page.

  This appears to be responsible for at least one fsx issue.

* Catch an edge case when clearing the PMAP modify bit in vfs_busy_pages().

* NFS no longer tries to cluster commit operations via the buffer cache's
  cluster code.  nfs_flush_docommit() will still do its own manual
  clustering of commit ops.  The problem with using B_CLUSTEROK is that
  the cluster code will collect bufs together but vfs_busy_pages() might
  have to clear B_NEEDCOMMIT when a late detection of a modified VM
  pages occurs.  This doesn't propagate back to the underlying bufs making
  up the cluster.

  This appears to be responsible for at least one fsx issue too.
sys/kern/vfs_bio.c
sys/vfs/nfs/nfs_bio.c
sys/vfs/nfs/nfs_vnops.c