freebsd-skq/sys/fs
phk 9799def1bc Unsupport forceful unmounts of DEVFS.
After disscussing things I have decided to take the easy and
consistent 90% solution instead of aiming for the very involved 99%
solution.

If we allow forceful unmounts of DEVFS we need to decide how to handle
the devices which are in use through this filesystem at the time.

We cannot just readopt the open devices in the main /dev instance since
that would open us to security issues.

For the majority of the devices, this is relatively straightforward
as we can just pretend they got revoke(2)'ed.

Some devices get tricky:  /dev/console and /dev/tty for instance
does a sort of recursive open of the real console device.   Other devices
may be mmap'ed (kill the processes ?).

And then there are disk devices which are mounted.

The correct thing here would be to recursively unmount the filesystems
mounte from devices from our DEVFS instance (forcefully) and if
this succeeds, complete the forcefully unmount of DEVFS.  But if
one of the forceful unmounts fail we cannot complete the forceful
unmount of DEVFS, but we are likely to already have severed a lot
of stuff in the process of trying.

Event attempting this would be a lot of code for a very far out
corner-case which most people would never see or get in touch with.

It's just not worth it.
2005-01-04 07:52:26 +00:00
..
cd9660 First save from editor, *then* commit. 2004-12-07 15:25:36 +00:00
coda Convert coda to nmount. 2004-12-06 19:46:02 +00:00
deadfs Back when VOP_* was introduced, we did not have new-style struct 2004-12-01 23:16:38 +00:00
devfs Unsupport forceful unmounts of DEVFS. 2005-01-04 07:52:26 +00:00
fdescfs Use vfs_mountedfrom(), rely on vfs_mount.c calling VFS_STATFS(). 2004-12-06 20:02:13 +00:00
fifofs Don't forget to bypass vnodes in corner cases. 2004-12-13 10:07:57 +00:00
hpfs Convert to nmount. Add backwards compat cmount method. 2004-12-06 20:14:20 +00:00
msdosfs Handle MNT_UPDATE export requests first and return so we do not 2004-12-11 20:37:48 +00:00
ntfs Exporting of NTFS filesystem broke in rev 1.70. Fix it. 2004-12-13 16:21:48 +00:00
nullfs Use vfs_mountedfrom(), rely on vfs_mount.c calling VFS_STATFS(). 2004-12-06 20:02:13 +00:00
nwfs Convert nwfs to nmount, but take the low road: There is no way this is 2004-12-06 20:11:56 +00:00
portalfs Convert to nmount. Add omount compat. 2004-12-06 20:23:51 +00:00
procfs Fix unvalidated pointer dereference. This is FreeBSD-SA-04:17.procfs. 2004-12-01 21:33:02 +00:00
pseudofs Use vfs_mountedfrom(). 2004-12-06 20:52:46 +00:00
smbfs typo 2004-12-11 12:45:24 +00:00
udf ufs vfs_mountedon(), rely on vfs_mount.c calling VFS_STATFS() 2004-12-06 20:03:58 +00:00
umapfs VFS_STATFS(mp, ...) is mostly called with &mp->mnt_stat, but a few cases 2004-12-05 22:41:02 +00:00
unionfs Trust vfs_mount to call VFS_STATFS() on all mounts. 2004-12-06 20:31:36 +00:00