commit:     c4e6b09c79f33303f749b2b40af51a01f168971f
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Mon Feb 15 04:34:57 2021 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Mon Feb 15 05:51:47 2021 +0000
URL:        https://gitweb.gentoo.org/proj/genkernel.git/commit/?id=c4e6b09c

linuxrc: load btrfs module manually

There is no trigger/rule in UDEV/btrfs-progs to load btrfs module.

The only known trigger via mount command could be too late or
is maybe insufficient depending on used BTRFS {meta,}data profile.

Bug: https://bugs.gentoo.org/739892
Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org>

 defaults/linuxrc | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/defaults/linuxrc b/defaults/linuxrc
index d8fee73..222dd35 100644
--- a/defaults/linuxrc
+++ b/defaults/linuxrc
@@ -535,6 +535,14 @@ then
        FIRSTMODS="${FIRSTMODS} crc32_generic"
 fi
 
+if [ "${ROOTFSTYPE}" = "btrfs" -o -x /sbin/btrfs ]
+then
+       # We have no mechanism to trigger btrfs module loading before UDEV's 
btrfs builtin
+       # will run; In addition, loading btrfs via UDEV could cause problems 
for slow
+       # machines, see https://github.com/dracutdevs/dracut/issues/658
+       FIRSTMODS="${FIRSTMODS} btrfs"
+fi
+
 splash 'init'
 
 cmdline_hwopts

Reply via email to