HAMMER: Mirroring work
authorMatthew Dillon <dillon@dragonflybsd.org>
Thu, 31 Jul 2008 22:30:33 +0000 (22:30 +0000)
committerMatthew Dillon <dillon@dragonflybsd.org>
Thu, 31 Jul 2008 22:30:33 +0000 (22:30 +0000)
commite469566bdb7b27c44c1b3d092f7d780c94ce8f1f
treea52f1bb3306864521dfd043d4328894be44dc2e2
parentdf0a038e16d6c428edc04c4e4ff89a39d02b01e8
HAMMER: Mirroring work

* Fix an invalidation race that can be triggered by the mirroring or
  reblocking code.  The invalidation was being made before the direct IO
  completed rather then after.

* Fix an invalidation race.  hammer_io_inval() was cleaning out any
  pre-existing buffer cache buffer aliases but was not cleaning out the
  VM backing store, resulting in CRC assertions (but no on-media corruption)
  by the mirroring code.

* Change the bulk-record sequencing to avoid adding the record to
  the inode's record list until after the direct-io has been initiated.

* Change the mirror_read code to generate PASS records for deleted records
  whos create_tid is out of bounds, so we do not have to transport the
  data for deleted data records.  This greatly reduces the mirror bandwidth
  needed to mirror deletions.

  The mirror_write code similarly will issue delete_tid updates as
  appropriate when presented with a PASS record.

* Mirror targets no longer strip deleted records which had yet to be created
  on the target.  The record is now created so snapshot state is retained.
sys/vfs/hammer/hammer.h
sys/vfs/hammer/hammer_blockmap.c
sys/vfs/hammer/hammer_btree.c
sys/vfs/hammer/hammer_io.c
sys/vfs/hammer/hammer_mirror.c
sys/vfs/hammer/hammer_object.c
sys/vfs/hammer/hammer_ondisk.c
sys/vfs/hammer/hammer_vnops.c