git: HAMMER VFS - REDO implementation base code part 4/many

Matthew Dillon dillon at
Thu Jan 14 20:07:49 PST 2010

commit eddadaee1e95dc7f038f9847210734017a7d08a3
Author: Matthew Dillon <dillon at>
Date:   Tue Jan 12 16:01:00 2010 -0800

    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.

Summary of changes:
 sys/vfs/hammer/hammer.h         |    7 +++-
 sys/vfs/hammer/hammer_flusher.c |   13 +++++--
 sys/vfs/hammer/hammer_io.c      |   67 +++++++++++++++++++++++++++++++++-----
 sys/vfs/hammer/hammer_recover.c |    8 ++---
 sys/vfs/hammer/hammer_vfsops.c  |    1 +
 5 files changed, 76 insertions(+), 20 deletions(-)

DragonFly BSD source repository

More information about the Commits mailing list