Add a new unmount(2) flag, MNT_NONBUSY, to check whether there are any
open vnodes before proceeding. Make autounmound(8) use this flag. Without
it, even an unsuccessfull unmount causes filesystem flush, which interferes
with normal operation.
Details
Details
- Reviewers
kib - Group Reviewers
manpages - Commits
- rS302388: Add new unmount(2) flag, MNT_NONBUSY, to check whether there are
Diff Detail
Diff Detail
- Repository
- rS FreeBSD src repository - subversion
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
sys/kern/vfs_mount.c | ||
---|---|---|
1219 ↗ | (On Diff #18056) | Why do you need to lock the root vnode ? You vput the root vnode immediately after VFS_ROOT(), which allows the memory to be reused. Just checking VV_ROOT is enough for your purposes. |
1234 ↗ | (On Diff #18056) | The printf() must be removed. |
1287 ↗ | (On Diff #18056) | This only should be done after we set _our_ MNTK_UNMOUNT flag. |
sys/kern/vfs_mount.c | ||
---|---|---|
1287 ↗ | (On Diff #18056) | I'd prefer not, to be honest. This is "best effort" functionality, false positives (or negatives) are just fine, autounmountd(8) can cope with them, and the whole point of this is to make it as non-intrusive as possible. |
sys/kern/vfs_mount.c | ||
---|---|---|
1287 ↗ | (On Diff #18056) | Right, so you do not want to race for the full vnode list iteration with the parallel unmount. |