fadump: use 'zstd' as the default compression method

If available, use 'zstd' compression method to optimize the size of
the initrd built with fadump support. Also, 'squash+zstd' is not
preferred because more disk space is consumed with 'squash+zstd' due
to the additional binaries needed for fadump with squash case.

Signed-off-by: Hari Bathini <hbathini@linux.ibm.com>
Acked-by: Tao Liu <ltao@redhat.com>
Reviewed-by: Philipp Rudo <prudo@redhat.com>
This commit is contained in:
Hari Bathini 2022-12-02 18:46:49 +05:30 committed by Coiby Xu
parent e96e441b36
commit f98bd5895e

View File

@ -62,11 +62,9 @@ _dracut_isolate_args=(
/usr/lib/dracut/fadump-kernel-modules.txt
)
# Same as setting zstd in mkdumprd
# Use zstd compression method, if available
if ! have_compression_in_dracut_args; then
if is_squash_available && dracut_have_option "--squash-compressor"; then
_dracut_isolate_args+=(--squash-compressor zstd)
elif is_zstd_command_available; then
if is_zstd_command_available; then
_dracut_isolate_args+=(--compress zstd)
fi
fi