erofs-utils: lib: optimize space allocation
authorGao Xiang <hsiangkao@linux.alibaba.com>
Fri, 3 Jan 2025 09:03:37 +0000 (17:03 +0800)
committerGao Xiang <hsiangkao@linux.alibaba.com>
Sat, 5 Apr 2025 16:25:21 +0000 (00:25 +0800)
commita42dc09f1dee5bb09bfcbcb9c2047c149614c6ab
treed84edc7ade2e47c80d933896e4720d1934640882
parent30788ccd8281247d884bf847f1986d29ab74a448
erofs-utils: lib: optimize space allocation

Previously, only mapped buffers were kept in the form of bucket lists
for each type and for each possible used bytes in the last block.

Apply this to unmapped buffers as well for faster greedy selection.

Signed-off-by: Gao Xiang <hsiangkao@linux.alibaba.com>
Link: https://lore.kernel.org/r/20250103090338.740593-4-hsiangkao@linux.alibaba.com
include/erofs/cache.h
lib/cache.c