summaryrefslogtreecommitdiffstats
path: root/sys/fs
Commit message (Collapse)AuthorAgeFilesLines
* #if 0 out pfs_null() to silence the warning about it not being referenced.des2001-06-151-0/+2
|
* Fix warning: 568: warning: `portal_badop' defined but not usedpeter2001-06-151-13/+0
|
* Fix warning (exposed NetBSD code):peter2001-06-151-1/+1
| | | | 94: warning: `ntfs_bmap' declared `static' but never defined
* Fix warnings (mostly harmless, due to struct bio being embedded in buf):peter2001-06-151-2/+2
| | | | | 738: warning: passing arg 1 of `biodone' from incompatible pointer type 745: warning: passing arg 1 of `biodone' from incompatible pointer type
* Fix warning: 552: warning: `fdesc_badop' defined but not usedpeter2001-06-151-12/+0
|
* Warning fix: coda_fbsd.c:113: warning: unused variable `ret'peter2001-06-151-1/+0
|
* Coda do not call vop_defaultop(), so add nesessary calls for VM objects.bp2001-06-141-0/+3
| | | | | Submitted by: Greg Troxel <gdt@ir.bbn.com> MFC after: 2 days
* the last argument to copyinstr is of t ype size_t, not u_intmjacob2001-06-131-3/+3
|
* With this commit, I hereby pronounce gensetdefs past its use-by date.peter2001-06-134-7/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replace the a.out emulation of 'struct linker_set' with something a little more flexible. <sys/linker_set.h> now provides macros for accessing elements and completely hides the implementation. The linker_set.h macros have been on the back burner in various forms since 1998 and has ideas and code from Mike Smith (SET_FOREACH()), John Polstra (ELF clue) and myself (cleaned up API and the conversion of the rest of the kernel to use it). The macros declare a strongly typed set. They return elements with the type that you declare the set with, rather than a generic void *. For ELF, we use the magic ld symbols (__start_<setname> and __stop_<setname>). Thanks to Richard Henderson <rth@redhat.com> for the trick about how to force ld to provide them for kld's. For a.out, we use the old linker_set struct. NOTE: the item lists are no longer null terminated. This is why the code impact is high in certain areas. The runtime linker has a new method to find the linker set boundaries depending on which backend format is in use. linker sets are still module/kld unfriendly and should never be used for anything that may be modular one day. Reviewed by: eivind
* For some reason, though the module builds just fine without <sys/lock.h>,des2001-06-113-0/+3
| | | | LINT fails to build without it.
* Bail out if the fill function failed.des2001-06-101-0/+10
|
* Whoops, some of my test code snuck in here.des2001-06-101-1/+1
|
* Argh. Fix braino in previous commit.des2001-06-101-1/+1
|
* Add a 'flags' argument to the PFS_PROCDIR macro.des2001-06-101-2/+2
|
* Add support for process-dependent directories. This means that save fordes2001-06-106-147/+195
| | | | the lack of a man page, pseudofs is mostly complete now.
* Blah, not my day. This file needs <sys/mutex.h> now.des2001-06-101-0/+1
|
* Remember to unlock the process pfind() returns.des2001-06-101-1/+5
|
* Add missing #include of <sys/mutex.h>.des2001-06-103-0/+3
|
* Catch up with the change in sbuf_new's prototype.des2001-06-101-8/+8
|
* The kq write filter was hooked up to the wrong socket, and thus wasjlemon2001-06-061-4/+11
| | | | | | | not behaving correctly. Fix by attaching to the correct socket. Also call so{rw}wakeup in addition to the fifo wakeup, so that any kqfilters attached to the socket buffer get poked.
* Lock VM Giant prior to locking a vm map.tanimura2001-06-061-0/+7
| | | | | | Spotted by: Daniel Rock <D.Rock@t-online.de> Tested by: David Wolfskill <david@catwhisker.org>, Sean Eric Fagan <sef@kithrup.com>
* Now works again and as a module and with devfs.shafeeq2001-06-053-9/+73
| | | | Used the bpf & tun drivers as examples as to what is necessary for devfs.
* Support /dev/tun cloning. Ansify if_tun.c while I'm there.brian2001-06-011-1/+2
| | | | | | | | | | | | | | Only tun0 -> tun32767 may now be opened as struct ifnet's if_unit is a short. It's now possible to open /dev/tun and get a handle back for an available tun device (use devname to find out what you got). The implementation uses rman by popular demand (and against my judgement) to track opened devices and uses the new dev_depends() to ensure that all make_dev()d devices go away before the module is unloaded. Reviewed by: phk
* - VFS_SET(msdos) -> VFS_SET(msdosfs)ru2001-06-011-1/+1
| | | | | | - msdos.ko -> msdosfs.ko - mount_msdos(8) -> mount_msdosfs(8) - "msdos" -> "msdosfs" compatibility glue in mount(8)
* Don't copy the trailing zero in readlink, it confuses namei().phk2001-05-261-1/+1
| | | | PR: 27656
* - sys/n[tw]fs moved to sys/fs/n[tw]fsru2001-05-2612-41/+41
| | | | - /usr/include/n[tw]fs moved to /usr/include/fs/n[tw]fs
* Create a general facility for making dev_t's depend on anotherphk2001-05-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | dev_t. The dev_depends(dev_t, dev_t) function is for tying them to each other. When destroy_dev() is called on a dev_t, all dev_t's depending on it will also be destroyed (depth first order). Rewrite the make_dev_alias() to use this dependency facility. kern/subr_disk.c: Make the disk mini-layer use dependencies to make sure all relevant dev_t's are removed when the disk disappears. Make the disk mini-layer precreate some magic sub devices which the disk/slice/label code expects to be there. kern/subr_disklabel.c: Remove some now unneeded variables. kern/subr_diskmbr.c: Remove some ancient, commented out code. kern/subr_diskslice.c: Minor cleanup. Use name from dev_t instead of dsname()
* o Merge contents of struct pcred into struct ucred. Specifically, add therwatson2001-05-252-6/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | real uid, saved uid, real gid, and saved gid to ucred, as well as the pcred->pc_uidinfo, which was associated with the real uid, only rename it to cr_ruidinfo so as not to conflict with cr_uidinfo, which corresponds to the effective uid. o Remove p_cred from struct proc; add p_ucred to struct proc, replacing original macro that pointed. p->p_ucred to p->p_cred->pc_ucred. o Universally update code so that it makes use of ucred instead of pcred, p->p_ucred instead of p->p_pcred, cr_ruidinfo instead of p_uidinfo, cr_{r,sv}{u,g}id instead of p_*, etc. o Remove pcred0 and its initialization from init_main.c; initialize cr_ruidinfo there. o Restruction many credential modification chunks to always crdup while we figure out locking and optimizations; generally speaking, this means moving to a structure like this: newcred = crdup(oldcred); ... p->p_ucred = newcred; crfree(oldcred); It's not race-free, but better than nothing. There are also races in sys_process.c, all inter-process authorization, fork, exec, and exit. o Remove sigio->sio_ruid since sigio->sio_ucred now contains the ruid; remove comments indicating that the old arrangement was a problem. o Restructure exec1() a little to use newcred/oldcred arrangement, and use improved uid management primitives. o Clean up exit1() so as to do less work in credential cleanup due to pcred removal. o Clean up fork1() so as to do less work in credential cleanup and allocation. o Clean up ktrcanset() to take into account changes, and move to using suser_xxx() instead of performing a direct uid==0 comparision. o Improve commenting in various kern_prot.c credential modification calls to better document current behavior. In a couple of places, current behavior is a little questionable and we need to check POSIX.1 to make sure it's "right". More commenting work still remains to be done. o Update credential management calls, such as crfree(), to take into account new ruidinfo reference. o Modify or add the following uid and gid helper routines: change_euid() change_egid() change_ruid() change_rgid() change_svuid() change_svgid() In each case, the call now acts on a credential not a process, and as such no longer requires more complicated process locking/etc. They now assume the caller will do any necessary allocation of an exclusive credential reference. Each is commented to document its reference requirements. o CANSIGIO() is simplified to require only credentials, not processes and pcreds. o Remove lots of (p_pcred==NULL) checks. o Add an XXX to authorization code in nfs_lock.c, since it's questionable, and needs to be considered carefully. o Simplify posix4 authorization code to require only credentials, not processes and pcreds. Note that this authorization, as well as CANSIGIO(), needs to be updated to use the p_cansignal() and p_cansched() centralized authorization routines, as they currently do not take into account some desirable restrictions that are handled by the centralized routines, as well as being inconsistent with other similar authorization instances. o Update libkvm to take these changes into account. Obtained from: TrustedBSD Project Reviewed by: green, bde, jhb, freebsd-arch, freebsd-audit
* - sys/msdosfs moved to sys/fs/msdosfsru2001-05-256-27/+27
| | | | | - msdos.ko renamed to msdosfs.ko - /usr/include/msdosfs moved to /usr/include/fs/msdosfs
* Actually rename FDESC, PORTAL, UMAP and UNION file systems.ru2001-05-244-4/+4
| | | | OK'ed by: bp
* mount_umap(8) -> mount_umapfs(8).ru2001-05-241-1/+1
|
* mount_null(8) -> mount_nullfs(8).ru2001-05-241-4/+4
|
* Don't acquire/release Giant around some of the places that need it injhb2001-05-231-2/+1
| | | | spec_getpages(). Instead, assert that Giant is held by the caller.
* Change the way deletes are managed in DEVFS.phk2001-05-232-42/+114
| | | | | | | This fixes a number of warnings relating to removed cloned devices. It also makes it possible to recreate deleted devices with mknod(2). The major/minor arguments are ignored.
* - FDESC, FIFO, NULL, PORTAL, PROC, UMAP and UNION fileru2001-05-2328-29/+29
| | | | | | | | | | | | | | | systems were repo-copied from sys/miscfs to sys/fs. - Renamed the following file systems and their modules: fdesc -> fdescfs, portal -> portalfs, union -> unionfs. - Renamed corresponding kernel options: FDESC -> FDESCFS, PORTAL -> PORTALFS, UNION -> UNIONFS. - Install header files for the above file systems. - Removed bogus -I${.CURDIR}/../../sys CFLAGS from userland Makefiles.
* Sort includes from previous commit.jhb2001-05-211-1/+1
|
* Introduce a global lock for the vm subsystem (vm_mtx).alfred2001-05-195-1/+18
| | | | | | | | | | | | | | | | | | | vm_mtx does not recurse and is required for most low level vm operations. faults can not be taken without holding Giant. Memory subsystems can now call the base page allocators safely. Almost all atomic ops were removed as they are covered under the vm mutex. Alpha and ia64 now need to catch up to i386's trap handlers. FFS and NFS have been tested, other filesystems will need minor changes (grabbing the vm lock when twiddling page properties). Reviewed (partially) by: jake, jhb
* Currently there is no way to tell if write operation invoked viabp2001-05-181-1/+1
| | | | | | | vn_start_write() on the given vnode will be successful. VOP_LEASE() may help to solve this problem, but its return value ignored nearly everywhere. For now just assume that the missing upper layer on write means insufficient access rights (which is correct for most cases).
* VOP getwritemount() can be invoked on vnodes with VFREE flag set (used inbp2001-05-171-4/+12
| | | | snapshots code). At this point upper vp may not exist.
* Use vop_*vobject() VOPs to get reference to VM object from upper or lower fs.bp2001-05-173-60/+60
|
* Do not leave an extra reference on vnode.bp2001-05-171-6/+2
| | | | | | PR: kern/27250 Submitted by: "Vladimir B. Grebenschikov" <vova@express.ru> MFC after: 2 weeks
* Change the second argument of vflush() to an integer that specifiesiedowse2001-05-1613-143/+31
| | | | | | | | | | | | | | | | | | | | the number of references on the filesystem root vnode to be both expected and released. Many filesystems hold an extra reference on the filesystem root vnode, which must be accounted for when determining if the filesystem is busy and then released if it isn't busy. The old `skipvp' approach required individual filesystem xxx_unmount functions to re-implement much of vflush()'s logic to deal with the root vnode. All 9 filesystems that hold an extra reference on the root vnode got the logic wrong in the case of forced unmounts, so `umount -f' would always fail if there were any extra root vnode references. Fix this issue centrally in vflush(), now that we can. This commit also fixes a vnode reference leak in devfs, which could result in idle devfs filesystems that refuse to unmount. Reviewed by: phk, bp
* After a successfull poll of the cloning functions, match on thephk2001-05-141-14/+6
| | | | | | | returned dev_t rather than the original name. This allows cloning from one name to another which is useful for /dev/tty and later for the pty's.
* Convert DEVFS from an "opt-in" to an "opt-out" option.phk2001-05-133-5/+8
| | | | | | | | | If for some reason DEVFS is undesired, the "NODEVFS" option is needed now. Pending any significant issues, DEVFS will be made mandatory in -current on july 1st so that we can start reaping the full benefits of having it.
* GC prototype for procfs_bmap() missed during a previous commit.jhb2001-05-111-1/+0
|
* Remove unneeded devfs_badop()phk2001-05-061-10/+0
| | | | Noticed by: rwatson
* Convert vnode_pager_freepage() to vm_free_page().bp2001-05-031-2/+2
| | | | Forgotten by: alfred
* Implement vop_std{get|put}pages() and add them to the default vop[].phk2001-05-0110-161/+8
| | | | | Un-copy&paste all the VOP_{GET|PUT}PAGES() functions which do nothing but the default.
* Undo part of the tangle of having sys/lock.h and sys/mutex.h included inmarkm2001-05-0132-123/+186
| | | | | | | | | | | other "system" header files. Also help the deprecation of lockmgr.h by making it a sub-include of sys/lock.h and removing sys/lockmgr.h form kernel .c files. Sort sys/*.h includes where possible in affected files. OK'ed by: bde (with reservations)
* Uncut&paste som bogus use of VOP_BMAP in cd9660::VOP_STRATEGY.phk2001-04-301-10/+4
| | | | XXX mark some stuff which looks like further cut&paste junk.
OpenPOWER on IntegriCloud