git: DragonFly_RELEASE_6_0 hammer2 - Only clear the bigmask hint in relaxed mode freemap scans
Matthew Dillon
dillon at crater.dragonflybsd.org
Mon Aug 16 21:40:52 PDT 2021
commit b3f08ce6f6de46c8084a9bf6d5331196ea118610
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/b3f08ce6f6de46c8084a9bf6d5331196ea118610
--
DragonFly BSD source repository
More information about the Commits
mailing list