kernel - Fix degenerate cluster_write() cases
authorMatthew Dillon <dillon@apollo.backplane.com>
Mon, 30 Apr 2012 22:44:53 +0000 (15:44 -0700)
committerMatthew Dillon <dillon@apollo.backplane.com>
Mon, 30 Apr 2012 22:44:53 +0000 (15:44 -0700)
commitb642a6c1f5bbb295e29522d99c65038f459288ac
tree0c42778b4c6e22ec377003fd088059c627b2a579
parentd32741e0556407b9f17ed6d73a8b682a30ea1da8
kernel - Fix degenerate cluster_write() cases

* cluster_write() should bdwrite() as a fallback, not bawrite().

  Note that cluster_awrite() always bawrite()'s or equivalent.  The
  DragonFly API split the functions out, so cluster_write() can now
  almost always bdwrite() for the non-clustered case.

* Solves some serious performance and real-time disk space usage issues
  when HAMMER1 was updated to use the cluster calls.  The disk space
  would be recovered by the daily cleanup but the extra writes could
  end up being quite excessive, 25:1 unnecessary writes vs necessary
  writes.

Reported-by: multiple, testing by tuxillo
sys/kern/vfs_cluster.c