git: hammer2 - Only clear the bigmask hint in relaxed mode freemap scans

Matthew Dillon dillon at crater.dragonflybsd.org
Thu Aug 12 15:59:16 PDT 2021


commit c4fd5af375974821670233b2e5961ea876cf41de
Author: Matthew Dillon <dillon at apollo.backplane.com>
Date:   Thu Aug 12 15:52:25 2021 -0700

    hammer2 - Only clear the bigmask hint in relaxed mode freemap scans
    
    * When allocating blocks, the bigmask hint allows the allocator to
      skip sub-trees that are known to be fully allocated.  The bit for
      the appropriate radix (block size being allocated) is cleared when
      a full scan reveals no available blocks in the sub-tree.
    
    * When the filesystem starts to fill up, there might not be any blocks
      in class-assigned sub-trees, but there could be blocks in the sub-trees
      for other classes.  Normally the allocator first tries to find a block
      in a matching class, and if that fails it tries to find a block in an
      unrelated class using a 'relaxed' freemap search.
    
      The bug is that the bigmask hint was being cleared for non-relaxed
      searches that failed, causing the later relaxed search to also fail
      even though blocks might be allocatable.
    
    * Fixed by only clearing the bit when a full relaxed scan determines
      that no blocks are available.

Summary of changes:
 sys/vfs/hammer2/hammer2_freemap.c | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

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


-- 
DragonFly BSD source repository



More information about the Commits mailing list