ab92d3
From 878384403378526535a737acfdbf4154f7af5f50 Mon Sep 17 00:00:00 2001
ab92d3
From: Kairui Song <kasong@redhat.com>
ab92d3
Date: Mon, 1 Feb 2021 01:49:54 +0800
ab92d3
Subject: [PATCH] perf: disable initrd compression when squash module is
ab92d3
 enabled
ab92d3
ab92d3
With squash module, the initramfs is double compressed, which slow down
ab92d3
the build progress and doesn't shrink the size much.
ab92d3
ab92d3
(cherry picked from commit 7c0bc0b2fd167da42035020dae49af94844f053c)
ab92d3
ab92d3
Resolves: #1959336
ab92d3
---
ab92d3
 dracut.sh | 3 +++
ab92d3
 1 file changed, 3 insertions(+)
ab92d3
ab92d3
diff --git a/dracut.sh b/dracut.sh
ab92d3
index d9a66c5a..bf79568c 100755
ab92d3
--- a/dracut.sh
ab92d3
+++ b/dracut.sh
ab92d3
@@ -1801,6 +1801,9 @@ if dracut_module_included "squash"; then
ab92d3
 
ab92d3
     rm -rf "$squash_dir"
ab92d3
     dinfo "*** Squashing the files inside the initramfs done ***"
ab92d3
+
ab92d3
+    # Skip initramfs compress
ab92d3
+    compress="cat"
ab92d3
 fi
ab92d3
 
ab92d3
 dinfo "*** Creating image file '$outfile' ***"
ab92d3