commit: 6a3eedab7ad0e26ff13edee1881bd5498075c36a Author: Thomas Deutschmann <whissi <AT> gentoo <DOT> org> AuthorDate: Sun Jul 14 19:35:06 2019 +0000 Commit: Thomas Deutschmann <whissi <AT> gentoo <DOT> org> CommitDate: Sun Jul 14 19:35:06 2019 +0000 URL: https://gitweb.gentoo.org/proj/genkernel.git/commit/?id=6a3eedab
initrd.scripts: start_volumes(): Move bcache initialation below LVM but before BTRFS/ZFS Bug: https://bugs.gentoo.org/605094 Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org> defaults/initrd.scripts | 42 +++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/defaults/initrd.scripts b/defaults/initrd.scripts index 87a861d..7bc5a53 100644 --- a/defaults/initrd.scripts +++ b/defaults/initrd.scripts @@ -1264,6 +1264,27 @@ start_volumes() { fi fi + if [ "${USE_BCACHE}" = '1' ] + then + if [ ! -e /sys/fs/bcache/register_quiet ] + then + warn_msg "'/sys/fs/bcache/register_quiet' does not exist. Missing kernel driver? Skipping dobcache ..." + else + local i= + for i in $(awk '$4 !~ /^(name$|$)/ { print $4 }' /proc/partitions) + do + if [ -e "/dev/${i}" ] + then + # Push all the block devices to register_quiet + # If its bcache, it will bring it up, if not, it will simply ignore it. + echo "/dev/${i}" >/sys/fs/bcache/register_quiet 2>/dev/null + else + warn_msg "'/dev/${i}' should exist but is missing; Ignoring ..." + fi + done + fi + fi + if [ "${USE_BTRFS}" = '1' ] then if [ -x '/sbin/btrfs' ] @@ -1316,27 +1337,6 @@ start_volumes() { fi fi fi - - if [ "${USE_BCACHE}" = '1' ] - then - if [ ! -e /sys/fs/bcache/register_quiet ] - then - warn_msg "'/sys/fs/bcache/register_quiet' does not exist. Missing kernel driver? Skipping dobcache ..." - else - local i= - for i in $(awk '$4 !~ /^(name$|$)/ { print $4 }' /proc/partitions) - do - if [ -e "/dev/${i}" ] - then - # Push all the block devices to register_quiet - # If its bcache, it will bring it up, if not, it will simply ignore it. - echo "/dev/${i}" >/sys/fs/bcache/register_quiet 2>/dev/null - else - warn_msg "'/dev/${i}' should exist but is missing; Ignoring ..." - fi - done - fi - fi } start_iscsi() {