kernel - Try harder to unmount a filesystem
authorMatthew Dillon <dillon@apollo.backplane.com>
Tue, 26 Feb 2013 08:35:03 +0000 (00:35 -0800)
committerMatthew Dillon <dillon@apollo.backplane.com>
Tue, 26 Feb 2013 08:35:03 +0000 (00:35 -0800)
commitfdbec6d31d4c1ab916476564bfcccfac093bfe0a
treefb57e85e7e0564119dbce723c4144945a7b2b4ca
parent34a048ab5deacc3a1f37451bad89666fe37cd70d
kernel - Try harder to unmount a filesystem

* Use LK_TIMELOCK (5 seconds) instead of LK_NOWAIT when getting the mp
  lockmgr lock for unforced unmounts.

* Remove the syncer vnode and issue VFS_SYNC prior to checking
  mnt_refs instead of after the check.  This appears to improve tmpfs's
  chances of unmounting, though it is a bit unclear as to why.

* Wait up to 1 second for mnt_refs to drop to 1 before giving up.

* Improves Poudriere's chances of successfully unmounting a tmpfs
  filesystem.
sys/kern/vfs_mount.c
sys/kern/vfs_syscalls.c