hammer2 - Optimize out read I/O on new allocations
authorMatthew Dillon <dillon@apollo.backplane.com>
Sun, 15 Mar 2015 06:26:59 +0000 (23:26 -0700)
committerMatthew Dillon <dillon@apollo.backplane.com>
Sun, 15 Mar 2015 06:26:59 +0000 (23:26 -0700)
commit7100800184765247152118d28d0a45c4e71e13b5
tree2e2894b854d2b9f9598400bcb3082bc8e167a286
parentd157d4dc34bc87ae70888ac92a8fbf1ea662eabd
hammer2 - Optimize out read I/O on new allocations

* Fix a regression.  When DIO went strictly to 64KB blocks,
  hammer2_devblksize() did not follow suit.  This resulted it
  unnecessary read-before-write I/Os on smaller blocks allocated from
  fresh full-block freemap areas.

  This fix effectively removes almost all read I/O when writing fresh files
  to HAMMER2 filesystem, or copying from data already cached into the
  HAMMER2 filesystem.

* Allow inodes to be locked without having to load the related meta-data.
  This removes unnecessary read I/Os when reclaiming old vnodes from the
  vnode cache (whos inodes might no longer be in the buffer cache or the
  VM page cache).  Removes unnecessary reads during a umount and during
  normal vnode recyclement once system caches have reached steady-state.

  This change involved flagging the nlinks == 0 inode state in the chain
  flags so the inode meta-data does not have to be read.
sys/vfs/hammer2/hammer2.h
sys/vfs/hammer2/hammer2_cluster.c
sys/vfs/hammer2/hammer2_inode.c
sys/vfs/hammer2/hammer2_vnops.c