From af2a8ddb0e599281e2591b4eacf6fbfa960e10e6 Mon Sep 17 00:00:00 2001 From: Alexander Motin Date: Tue, 17 Aug 2021 15:36:37 -0400 Subject: [PATCH] Write /sys/kernel/wait_for_device_probe before import. The new sysfs attribute makes kernel to wait for all device probe to complete before return. Without it wait_for_udev call does not give any guaranties. Ticket: NAS-108200 Signed-off-by: Alexander Motin --- contrib/initramfs/scripts/zfs | 1 + 1 file changed, 1 insertion(+) diff --git a/contrib/initramfs/scripts/zfs b/contrib/initramfs/scripts/zfs index 0a2bd2efda..8d54f16bb1 100644 --- a/contrib/initramfs/scripts/zfs +++ b/contrib/initramfs/scripts/zfs @@ -283,6 +283,7 @@ load_module_initrd() while true; do # Wait for all of the /dev/{hd,sd}[a-z] device nodes to appear. + echo "1" > /sys/kernel/wait_for_device_probe if command -v wait_for_udev > /dev/null 2>&1 ; then wait_for_udev 10 elif command -v wait_for_dev > /dev/null 2>&1 ; then