HAMMER: Mirroring, misc bug fixes
authorMatthew Dillon <dillon@dragonflybsd.org>
Thu, 31 Jul 2008 04:42:04 +0000 (04:42 +0000)
committerMatthew Dillon <dillon@dragonflybsd.org>
Thu, 31 Jul 2008 04:42:04 +0000 (04:42 +0000)
commit4889cbd4a112d640408111b521aee58156f8a202
tree546014713a6d72b058431b313cbdabec4bc751ed
parent50050193a06a0ffd37ddbff31c14790efe8496ec
HAMMER: Mirroring, misc bug fixes

* Adjust hammer_flusher_async() to queue an extra flush if called twice
  in quick succession.  This fixes the 'sync' command to properly sync
  the entire filesytem.  Previously two syncs were needed.

* Fix a bug where a user application could get stuck due to HAMMER
  losing track of an inode flush.

* Mirroring masters now use the most recent fully committed transaction
  id instead of the last flushed (but still subject to rollback) tid.

  This fixes an issue where a mirror could pass information still subject
  to crash recovery rollback to the slave.  Now only fully committed
  information is passed to the slave.

* Fix a transitory bug where the mirroring code would sometimes not
  sync the correct delete state to the slave.  The slave would always
  be corrected in the next pass, however.  Now the slave is correct
  at all times.

* Fix a bug in hammer_mirror_write() where a delete-to operation could
  livelock.

* Add a new HAMMER ioctl which waits for the committed data transaction
  id to change.  This will be used by the mirroring code to implement
  continuous streaming operation.

Reported-by: Francois Tigeot <ftigeot@wolfpond.org>,
     Michael Neumann <mneumann@crater.dragonflybsd.org>
     (the user application freeze bug)
sys/vfs/hammer/hammer.h
sys/vfs/hammer/hammer_disk.h
sys/vfs/hammer/hammer_flusher.c
sys/vfs/hammer/hammer_inode.c
sys/vfs/hammer/hammer_ioctl.c
sys/vfs/hammer/hammer_ioctl.h
sys/vfs/hammer/hammer_mirror.c
sys/vfs/hammer/hammer_ondisk.c
sys/vfs/hammer/hammer_pfs.c
sys/vfs/hammer/hammer_vfsops.c