summaryrefslogtreecommitdiffstats
path: root/src/home
diff options
context:
space:
mode:
authorDaan De Meyer <daan.j.demeyer@gmail.com>2024-08-30 14:09:06 +0200
committerDaan De Meyer <daan.j.demeyer@gmail.com>2024-09-03 08:49:49 +0200
commit27cacec939a46f61706d7b48a51b6f5880be4662 (patch)
tree3fe666eb6357b042e573d1cf284fdba89606e56d /src/home
parentTEST-58-REPART: Only skip part of testcase_minimize() that requires root (diff)
downloadsystemd-27cacec939a46f61706d7b48a51b6f5880be4662.tar.xz
systemd-27cacec939a46f61706d7b48a51b6f5880be4662.zip
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.
Diffstat (limited to 'src/home')
-rw-r--r--src/home/homework-luks.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/home/homework-luks.c b/src/home/homework-luks.c
index ed5ee930c1..b859658f00 100644
--- a/src/home/homework-luks.c
+++ b/src/home/homework-luks.c
@@ -2378,6 +2378,8 @@ int home_create_luks(
user_record_luks_discard(h),
/* quiet = */ true,
/* sector_size = */ 0,
+ /* compression = */ NULL,
+ /* compression_level= */ NULL,
extra_mkfs_options);
if (r < 0)
return r;