git: hammer2 - Fix freemap bugs

Matthew Dillon dillon at crater.dragonflybsd.org
Mon Aug 5 23:03:58 PDT 2013


commit 2c6f594d1626814a7ddaa371c7c02f3c2cd60c74
Author: Matthew Dillon <dillon at apollo.backplane.com>
Date:   Mon Aug 5 22:50:51 2013 -0700

    hammer2 - Fix freemap bugs
    
    * The linear iterator must not be used if aligned on an allocation
      chunk (16K) boundary.  Reserved areas just set the bitmap to all 1's
      but were leaving the iterator set to 0.  Fix both the boundary check
      and initialized bmap->linear for reserved areas to HAMMER2_SEGSIZE.
    
      This fixes a corruption issue where allocates were being made out of
      reserved areas and then overwritten by e.g. the freemap, and where
      the linear iterator would reallocate areas already allocated via the
      bitmap.
    
    * Fix the code which marks device bufferse B_CACHE when freshly allocated.
      It wasn't handling the 32KB case properly.
    
    * Our pre-caching gets and releases a block.  B_CACHE must be used in addition
      to calling vfs_bio_clrbuf() because we aren't holding onto the locked buffer.

Summary of changes:
 sys/vfs/hammer2/hammer2_freemap.c | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/2c6f594d1626814a7ddaa371c7c02f3c2cd60c74


-- 
DragonFly BSD source repository



More information about the Commits mailing list