git: hammer2 hammer2 - clean-up the chain code, first cut at the read/write/strategy code

Matthew Dillon dillon at crater.dragonflybsd.org
Tue Feb 14 00:16:29 PST 2012


commit db71f61f5db17f6d05af98faa727853dea4aaf87
Author: Matthew Dillon <dillon at apollo.backplane.com>
Date:   Tue Feb 14 00:11:59 2012 -0800

    hammer2 - clean-up the chain code, first cut at the read/write/strategy code
    
    * Do a major cleanup of the hammer2_chain handling code.
    
      We no longer kmalloc() a local copy when a chain element is modified.
    
      Instead we differentiate elements whos data is embedded (volume header,
      inodes) vs elements whos data is mapped to a buffer cache buffer (indirect
      blocks and data).
    
      Elements with embedded data simply leave the data pointer pointing at the
      embedded data as before.
    
      Elements without embedded data instantiate the newly allocated
      copy-on-write buffer cache buffer and bcopy() the data from the old
      buffer to the new buffer, replacing chain->bp and the chain->data pointer.
      The new bp is dirtied.
    
      The modified data no longer needs to be retained when the chain elmeent
      is released, we bdwrite() the bp and thus can reinstantiate the modified
      data at any time in the future.  This also allows the system to flush
      the modified data out.
    
    * Implement hammer2_vop_read(), hammer2_vop_write(), and
      hammer2_vop_strategy().
    
      Currently untested (files cannot be created yet), but fairly
      straight-forward.  Definitely also not optimized yet.

Summary of changes:
 sys/vfs/hammer2/CHANGES         |   10 +
 sys/vfs/hammer2/hammer2_chain.c |  367 ++++++++++++++----------------------
 sys/vfs/hammer2/hammer2_inode.c |    4 +-
 sys/vfs/hammer2/hammer2_vnops.c |  394 ++++++++++++++++++++++++++++++++++++++-
 4 files changed, 541 insertions(+), 234 deletions(-)
 create mode 100644 sys/vfs/hammer2/CHANGES

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/db71f61f5db17f6d05af98faa727853dea4aaf87


-- 
DragonFly BSD source repository





More information about the Commits mailing list