HAMMER VFS - REDO implementation base code part 4/many
authorMatthew Dillon <dillon@apollo.backplane.com>
Wed, 13 Jan 2010 00:01:00 +0000 (16:01 -0800)
committerMatthew Dillon <dillon@apollo.backplane.com>
Wed, 13 Jan 2010 00:46:12 +0000 (16:46 -0800)
commiteddadaee1e95dc7f038f9847210734017a7d08a3
treea9d851fd72d072fdfb24fbf15d4d9154619e7ee7
parent91ed3855cd224e2fb87282438fba838403114116
HAMMER VFS - REDO implementation base code part 4/many

* Wait for BIOs to finish before issuing the media sync.  Previously we
  were issuing the media sync concurrently which worked only because
  the operation was serialized by the disk driver.

  This change has no effect on performance.

* For fsync mode 3 wait for BIOs to finish so the data is guaranteed
  to at least be in the drive cache.

* Collapse hammer_io_wait_firm() into hammer_io_wait_all()

* Pipeline hammer_io_wait_all().  Instead of waiting for the running_io
  count to hit 0, which can cause us to wait longer then necessary when
  multiple entities are dirtying buffers, we now place all running I/Os
  on a list along with a dummy entry for the waiter.  When the dummy entry
  becomes the head of the list the waiter returns.

  This way new I/O's initiated during the wait do not contribute to
  the wait.

  In particular this will improve fsync() operations which can flush the
  UNDO/REDO FIFO in parallel with a full meta-data flush.
sys/vfs/hammer/hammer.h
sys/vfs/hammer/hammer_flusher.c
sys/vfs/hammer/hammer_io.c
sys/vfs/hammer/hammer_recover.c
sys/vfs/hammer/hammer_vfsops.c