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>
Fri, 30 Mar 2012 01:31:42 +0000 (18:31 -0700)
commit9d4e78c77684f1de021eb8ae17767c210205c3c3
tree9365c5968dc439dbd77ce8584744db1d01704151
parent9adb9c718276bcc360d85724c2cb58fabb1cb21e
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