DragonFly BSD
DragonFly commits List (threaded) for 2012-02
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

git: hammer2 hammer2 - Add indirect block creation


From: Matthew Dillon <dillon@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Fri, 17 Feb 2012 18:51:34 -0800 (PST)

commit 995e78dc6e7daf6175ad24433f16cfd2c8062507
Author: Matthew Dillon <dillon@apollo.backplane.com>
Date:   Fri Feb 17 18:36:24 2012 -0800

    hammer2 - Add indirect block creation
    
    * hammer2_chain_create_indirect() is now called by hammer2_chain_create()
      when the current parent is full and an indirect block is needed to
      open up new slots.
    
      This function scans the key/keybits for all the entries in the parent and
      calculates the key/keybits representing the range, inclusive of the
      key/keybits we were trying to insert when we ran out of room.
    
      The range is then bisected and the low or high side is selected for
      indirect block replacement.  The indirect block is created and the low
      or high side elements are moved into the indirect block.  The function
      then returns and hammer2_chain_create() retries.
    
    * Implement the HAMMER2_CHAIN_MOVED flag.  This flag is set in a chain
      element that has been moved into an indirect block, allowing flushes
      to detect the condition and update the element in the indirect block
      during the flush operation.
    
      We also subtley use NOLOCK in a few places since there is no need to
      actually load the contents of the entries being moved.
    
    * Correct issues related to iterating through indirect blocks that came
      up in testing.
    
    * Tested with mkdir > 8 entries.

Summary of changes:
 sys/vfs/hammer2/TODO            |   15 ++
 sys/vfs/hammer2/hammer2.h       |    1 +
 sys/vfs/hammer2/hammer2_chain.c |  373 +++++++++++++++++++++++++++++++++++++--
 sys/vfs/hammer2/hammer2_disk.h  |    6 +-
 sys/vfs/hammer2/hammer2_vnops.c |    8 +-
 5 files changed, 386 insertions(+), 17 deletions(-)
 create mode 100644 sys/vfs/hammer2/TODO

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/995e78dc6e7daf6175ad24433f16cfd2c8062507


-- 
DragonFly BSD source repository



[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]