summaryrefslogtreecommitdiffstats
path: root/src/shared/mkfs-util.h
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/shared/mkfs-util.h
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/shared/mkfs-util.h')
-rw-r--r--src/shared/mkfs-util.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/shared/mkfs-util.h b/src/shared/mkfs-util.h
index 9a1cb585d6..165862e7e1 100644
--- a/src/shared/mkfs-util.h
+++ b/src/shared/mkfs-util.h
@@ -20,6 +20,8 @@ int make_filesystem(
bool discard,
bool quiet,
uint64_t sector_size,
+ char *compression,
+ char *compression_level,
char * const *extra_mkfs_args);
int mkfs_options_from_env(const char *component, const char *fstype, char ***ret);