Skip to content

Commit

Permalink
ZTS: Skip udev actions in zvol_misc when not Linux
Browse files Browse the repository at this point in the history
udev is only used on Linux.

Skip udev_wait and udev_cleanup when not on Linux.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: John Kennedy <john.kennedy@delphix.com>
Reviewed-by: George Melikov <mail@gmelikov.ru>
Signed-off-by: Ryan Moeller <ryan@iXsystems.com>
Closes openzfs#10165
  • Loading branch information
Ryan Moeller authored and jsai20 committed Mar 30, 2021
1 parent 017c1fa commit be8cb8d
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,7 @@
function udev_wait
{
sleep 1
if is_freebsd; then
return 0
fi
is_linux || return 0
udevadm trigger --action=change
udevadm settle
for i in {1..3}; do
Expand All @@ -60,7 +58,9 @@ function udev_wait
#
function udev_cleanup
{
is_linux || return 0
log_note "Pruning broken ZVOL symlinks ..."

udevadm settle
# find all dangling links and delete them
find -L "${ZVOL_DEVDIR}" -type l -print -delete
Expand Down

0 comments on commit be8cb8d

Please sign in to comment.