Attemp to simplify/cleanup compression code. Little tested under high memory pressure. At least all looks like working as expected. First patch include preparation work for replace old linked list based approach with the new one based on mempool API. Covert only one part as proof of concept, heuristic memory managment. Define usage pattern and mempool_alloc_wrap() - handle pool resize and pool init errors. Second move zlib/lzo/zstd to new mempool API Timofey Titovets (2): Btrfs: heuristic: replace workspace managment code by mempool API Btrfs: compression: replace workspace managment code by mempool API fs/btrfs/compression.c | 332 ++++++++++++++++--------------------------------- fs/btrfs/compression.h | 12 +- fs/btrfs/lzo.c | 64 ++++++---- fs/btrfs/zlib.c | 56 +++++---- fs/btrfs/zstd.c | 49 +++++--- 5 files changed, 215 insertions(+), 298 deletions(-) -- 2.15.1 -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html
