#
267654 |
|
19-Jun-2014 |
gjb |
Copy stable/9 to releng/9.3 as part of the 9.3-RELEASE cycle.
Approved by: re (implicit) Sponsored by: The FreeBSD Foundation |
#
225736 |
|
22-Sep-2011 |
kensmith |
Copy head to stable/9 as part of 9.0-RELEASE release cycle.
Approved by: re (implicit)
|
#
224810 |
|
13-Aug-2011 |
jonathan |
Allow Capsicum capabilities to delegate constrained access to file system subtrees to sandboxed processes.
- Use of absolute paths and '..' are limited in capability mode. - Use of absolute paths and '..' are limited when looking up relative to a capability. - When a name lookup is performed, identify what operation is to be performed (such as CAP_MKDIR) as well as check for CAP_LOOKUP.
With these constraints, openat() and friends are now safe in capability mode, and can then be used by code such as the capability-mode runtime linker.
Approved by: re (bz), mentor (rwatson) Sponsored by: Google Inc
|
#
195508 |
|
09-Jul-2009 |
kib |
Extend the cn_flags field of the struct componentname to 64 bits to have more space for the flags, that is too close to be exhausted. While changing the KBI for name(9), use unsigned int for symlinks count.
Suggested by: rwatson Approved by: re (kensmith)
|
#
193028 |
|
29-May-2009 |
des |
Let vfs_lookup() return ENOTDIR if the path has a trailing slash and the last component is a symlink to something that isn't a directory.
We introduce a new namei flag, TRAILINGSLASH, which is set by lookup() if the last component is followed by a slash. The trailing slash is then stripped, as before. If the final component is a symlink, lookup() will return to namei(), which will expand the symlink and call lookup() with the new path. When all symlinks have been resolved, lookup() checks if the TRAILINGSLASH flag is set, and if it is, and the vnode it ended up with is not a directory, it returns ENOTDIR.
PR: kern/21768 Submitted by: Eygene Ryabinkin <rea-fbsd@codelabs.ru> MFC after: 3 weeks
|
#
192900 |
|
27-May-2009 |
des |
Expand namei flag definitions to the full eight nybbles.
MFC after: 3 weeks
|
#
185029 |
|
17-Nov-2008 |
pjd |
Update ZFS from version 6 to 13 and bring some FreeBSD-specific changes.
This bring huge amount of changes, I'll enumerate only user-visible changes:
- Delegated Administration
Allows regular users to perform ZFS operations, like file system creation, snapshot creation, etc.
- L2ARC
Level 2 cache for ZFS - allows to use additional disks for cache. Huge performance improvements mostly for random read of mostly static content.
- slog
Allow to use additional disks for ZFS Intent Log to speed up operations like fsync(2).
- vfs.zfs.super_owner
Allows regular users to perform privileged operations on files stored on ZFS file systems owned by him. Very careful with this one.
- chflags(2)
Not all the flags are supported. This still needs work.
- ZFSBoot
Support to boot off of ZFS pool. Not finished, AFAIK.
Submitted by: dfr
- Snapshot properties
- New failure modes
Before if write requested failed, system paniced. Now one can select from one of three failure modes: - panic - panic on write error - wait - wait for disk to reappear - continue - serve read requests if possible, block write requests
- Refquota, refreservation properties
Just quota and reservation properties, but don't count space consumed by children file systems, clones and snapshots.
- Sparse volumes
ZVOLs that don't reserve space in the pool.
- External attributes
Compatible with extattr(2).
- NFSv4-ACLs
Not sure about the status, might not be complete yet.
Submitted by: trasz
- Creation-time properties
- Regression tests for zpool(8) command.
Obtained from: OpenSolaris
|
#
177785 |
|
31-Mar-2008 |
kib |
Add the support for the AT_FDCWD and fd-relative name lookups to the namei(9).
Based on the submission by rdivacky, sponsored by Google Summer of Code 2007 Reviewed by: rwatson, rdivacky Tested by: pho
|
#
155334 |
|
05-Feb-2006 |
rwatson |
Add AUDITVNODE[12] flags to namei(), which cause namei() to audit path and vnode attribute information for looked up vnodes during the lookup operation. This will allow consumers of namei() to specify that this information be added to the in-process audit record.
Submitted by: wsalamon Obtained from: TrustedBSD Project
|
#
145583 |
|
27-Apr-2005 |
jeff |
- Add an ISOPEN flag that filesystems can use to determine if a namei() caller will be interested in the actual data contents of a vnode after a successful lookup. This intended to help deal with lifetime issues for device cloning and to alert autofs when filesystems need to be mounted.
|
#
144834 |
|
09-Apr-2005 |
jeff |
- Remove the namei NOOBJ flag. It is meaningless now.
Sponsored by: Isilon Systems, Inc.
|
#
144285 |
|
29-Mar-2005 |
jeff |
- Add a lock flag to the component name so that namei() may request a shared lock. Filesystems are not required to honor this request.
Sponsored by: Isilon Systems, Inc.
|
#
144202 |
|
28-Mar-2005 |
jeff |
- Remove PDIRUNLOCK, it will soon be unused in every filesystems. The only case where filesystems legitimately need to unlock the directory vp is in the DOTDOT case, which we can explicitly check for in lookup(). Furthermore, allowing filesystems to unlock dvp can lead to lock order reversals in lookup() when we vrele the dvp while the child is still locked.
Sponsored by: Isilon Systems, Inc.
|
#
140698 |
|
24-Jan-2005 |
jeff |
- Add two new flags to the nd structure. MPSAFE indicates that the caller may not be holding Giant, and namei() should acquire it as necessary. HASGIANT is used to indicate when namei() is returning with a reference to a vnode that requires giant, and giant is locked. - Add the macro NDHASGIANT() which can be used in conjunction with VFS_UNLOCK_GIANT() in callers who have marked the nd with MPSAFE.
Sponsored By: Isilon Systems, Inc.
|
#
139825 |
|
07-Jan-2005 |
imp |
/* -> /*- for license, minor formatting changes
|
#
127976 |
|
07-Apr-2004 |
imp |
Remove advertising clause from University of California Regent's license, per letter dated July 22, 1999.
Approved by: core
|
#
118607 |
|
07-Aug-2003 |
jhb |
Consistently use the BSD u_int and u_short instead of the SYSV uint and ushort. In most of these files, there was a mixture of both styles and this change just makes them self-consistent.
Requested by: bde (kern_ktrace.c)
|
#
109171 |
|
13-Jan-2003 |
phk |
Remove four members of struct nameidata which have been commented out since rev 1.1 (24 may 1994) of this file.
Add a nail to the K&R coffin by removing the #ifdef'ed K&R function declaration for NDINIT.
|
#
108470 |
|
30-Dec-2002 |
schweikh |
Fix typos, mostly s/ an / a / where appropriate and a few s/an/and/ Add FreeBSD Id tag where missing.
|
#
105479 |
|
19-Oct-2002 |
rwatson |
Add a new 'NOMACCHECK' flag to namei() NDINIT flags, which permits the caller to indicate that MAC checks are not required for the lookup. Similar to IO_NOMACCHECK for vn_rdwr(), this indicates that the caller has already performed all required protections and that this is an internally generated operation. This will be used by the NFS server code, as we don't currently enforce MAC protections against requests delivered via NFS.
While here, add NOCROSSMOUNT to PARAMASK; apparently this was used at one point for name lookup flag checking, but isn't any longer or it would have triggered from the NFS server code passing it to indicate that mountpoints shouldn't be crossed in lookups.
Approved by: re Obtained from: TrustedBSD Project Sponsored by: DARPA, Network Associates Laboratories
|
#
96755 |
|
16-May-2002 |
trhodes |
More s/file system/filesystem/g
|
#
92719 |
|
19-Mar-2002 |
alfred |
Remove __P
|
#
92130 |
|
12-Mar-2002 |
jeff |
This patch adds the "LOCKSHARED" option to namei which causes it to only acquire shared locks on leafs. The stat() and open() calls have been changed to make use of this new functionality. Using shared locks in these cases is sufficient and can significantly reduce their latency if IO is pending to these vnodes. Also, this reduces the number of exclusive locks that are floating around in the system, which helps reduce the number of deadlocks that occur.
A new kernel option "LOOKUP_SHARED" has been added. It defaults to off so this patch can be turned on for testing, and should eventually go away once it is proven to be stable. I have personally been running this patch for over a year now, so it is believed to be fully stable.
Reviewed by: jake, obrien Approved by: jake
|
#
84061 |
|
27-Sep-2001 |
luigi |
namei.h: move "struct componentname" definition outside "struct nameidata", and provide a valid STDC/C++ definition for function NDINIT
queue.h libkern.h: put explicit casts from void * in insque, remque and memset
(for the records, these changes are necessary to let the files compile with g++, which is used to build a FreeBSD module for "Click" -- see www.pdos.lcs.mit.edu/click/ . Given that they have zero impact on our code, it is worthwhile to have them in.
MFC after: 3 days
|
#
83366 |
|
12-Sep-2001 |
julian |
KSE Milestone 2 Note ALL MODULES MUST BE RECOMPILED make the kernel aware that there are smaller units of scheduling than the process. (but only allow one thread per process at this time). This is functionally equivalent to teh previousl -current except that there is a thread associated with each process.
Sorry john! (your next MFC will be a doosie!)
Reviewed by: peter@freebsd.org, dillon@freebsd.org
X-MFC after: ha ha ha ha
|
#
83045 |
|
04-Sep-2001 |
obrien |
style(9) the structure definitions.
|
#
65973 |
|
17-Sep-2000 |
bp |
Add new flag PDIRUNLOCK to the component.cn_flags which should be set by 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
|
#
55611 |
|
08-Jan-2000 |
eivind |
Change NDFREE() from a macro to a function for the time being; the macro version caused intolerable bloat (30k). I'm likely to revisit this with an attempt at a smarter macro.
Bloat noticed by: bde
|
#
55205 |
|
29-Dec-1999 |
peter |
Change #ifdef KERNEL to #ifdef _KERNEL in the public headers. "KERNEL" is an application space macro and the applications are supposed to be free to use it as they please (but cannot). This is consistant with the other BSD's who made this change quite some time ago. More commits to come.
|
#
54794 |
|
18-Dec-1999 |
eivind |
Do NOT unlock dvp if LOCKPARENT && vp == dvp. Does not affect any code presently in the tree.
|
#
54784 |
|
18-Dec-1999 |
eivind |
Make NDFREE unlock VP if appropriate and not asked not to, as documented in the manpage for namei(). This capability is not yet used attempted used anywhere in the source tree.
|
#
54655 |
|
15-Dec-1999 |
eivind |
Introduce NDFREE (and remove VOP_ABORTOP)
|
#
51906 |
|
03-Oct-1999 |
phk |
Before we start to mess with the VFS name-cache clean things up a little bit: Isolate the namecache in its own file, and give it a dedicated malloc type.
|
#
51649 |
|
25-Sep-1999 |
phk |
Fix a hole in jail(2).
Noticed by: Alexander Bezroutchko <abb@zenon.net>
|
#
50477 |
|
27-Aug-1999 |
peter |
$Id$ -> $FreeBSD$
|
#
36735 |
|
07-Jun-1998 |
dfr |
This commit fixes various 64bit portability problems required for 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.
|
#
34924 |
|
28-Mar-1998 |
bde |
Moved some #includes from <sys/param.h> nearer to where they are actually used.
|
#
32485 |
|
12-Jan-1998 |
phk |
Remove two non-global variables.
Found by: bde (one) Overlooked by: bde (one) :-)
|
#
32286 |
|
06-Jan-1998 |
dyson |
Make our v_usecount vnode reference count work identically to the 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.
|
#
29212 |
|
07-Sep-1997 |
bde |
Fixed formatting of FreeBSD changes.
|
#
29179 |
|
07-Sep-1997 |
bde |
Some staticized variables were still declared to be extern.
|
#
25718 |
|
11-May-1997 |
phk |
Make nc_flag and nc_nlen unsigned.
|
#
25453 |
|
04-May-1997 |
phk |
1. Add a {pointer, v_id} pair to the vnode to store the reference to the ".." vnode. This is cheaper storagewise than keeping it in the namecache, and it makes more sense since it's a 1:1 mapping.
2. Also handle the case of "." more intelligently rather than stuff the namecache with pointless entries.
3. Add two lists to the vnode and hang namecache entries which go from or to this vnode. When cleaning a vnode, delete all namecache entries it invalidates.
4. Never reuse namecache enties, malloc new ones when we need it, free old ones when they die. No longer a hard limit on how many we can have.
5. Remove the upper limit on namelength of namecache entries.
6. Make a global list for negative namecache entries, limit their number to a sysctl'able (debug.ncnegfactor) fraction of the total namecache. Currently the default fraction is 1/16th. (Suggestions for better default wanted!)
7. Assign v_id correctly in the face of 32bit rollover.
8. Remove the LRU list for namecache entries, not needed. Remove the #ifdef NCH_STATISTICS stuff, it's not needed either.
9. Use the vnode freelist as a true LRU list, also for namecache accesses.
10. Reuse vnodes more aggresively but also more selectively, if we can't reuse, malloc a new one. There is no longer a hard limit on their number, they grow to the point where we don't reuse potentially usable vnodes. A vnode will not get recycled if still has pages in core or if it is the source of namecache entries (Yes, this does indeed work :-) "." and ".." are not namecache entries any longer...)
11. Do not overload the v_id field in namecache entries with whiteout information, use a char sized flags field instead, so we can get rid of the vpid and v_id fields from the namecache struct. Since we're linked to the vnodes and purged when they're cleaned, we don't have to check the v_id any more.
12. NFS knew about the limitation on name length in the namecache, it shouldn't and doesn't now.
Bugs: The namecache statistics no longer includes the hits for ".." and "." hits.
Performance impact: Generally in the +/- 0.5% for "normal" workstations, but I hope this will allow the system to be selftuning over a bigger range of "special" applications. The case where RAM is available but unused for cache because we don't have any vnodes should be gone.
Future work: Straighten out the namecache statistics.
"desiredvnodes" is still used to (bogusly ?) size hash tables in the filesystems.
I have still to find a way to safely free unused vnodes back so their number can shrink when not needed.
There is a few uses of the v_id field left in the filesystems, scheduled for demolition at a later time.
Maybe a one slot cache for unused namecache entries should be implemented to decrease the malloc/free frequency.
|
#
22975 |
|
22-Feb-1997 |
peter |
Back out part 1 of the MCFH that changed $Id$ to $FreeBSD$. We are not ready for it yet.
|
#
21673 |
|
14-Jan-1997 |
jkh |
Make the long-awaited change from $Id$ to $FreeBSD$
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.
|
#
18027 |
|
03-Sep-1996 |
bde |
Changed type of ni_dirp in `struct namei' from caddr_t to `const char *' so that the compiler can see that it is OK to use const strings in NDINIT(). Some emulators want to use paths of the form "/compat/foo". Removed the casts that hid the non-problem. Didn't fix the missing consts in syscalls.master that hid the non-problem.
|
#
14512 |
|
11-Mar-1996 |
hsu |
Merge in Lite2: add whiteout flags to namei parameter descriptors add function prototype for relookup() Spruce up number formatting. Reviewed by: davidg & bde
|
#
13765 |
|
30-Jan-1996 |
mpp |
Fix a bunch of spelling errors in the comment fields of a bunch of system include files.
|
#
10358 |
|
28-Aug-1995 |
julian |
Reviewed by: julian with quick glances by bruce and others Submitted by: terry (terry lambert) This is a composite of 3 patch sets submitted by terry. they are: New low-level init code that supports loadbal modules better some cleanups in the namei code to help terry in 16-bit character support some changes to the mount-root code to make it a little more modular..
NOTE: mounting root off cdrom or NFS MIGHT be broken as I haven't been able to test those cases..
certainly mounting root of disk still works just fine.. mfs should work but is untested. (tomorrows task)
The low level init stuff includes a total rewrite of init_main.c to make it possible for new modules to have an init phase by simply adding an entry to a TEXT_SET (or is it DATA_SET) list. thus a new module can be added to the kernel without editing any other files other than the 'files' file.
|
#
9804 |
|
30-Jul-1995 |
bde |
Ignore trailing slashes in pathnames that "refer to a directory", 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).
|
#
9759 |
|
29-Jul-1995 |
bde |
Eliminate sloppy common-style declarations. There should be none left for the LINT configuation.
|
#
6970 |
|
09-Mar-1995 |
phk |
Clean up and improve the namecache.
1. We always keep one 16th of the vnodes on the freelist, so that the namecache doesn't get trashed. It used to be that it wasn't a problem, but the only vnodes getting released these days are directories and things which Clean up and improve the namecache.
1. We always keep one 16th of the vnodes on the freelist, so that the namecache doesn't get trashed. It used to be that it wasn't a problem, but the only vnodes getting released these days are directories and things which gets forced out of the VM/cache. The latter is not numerous enough to keep the pool of vnodes needed for the namecache sufficiently big.
2. Purge invalid entries in the namecache as soon as we notice them. This avoids a stale entry pushing out a valid entry on the LRU list.
3. Speed up the lookup in the namecache by avoid a special case branch.
4. Make the cache purge routines do the thing they're supposed to, and in a decently efficient manner.
5. Make the size of the namecache follow the number of vnodes, so that we can always point to all the vnodes we have in core.
6. Readability has gone way up.
7. Added a "options NCH_STATISTICS" feature that will gather more detailed statistics on the performance of the namecache.
Reviewed by: davidg
|
#
6928 |
|
06-Mar-1995 |
phk |
Update vfs_cache.c to use the <sys/queue.h> macros. This makes it easier to read, but doesn't change the speed.
Reviewed by: phk Obtained from: via NetBSD
|
#
3148 |
|
27-Sep-1994 |
phk |
Moved the "relookup" routine into vfs_lookup.c from ufs/ufs/ufs_vnops.c. Several FS's use this, so it doesn't belong in ufs. (unionfs, msdosfs and ufs)
|
#
1817 |
|
02-Aug-1994 |
dg |
Added $Id$
|
#
1542 |
|
24-May-1994 |
rgrimes |
This commit was generated by cvs2svn to compensate for changes in r1541, which included commits to RCS files with non-trunk default branches.
|
#
1541 |
|
24-May-1994 |
rgrimes |
BSD 4.4 Lite Kernel Sources
|