Project

General

Profile

Actions

Bug #3359

open

Too many zlib

Added by tkusumi over 1 year ago. Updated about 1 month ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
-
Target version:
Start date:
10/18/2023
Due date:
% Done:

0%

Estimated time:

Description

Recently added hammer2(8) recover directive has added yet another zlib to HAMMER2, this time in userspace.
This is a third copy of zlib in HAMMER2 related source.
Why not just use contrib/zlib-1.2, or if not possible why ?

hammer2(8) recover directive has also added a userspace copy of LZ4.
This one can easily reuse sys/vfs/hammer2/*lz4*.
All we need is a few KERNEL ifdefs around malloc/free related and header includes.

Actions #1

Updated by liweitianux about 1 month ago

tkusumi wrote:

Recently added hammer2(8) recover directive has added yet another zlib to HAMMER2, this time in userspace.
This is a third copy of zlib in HAMMER2 related source.
Why not just use contrib/zlib-1.2, or if not possible why ?

Some time ago I discussed this with dillon on IRC, he insisted that HAMMER2 bundle its own zlib (and well tested) in order to keep HAMMER2 self-contained. Nevertheless, he agreed that the userland HAMMER2 utilities (such as hammer2(8) and makefs(8)) could just reuse the in-kernel HAMMER2's zlib copy.

hammer2(8) recover directive has also added a userspace copy of LZ4.
This one can easily reuse sys/vfs/hammer2/*lz4*.
All we need is a few KERNEL ifdefs around malloc/free related and header includes.

Hmm, I suggest we do the same as zlib above. Meanwhile, it's better to reorganize the LZ4 code similar to vfs/hammer2/xxhash.

In addition, there is also the zlib kernel module compiled from sys/net/zlib. I'd like it to reuse the source from contrib/zlib. We can refer to FreeBSD for this change.

Actions

Also available in: Atom PDF