]> git.ipfire.org Git - thirdparty/systemd.git/commit
repart: Add compression support 34190/head
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Fri, 30 Aug 2024 12:09:06 +0000 (14:09 +0200)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Tue, 3 Sep 2024 06:49:49 +0000 (08:49 +0200)
commit27cacec939a46f61706d7b48a51b6f5880be4662
tree3fe666eb6357b042e573d1cf284fdba89606e56d
parent6b5d3d255695c558d3ef8677f57475e9ade5b079
repart: Add compression support

Now that mkfs.btrfs is adding support for compressing the generated
filesystem (https://github.com/kdave/btrfs-progs/pull/882), let's
add general support for specifying the compression algorithm and
compression level to use.

We opt to not parse the specified compression algorithm and instead
pass it on as is to the mkfs tool. This has a few benefits:

- We support every compression algorithm supported by every tool
  automatically.
- Users don't need to modify systemd-repart if a mkfs tool learns a
  new compression algorithm in the future
- We don't need to maintain a bunch of tables for filesystem to map
  from our generic compression algorithm enum to the filesystem specific
  names.

We don't add support for btrfs just yet until the corresponding PR
in btrfs-progs is merged.
man/repart.d.xml
src/home/homework-luks.c
src/partition/makefs.c
src/partition/repart.c
src/shared/mkfs-util.c
src/shared/mkfs-util.h
src/test/test-loop-block.c
test/units/TEST-58-REPART.sh