Page MenuHomeFreeBSD

Make autounmountd(8) less intrusive.
ClosedPublic

Authored by trasz on Jul 1 2016, 8:29 AM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Apr 26, 6:24 AM
Unknown Object (File)
Mar 12 2024, 3:35 AM
Unknown Object (File)
Mar 12 2024, 3:35 AM
Unknown Object (File)
Mar 12 2024, 3:35 AM
Unknown Object (File)
Mar 12 2024, 3:35 AM
Unknown Object (File)
Mar 12 2024, 3:35 AM
Unknown Object (File)
Mar 11 2024, 12:33 AM
Unknown Object (File)
Mar 8 2024, 4:45 AM
Subscribers

Details

Summary

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.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 4383
Build 4433: arc lint + arc unit

Event Timeline

trasz retitled this revision from to Make autounmountd(8) less intrusive..
trasz updated this object.
trasz edited the test plan for this revision. (Show Details)
sys/kern/vfs_mount.c
1219

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

The printf() must be removed.

1287

This only should be done after we set _our_ MNTK_UNMOUNT flag.

typo

sbin/umount/umount.c
131

s/mutualy/mutually/

trasz edited edge metadata.

Misc fixes.

trasz marked 3 inline comments as done.Jul 4 2016, 9:50 AM
trasz added inline comments.
sys/kern/vfs_mount.c
1287

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

Right, so you do not want to race for the full vnode list iteration with the parallel unmount.

trasz edited edge metadata.

Move vfs_check_usecounts() down slightly, as suggested by kib@.

kib edited edge metadata.
This revision is now accepted and ready to land.Jul 6 2016, 5:37 PM
This revision was automatically updated to reflect the committed changes.