kernel - Cluster fixes + Enable clustering for HAMMER1
authorMatthew Dillon <dillon@apollo.backplane.com>
Thu, 22 Mar 2012 23:45:55 +0000 (16:45 -0700)
committerMatthew Dillon <dillon@apollo.backplane.com>
Thu, 22 Mar 2012 23:45:55 +0000 (16:45 -0700)
commit9de13b88006e48f96c997b0ed454a1ec9971ecd7
treea72e897130aedbf449a2271717a036cd18a4a5e2
parent0e0fd600f4c75d4dc8a6d605ba9edc960d4f205e
kernel - Cluster fixes + Enable clustering for HAMMER1

* Add cluster_awrite(), which replaces vfs_bio_awrite() and has the same
  basic semantics as bawrite().

* Remove vfs_bio_awrite(), which had an odd API that required the buffer
  to be locked but not removed from its queues.

* Make cluster operations work on disk device buffers as well as on
  regular files.

* Add a blkflags argument to getcacheblk(), allowing GETBLK_NOWAIT to
  be passed to it.

* Enhance cluster_wbuild() to support cluster_awrite() by having it take
  an optional bp to incorporate into the cluster.  The caller disposes of
  the bp by calling bawrite() if the cluster_wbuild() code could not use it.

* Certain adjustments to cluster_write() and related code in checking against
  the file EOF to not break when variable block sizes are used.

* Fix a bug in calls made to buf_checkwrite().  The caller is required to
  initiate the I/O if the function returns good (0).  HAMMER1 uses this
  save side effects and blows up if the I/O is then not initiated.

* Enable clustering in HAMMER1 for both data and meta-data.
sys/kern/vfs_bio.c
sys/kern/vfs_cluster.c
sys/kern/vfs_subr.c
sys/sys/buf.h
sys/vfs/hammer/hammer_io.c
sys/vfs/hammer/hammer_vnops.c
sys/vfs/tmpfs/tmpfs_vnops.c