> The diff below fixes this by setting the "source" amap lock to the newly
> allocated one.  This is not strictly necessary on OpenBSD since the amap
> is only inserted on the global list at the end of amap copy, but this
> satisfies the locking requirement of amap_wipeout() and is IMHO the
> simplest solution.  This has also the advantage of reducing the
> differences with NetBSD.

This diff causes a reproducible hang with mount_mfs(8) on my laptop. I
use an mfs noperm partition as described in
https://www.openbsd.org/faq/faq5.html#Release

$ tail -1 /etc/fstab
swap /dest mfs rw,nosuid,noperm,-P/var/dest,-s1.5G,noauto 0 0

If I run 'top -S -s.1' on an otherwise idle system and do 'mount /dest',
I see two mount_mfs(8) processes spin in fltamap and the pagedaemon is
spinning in pgdaemon before the system locks up completely (this takes
something between 1 and 20 seconds to happen).

Reply via email to