mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-24 11:18:52 +03:00
ZTS: Another round of changes for FreeBSD
Highlights: * is_linux -> is_illumos swaps * make block_device_wait more clever when paths are given * slightly optimize default_cleanup_noexit * remove platform differences in user_run * temporarily expect non-libfetch behavior for keylocation=/foo/bar * fix sharenfs exceptions * don't test multihost property * fix misc broken platform checks * clear zinjected faults in removal_resume_export callback Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: John Kennedy <john.kennedy@delphix.com> Signed-off-by: Ryan Moeller <ryan@iXsystems.com> Closes #10092
This commit is contained in:
@@ -74,14 +74,33 @@ function block_device_wait
|
||||
{
|
||||
if is_linux; then
|
||||
udevadm trigger $*
|
||||
typeset local start=$SECONDS
|
||||
typeset start=$SECONDS
|
||||
udevadm settle
|
||||
typeset local elapsed=$((SECONDS - start))
|
||||
typeset elapsed=$((SECONDS - start))
|
||||
[[ $elapsed > 60 ]] && \
|
||||
log_note udevadm settle time too long: $elapsed
|
||||
elif is_freebsd; then
|
||||
sleep 3
|
||||
if [[ ${#@} -eq 0 ]]; then
|
||||
sleep 3
|
||||
return
|
||||
fi
|
||||
fi
|
||||
# Poll for the given paths to appear, but give up eventually.
|
||||
typeset -i i
|
||||
for (( i = 0; i < 5; ++i )); do
|
||||
typeset missing=false
|
||||
typeset dev
|
||||
for dev in "${@}"; do
|
||||
if ! [[ -f $dev ]]; then
|
||||
missing=true
|
||||
break
|
||||
fi
|
||||
done
|
||||
if ! $missing; then
|
||||
break
|
||||
fi
|
||||
sleep ${#@}
|
||||
done
|
||||
}
|
||||
|
||||
#
|
||||
|
||||
Reference in New Issue
Block a user