#
9c499ad9 |
| 17-Jul-2006 |
Poul-Henning Kamp <phk@FreeBSD.org> |
Remove the NDEVFSINO and NDEVFSOVERFLOW options which no longer exists in DEVFS.
Remove the opt_devfs.h file now that it is empty.
|
#
2551d4f6 |
| 06-Jul-2006 |
Robert Watson <rwatson@FreeBSD.org> |
Remove now unneeded opt_mac.h and mac.h includes.
MFC after: 3 days
|
Revision tags: release/5.5.0_cvs, release/5.5.0, release/6.1.0_cvs, release/6.1.0, release/6.0.0_cvs, release/6.0.0 |
|
#
e515ee78 |
| 24-Sep-2005 |
Poul-Henning Kamp <phk@FreeBSD.org> |
Make rule zero really magical, that way we don't have to do anything when we mount and get zero cost if no rules are used in a mountpoint.
Add code to deref rules on unmount.
Switch from SLIST to T
Make rule zero really magical, that way we don't have to do anything when we mount and get zero cost if no rules are used in a mountpoint.
Add code to deref rules on unmount.
Switch from SLIST to TAILQ.
Drop SYSINIT, use SX_SYSINIT and static initializer of TAILQ instead.
Drop goto, a break will do.
Reduce double pointers to single pointers.
Combine reaping and destroying rulesets.
Avoid memory leaks in a some error cases.
show more ...
|
#
e606a3c6 |
| 19-Sep-2005 |
Poul-Henning Kamp <phk@FreeBSD.org> |
Rewamp DEVFS internals pretty severely [1].
Give DEVFS a proper inode called struct cdev_priv. It is important to keep in mind that this "inode" is shared between all DEVFS mountpoints, therefore i
Rewamp DEVFS internals pretty severely [1].
Give DEVFS a proper inode called struct cdev_priv. It is important to keep in mind that this "inode" is shared between all DEVFS mountpoints, therefore it is protected by the global device mutex.
Link the cdev_priv's into a list, protected by the global device mutex. Keep track of each cdev_priv's state with a flag bit and of references from mountpoints with a dedicated usecount.
Reap the benefits of much improved kernel memory allocator and the generally better defined device driver APIs to get rid of the tables of pointers + serial numbers, their overflow tables, the atomics to muck about in them and all the trouble that resulted in.
This makes RAM the only limit on how many devices we can have.
The cdev_priv is actually a super struct containing the normal cdev as the "public" part, and therefore allocation and freeing has moved to devfs_devs.c from kern_conf.c.
The overall responsibility is (to be) split such that kern/kern_conf.c is the stuff that deals with drivers and struct cdev and fs/devfs handles filesystems and struct cdev_priv and their private liason exposed only in devfs_int.h.
Move the inode number from cdev to cdev_priv and allocate inode numbers properly with unr. Local dirents in the mountpoints (directories, symlinks) allocate inodes from the same pool to guarantee against overlaps.
Various other fields are going to migrate from cdev to cdev_priv in the future in order to hide them. A few fields may migrate from devfs_dirent to cdev_priv as well.
Protect the DEVFS mountpoint with an sx lock instead of lockmgr, this lock also protects the directory tree of the mountpoint.
Give each mountpoint a unique integer index, allocated with unr. Use it into an array of devfs_dirent pointers in each cdev_priv. Initially the array points to a single element also inside cdev_priv, but as more devfs instances are mounted, the array is extended with malloc(9) as necessary when the filesystem populates its directory tree.
Retire the cdev alias lists, the cdev_priv now know about all the relevant devfs_dirents (and their vnodes) and devfs_revoke() will pick them up from there. We still spelunk into other mountpoints and fondle their data without 100% good locking. It may make better sense to vector the revoke event into the tty code and there do a destroy_dev/make_dev on the tty's devices, but that's for further study.
Lots of shuffling of stuff and churn of bits for no good reason[2].
XXX: There is still nothing preventing the dev_clone EVENTHANDLER from being invoked at the same time in two devfs mountpoints. It is not obvious what the best course of action is here.
XXX: comment out an if statement that lost its body, until I can find out what should go there so it doesn't do damage in the meantime.
XXX: Leave in a few extra malloc types and KASSERTS to help track down any remaining issues.
Much testing provided by: Kris Much confusion caused by (races in): md(4)
[1] You are not supposed to understand anything past this point.
[2] This line should simplify life for the peanut gallery.
show more ...
|
#
d785dfef |
| 15-Aug-2005 |
Poul-Henning Kamp <phk@FreeBSD.org> |
Eliminate effectively unused dm_basedir field from devfs_mount.
|
#
e29c976a |
| 30-Jul-2005 |
Kris Kennaway <kris@FreeBSD.org> |
devfs is not yet fully MPSAFE - for example, multiple concurrent devfs(8) processes can cause a panic when operating on rulesets.
Approved by: phk
|
Revision tags: release/5.4.0_cvs, release/5.4.0 |
|
#
cd360e94 |
| 30-Apr-2005 |
Jeff Roberson <jeff@FreeBSD.org> |
- Mark devfs as MNTK_MPSAFE as I belive it does not require Giant.
Sponsored by: Isilon Systems, Inc. Agreed in principle by: phk
|
#
ea124bf5 |
| 31-Mar-2005 |
Jeff Roberson <jeff@FreeBSD.org> |
- LK_NOPAUSE is a nop now.
Sponsored by: Isilon Systems, Inc.
|
#
d9b2d9f7 |
| 24-Mar-2005 |
Jeff Roberson <jeff@FreeBSD.org> |
- Update vfs_root implementations to match the new prototype. None of these filesystems will support shared locks until they are explicitly modified to do so. Careful review must be done to e
- Update vfs_root implementations to match the new prototype. None of these filesystems will support shared locks until they are explicitly modified to do so. Careful review must be done to ensure that this is safe for each individual filesystem.
Sponsored by: Isilon Systems, Inc.
show more ...
|
Revision tags: release/4.11.0_cvs, release/4.11.0 |
|
#
7164e8f2 |
| 11-Jan-2005 |
Poul-Henning Kamp <phk@FreeBSD.org> |
Silently ignore forced argument to unmount.
|
#
d167cf6f |
| 06-Jan-2005 |
Warner Losh <imp@FreeBSD.org> |
/* -> /*- for copyright notices, minor format tweaks as necessary
|
#
59f69ba4 |
| 04-Jan-2005 |
Poul-Henning Kamp <phk@FreeBSD.org> |
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
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.
show more ...
|
#
a1f5fe15 |
| 06-Dec-2004 |
Poul-Henning Kamp <phk@FreeBSD.org> |
Use vfs_mountedfrom() and rely on vfs_mount.c to call VFS_STATFS()
|
#
74331236 |
| 05-Dec-2004 |
Poul-Henning Kamp <phk@FreeBSD.org> |
VFS_STATFS(mp, ...) is mostly called with &mp->mnt_stat, but a few cases doesn't. Most of the implementations have grown weeds for this so they copy some fields from mnt_stat if the passed argument
VFS_STATFS(mp, ...) is mostly called with &mp->mnt_stat, but a few cases doesn't. Most of the implementations have grown weeds for this so they copy some fields from mnt_stat if the passed argument isn't that.
Fix this the cleaner way: Always call the implementation on mnt_stat and copy that in toto to the VFS_STATFS argument if different.
show more ...
|
#
ce59d214 |
| 26-Nov-2004 |
Poul-Henning Kamp <phk@FreeBSD.org> |
Ignore MNT_NODEV, it is implicit in choice of filesystem these days.
|
#
b0aed526 |
| 09-Nov-2004 |
Poul-Henning Kamp <phk@FreeBSD.org> |
Refuse attemps to mount root filesystem
|
Revision tags: release/5.3.0_cvs, release/5.3.0 |
|
#
45628dd3 |
| 28-Oct-2004 |
Poul-Henning Kamp <phk@FreeBSD.org> |
What can I say: don't allow people to mount DEVFS with option "nodev".
|
#
5e8c582a |
| 31-Jul-2004 |
Poul-Henning Kamp <phk@FreeBSD.org> |
Put a version element in the VFS filesystem configuration structure and refuse initializing filesystems with a wrong version. This will aid maintenance activites on the 5-stable branch.
s/vfs_mount
Put a version element in the VFS filesystem configuration structure and refuse initializing filesystems with a wrong version. This will aid maintenance activites on the 5-stable branch.
s/vfs_mount/vfs_omount/
s/vfs_nmount/vfs_mount/
Name our filesystems mount function consistently.
Eliminate the namiedata argument to both vfs_mount and vfs_omount. It was originally there to save stack space. A few places abused it to get hold of some credentials to pass around. Effectively it is unused.
Reorganize the root filesystem selection code.
show more ...
|
#
f257b7a5 |
| 12-Jul-2004 |
Alfred Perlstein <alfred@FreeBSD.org> |
Make VFS_ROOT() and vflush() take a thread argument. This is to allow filesystems to decide based on the passed thread which vnode to return. Several filesystems used curthread, they now use the pass
Make VFS_ROOT() and vflush() take a thread argument. This is to allow filesystems to decide based on the passed thread which vnode to return. Several filesystems used curthread, they now use the passed thread.
show more ...
|
Revision tags: release/4.10.0_cvs, release/4.10.0, release/5.2.1_cvs, release/5.2.1, release/5.2.0_cvs, release/5.2.0, release/4.9.0_cvs, release/4.9.0 |
|
#
7652131b |
| 12-Jun-2003 |
Poul-Henning Kamp <phk@FreeBSD.org> |
Initialize struct vfsops C99-sparsely.
Submitted by: hmp Reviewed by: phk
|
Revision tags: release/5.1.0_cvs, release/5.1.0, release/4.8.0_cvs, release/4.8.0 |
|
#
c162e9c2 |
| 11-Mar-2003 |
Alexander Kabaev <kan@FreeBSD.org> |
Rename vfs_stdsync function to vfs_stdnosync which matches more closely what function is really doing. Update all existing consumers to use the new name.
Introduce a new vfs_stdsync function, which
Rename vfs_stdsync function to vfs_stdnosync which matches more closely what function is really doing. Update all existing consumers to use the new name.
Introduce a new vfs_stdsync function, which iterates over mount point's vnodes and call FSYNC on each one of them in turn.
Make nwfs and smbfs use this new function instead of rolling their own identical sync implementations.
Reviewed by: jeff
show more ...
|
#
a163d034 |
| 19-Feb-2003 |
Warner Losh <imp@FreeBSD.org> |
Back out M_* changes, per decision of the TRB.
Approved by: trb
|
#
6718b083 |
| 29-Jan-2003 |
Poul-Henning Kamp <phk@FreeBSD.org> |
NODEVFS cleanup: remove #ifdefs.
|
#
44956c98 |
| 21-Jan-2003 |
Alfred Perlstein <alfred@FreeBSD.org> |
Remove M_TRYWAIT/M_WAITOK/M_WAIT. Callers should use 0. Merge M_NOWAIT/M_DONTWAIT into a single flag M_NOWAIT.
|
Revision tags: release/5.0.0_cvs, release/5.0.0 |
|
#
990b4b2d |
| 09-Dec-2002 |
Robert Watson <rwatson@FreeBSD.org> |
Remove dm_root entry from struct devfs_mount. It's never set, and is unused. Replace it with a dm_mount back-pointer to the struct mount that the devfs_mount is associated with. Export that pointe
Remove dm_root entry from struct devfs_mount. It's never set, and is unused. Replace it with a dm_mount back-pointer to the struct mount that the devfs_mount is associated with. Export that pointer to MAC Framework entry points, where all current policies don't use the pointer. This permits the SEBSD port of SELinux's FLASK/TE to compile out-of-the-box on 5.0-CURRENT with full file system labeling support.
Approved by: re (murray) Obtained from: TrustedBSD Project Sponsored by: DARPA, Network Associates Laboratories
show more ...
|