Subject: A question about unmounting files systems ...
To: None <tech-kern@NetBSD.ORG>
From: None <firstname.lastname@example.org>
Date: 10/22/1997 19:46:18
When a file system is unmounted there are several locks set,
MNT_UMOUNT & MNT_MLOCK and several guard functions vfs_lock/vfs_busy
that are used to guard that certain operations, sync, fstatfs, can not
happen until the unmount completes.
An unmount will eventually call vflush() to force all the dirty blocks
back. This could take a long time with a lot of process switches.
vflush walks the mount point's vnode list. What prevents a new
vnode from being added to or deleted from this list while the dirty
blocks are being flushed. I wanted to find a check in getnewvnode
or xxx_vget, but there is none.