summaryrefslogtreecommitdiffstats
path: root/sys/kern/vfs_lookup.c
Commit message (Collapse)AuthorAgeFilesLines
* Add new flag PDIRUNLOCK to the component.cn_flags which should be set bybp2000-09-171-2/+7
| | | | | | | | | | | | | | | | | | filesystem lookup() routine if it unlocks parent directory. This flag should be carefully tracked by filesystems if they want to work properly with nullfs and other stacked filesystems. VFS takes advantage of this flag to perform symantically correct usage of vrele() instead of vput() if parent directory already unlocked. If filesystem fails to track this flag then previous codepath in VFS left unchanged. Convert UFS code to set PDIRUNLOCK flag if necessary. Other filesystmes will be changed after some period of testing. Reviewed in general by: mckusick, dillon, adrian Obtained from: NetBSD
* Unlock current directory when calling VFS_ROOT() because underlyingbp2000-09-131-3/+10
| | | | | | | filesystem may hold the lock. Otherwise unavoidable deadlock will occur. This shouldn't have any side effects as long as we hold vfs lock. Obtained from: NetBSD
* Introduce NDFREE (and remove VOP_ABORTOP)eivind1999-12-151-3/+4
|
* Before we start to mess with the VFS name-cache clean things up a little bit:phk1999-10-031-8/+1
| | | | Isolate the namecache in its own file, and give it a dedicated malloc type.
* Fix a hole in jail(2).phk1999-09-251-1/+6
| | | | Noticed by: Alexander Bezroutchko <abb@zenon.net>
* $Id$ -> $FreeBSD$peter1999-08-281-1/+1
|
* Add sysctl and support code to allow directories to be VMIO'd. The defaultalc1999-07-261-3/+3
| | | | | | setting for the sysctl is OFF, which is the historical operation. Submitted by: dillon
* Fix warnings in preparation for adding -Wall -Wcast-qual to thedillon1999-01-281-2/+2
| | | | kernel compile
* Fix warnings in preparation for adding -Wall -Wcast-qual to thedillon1999-01-271-2/+2
| | | | kernel compile
* KNFize, by bde.eivind1999-01-101-4/+4
|
* Split DIAGNOSTIC -> DIAGNOSTIC, INVARIANTS, and INVARIANT_SUPPORT aseivind1999-01-081-21/+10
| | | | | | | | | discussed on -hackers. Introduce 'KASSERT(assertion, ("panic message", args))' for simple check + panic. Reviewed by: msmith
* Remove the 'waslocked' parameter to vfs_object_create().eivind1999-01-051-4/+6
|
* This commit fixes various 64bit portability problems required fordfr1998-06-071-3/+3
| | | | | | | | | | FreeBSD/alpha. The most significant item is to change the command argument to ioctl functions from int to u_long. This change brings us inline with various other BSD versions. Driver writers may like to use (__FreeBSD_version == 300003) to detect this change. The prototype FreeBSD/alpha machdep will follow in a couple of days time.
* New mount option nosymfollow. If enabled, the kernel lookup()wosch1998-04-081-1/+5
| | | | | function will not follow symbolic links on the mounted file system and return EACCES (Permission denied).
* Make the rootdir handling more consistent. Now, processes alwaysdyson1998-02-151-3/+3
| | | | | | have a root vnode associated with them, and no special checks for the null case are needed. Submitted by: terry@freebsd.org
* Back out DIAGNOSTIC changes.eivind1998-02-061-2/+1
|
* Turn DIAGNOSTIC into a new-style option.eivind1998-02-041-1/+2
|
* Make our v_usecount vnode reference count work identically to thedyson1998-01-061-4/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | original BSD code. The association between the vnode and the vm_object no longer includes reference counts. The major difference is that vm_object's are no longer freed gratuitiously from the vnode, and so once an object is created for the vnode, it will last as long as the vnode does. When a vnode object reference count is incremented, then the underlying vnode reference count is incremented also. The two "objects" are now more intimately related, and so the interactions are now much less complex. When vnodes are now normally placed onto the free queue with an object still attached. The rundown of the object happens at vnode rundown time, and happens with exactly the same filesystem semantics of the original VFS code. There is absolutely no need for vnode_pager_uncache and other travesties like that anymore. A side-effect of these changes is that SMP locking should be much simpler, the I/O copyin/copyout optimizations work, NFS should be more ponderable, and further work on layered filesystems should be less frustrating, because of the totally coherent management of the vnode objects and vnodes. Please be careful with your system while running this code, but I would greatly appreciate feedback as soon a reasonably possible.
* Lots of improvements, including restructring the caching and managementdyson1997-12-291-1/+7
| | | | | | | | | | | | | | of vnodes and objects. There are some metadata performance improvements that come along with this. There are also a few prototypes added when the need is noticed. Changes include: 1) Cleaning up vref, vget. 2) Removal of the object cache. 3) Nuke vnode_pager_uncache and friends, because they aren't needed anymore. 4) Correct some missing LK_RETRY's in vn_lock. 5) Correct the page range in the code for msync. Be gentle, and please give me feedback asap.
* Unspammed nested include of <vm/vm_zone.h>.bde1997-12-271-2/+3
|
* Change the M_NAMEI allocations to use the zone allocator. This changedyson1997-09-211-10/+10
| | | | | | | | plus the previous changes to use the zone allocator decrease the useage of malloc by half. The Zone allocator will be upgradeable to be able to use per CPU-pools, and has more intelligent usage of SPLs. Additionally, it has reasonable stats gathering capabilities, while making most calls inline.
* Removed unused #includes.bde1997-09-021-4/+1
|
* [Previous comment was incorrect for these files]dfr1997-04-041-1/+1
| | | | | Added calls to VFS lock debugging macros to make fixing filesystems' locking easier.
* Add a function vop_sharedlock which a copy of vop_nolock without thedfr1997-04-041-1/+7
| | | | | | | implementation #ifdef out. This can be used for now by NFS. As soon as all the other filesystems' locking is fixed, this can go away. Print the vnode address in vprint for easier debugging.
* Back out part 1 of the MCFH that changed $Id$ to $FreeBSD$. We are notpeter1997-02-221-1/+1
| | | | ready for it yet.
* Fixed namei caching for LOOKUPs. It was broken for lstat() and olstat().bde1997-02-181-1/+2
| | | | | | | | | | | Successful lstat()s purged an existing entry as well as not caching the result. This bug was introduced in Lite1 by setting the LOCKPARENT flag for [o]lstat() in order to support the inherit-attributes-from-parent- directory misfeature for symlinks. LOCKPARENT was previously only set for CREATEs and DELETEs. It is now set for LOOKUPs, but only for [o]lstat(), so the problem wasn't very noticeable.
* This is the kernel Lite/2 commit. There are some requisite userlanddyson1997-02-101-26/+26
| | | | | | | | | | | | | | | changes, so don't expect to be able to run the kernel as-is (very well) without the appropriate Lite/2 userland changes. The system boots and can mount UFS filesystems. Untested: ext2fs, msdosfs, NFS Known problems: Incorrect Berkeley ID strings in some files. Mount_std mounts will not work until the getfsent library routine is changed. Reviewed by: various people Submitted by: Jeffery Hsu <hsu@freebsd.org>
* Make the long-awaited change from $Id$ to $FreeBSD$jkh1997-01-141-1/+1
| | | | | | | | This will make a number of things easier in the future, as well as (finally!) avoiding the Id-smashing problem which has plagued developers for so long. Boy, I'm glad we're not using sup anymore. This update would have been insane otherwise.
* Don't allow empty pathnames. POSIX standard.bde1996-12-011-1/+8
| | | | | | | | Most of the standard utilities that depended on (or were broken in a different way by) the old behaviour of interpreting "" as "." were fixed a year or two ago. There is still a fairly harmless bug in tar and a harmless bug in gzip. Tar apparently replaces "/" by "" when it strips leading slashes.
* Converted two options over to the new scheme: USER_LDT and KTRACE.wollman1996-01-031-1/+3
|
* Moved the filesystem read-only check out of the syscalls and into thedg1995-10-221-27/+13
| | | | | | | | filesystem layer, as was done in lite-2. Merged in some other cosmetic changes while I was at it. Rewrote most of msdosfs_access() to be more like ufs_access() and to include the FS read-only check. Obtained from: partially from 4.4BSD-lite2
* Add support for amd direct maps.dfr1995-08-241-18/+19
| | | | Reviewed by: Thomas Graichen <graichen@sirius.physik.fu-berlin.de>
* Ignore trailing slashes in pathnames that "refer to a directory",bde1995-07-311-2/+36
| | | | | | | | | | | as is required to be POSIXLY_CORRECT and "right". I interpret "referring to a directory" as being a directory or becoming a directory. E.g., the trailing slashes in mkdir("/nonesuch/"), rename("/tmp", /nonesuch/") and link("/tmp", "/root_can_like_dirs/") are ignored because the target will become a directory if the syscall succeeds. A trailing slash on a symlink causes the symlink to be followed (this is a bug if the symlink doesn't point to a directory; fix later).
* Remove trailing whitespace.rgrimes1995-05-301-3/+3
|
* Use tsleep() rather than sleep so that 'ps' is more informative aboutdg1994-10-061-2/+2
| | | | the wait.
* Moved the "relookup" routine into vfs_lookup.c from ufs/ufs/ufs_vnops.c.phk1994-09-271-5/+160
| | | | Several FS's use this, so it doesn't belong in ufs. (unionfs, msdosfs and ufs)
* 1) cleaned up after Garrett - fixed more redundant declarations, changeddg1994-08-201-3/+3
| | | | | | | | use of timeout_t -> timeout_func_t in aha1542 and aha1742 drivers. 2) fix a bug in the portalfs that was uncovered by better prototyping - specifically, the time must be converted from timeval to timespec before storing in va_atime. 3) fixed/added some miscellaneous prototypes
* Fix up some sloppy coding practices:wollman1994-08-181-1/+2
| | | | | | | | | | | | - Delete redundant declarations. - Add -Wredundant-declarations to Makefile.i386 so they don't come back. - Delete sloppy COMMON-style declarations of uninitialized data in header files. - Add a few prototypes. - Clean up warnings resulting from the above. NB: ioconf.c will still generate a redundant-declaration warning, which is unavoidable unless somebody volunteers to make `config' smarter.
* Added $Id$dg1994-08-021-0/+1
|
* BSD 4.4 Lite Kernel Sourcesrgrimes1994-05-241-0/+506
OpenPOWER on IntegriCloud