Skip to content

Commit

Permalink
Write /sys/kernel/wait_for_device_probe before import.
Browse files Browse the repository at this point in the history
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 <mav@FreeBSD.org>
  • Loading branch information
amotin committed Aug 17, 2021
1 parent e2465c1 commit 448baa9
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions contrib/initramfs/scripts/zfs
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,7 @@ load_module_initrd()
fi

# 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
Expand Down

0 comments on commit 448baa9

Please sign in to comment.