mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2024-12-26 03:09:34 +03:00
ZTS: Improve block_device_wait on FreeBSD
FreeBSD doesn't have an equivalent to udevadm settle, so we have been resorting to a three second sleep to wait for device changes to take effect. This is far from ideal. We are mainly waiting for volmode=geom zvols to appear in /dev, so as a hack, reading the geom config will have the desired effect of quiescing the geom state. Reviewed-by: Alexander Motin <mav@FreeBSD.org> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Ryan Moeller <ryan@iXsystems.com> Closes #10768
This commit is contained in:
parent
07ce8961e5
commit
b0e75805ee
@ -81,7 +81,9 @@ function block_device_wait
|
|||||||
log_note udevadm settle time too long: $elapsed
|
log_note udevadm settle time too long: $elapsed
|
||||||
elif is_freebsd; then
|
elif is_freebsd; then
|
||||||
if [[ ${#@} -eq 0 ]]; then
|
if [[ ${#@} -eq 0 ]]; then
|
||||||
sleep 3
|
# Do something that has to go through the geom event
|
||||||
|
# queue to complete.
|
||||||
|
sysctl kern.geom.conftxt >/dev/null
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user