Commit Graph

25 Commits

Author SHA1 Message Date
chs
9431f1857b change "nextvnodeid" from a global in namei.h to a static in
the one function that uses it.
2000-04-16 21:41:49 +00:00
chs
d0fb21715e limit the number of namecache entries to numvnodes rather than desiredvnodes.
getnewvnode() has been changed to virtually guarantee that we'll have more
vnodes than "desired", so previously there would always be more vnodes
than namecache entries.  this fixes PR 9792.
2000-04-16 21:39:57 +00:00
augustss
264f1d27c6 Get rid of register declarations. 2000-03-30 09:27:11 +00:00
soren
93c531f872 Tiny comment update. 2000-03-23 14:32:41 +00:00
mycroft
34b45d9bd7 Obey negative cache entries for intermediate directories during a create. 1999-09-10 23:24:23 +00:00
jdolecek
026b142488 Change cache_lookup() as per discussion on tech-kern & ICB:
If the entry is found in name cache, cache_lookup() does all the
necessary locking now, simplifying the interface and making the
code easier to follow and maintain.

The code now also removes the entry from cache when it's either invalid
(vget() fails) or the vnode has been recycled while waiting for the lock.
In that case, unlock/relock of the directory vnode has been eliminated too.
Both changes could lead to sligh performace improvement in same cases.

Furthermore, obscure bug has been found and eliminated for ISDOTDOT in the
lockparent && ISLASTCN case: if the vget() succeded and the re-lock
of the directory vnode not, we returned the error with the '..' vnode still
locked.

For simplicity, cache_lookup() now returns 0 if the positive entry was found
in cache, -1 if not found and ENOENT or error returned by the locking
functions in any other case.

Many thanks to Bill Studenmund and especially Charles Hannum
for invaluable advices and code to get this right.

Tested by: jdolecek
Rewieved by: wrstuden, mycroft
1999-09-05 14:22:34 +00:00
sommerfe
095cd96cd5 Change namei cache to record vnode->(parent,name) entries (for directories).
Add kernel implementation of getcwd() which uses this cache, falling
back to reading the filesystem on a cache miss.
Along for the ride: add new VOP_FSYNC flag FSYNC_RECLAIM indicating
that a reclaim is being done, so only a "shallow" fsync is needed.
1999-03-22 17:01:55 +00:00
thorpej
77ecf8273e Use the pool allocator and "nointr" pool page allocator for name cache entries.
The only benefit this provides is that we don't use kmem_map to map the memory
used for name cache entries (though, this is a 13 virtual page savings on my
PPro) since vnodes are never freed (they have their own freelist).
1998-09-01 04:33:56 +00:00
perry
275d1554aa Abolition of bcopy, ovbcopy, bcmp, and bzero, phase one.
bcopy(x, y, z) ->  memcpy(y, x, z)
ovbcopy(x, y, z) -> memmove(y, x, z)
   bcmp(x, y, z) ->  memcmp(x, y, z)
  bzero(x, y)    ->  memset(x, 0, y)
1998-08-04 04:03:10 +00:00
perry
730baa7431 fix sizeofs so they comply with the KNF style guide. yes, it is pedantic. 1998-07-31 22:50:48 +00:00
fvdl
e5bc90f40c Merge with Lite2 + local changes 1998-03-01 02:20:01 +00:00
chs
f64abc7b4c add flags arg to hashinit(), to pass to malloc(). 1998-02-07 02:44:44 +00:00
christos
e630447d8c First pass at prototyping 1996-02-04 02:17:43 +00:00
ws
166530c153 Distribute cache entries more evenly 1995-09-08 14:15:07 +00:00
mycroft
53eb79fc69 Preserve the ISWHITEOUT flag between cache_enter() and cache_lookup(). 1995-05-30 09:02:02 +00:00
mycroft
8c24ba89ef Sync with CSRG. 1994-12-13 09:14:34 +00:00
mycroft
2f710a54ee Convert process, file, and namei lists and hash tables to use queue.h. 1994-08-30 03:04:28 +00:00
cgd
c5bedb0aa6 fix for kern/322, pointed out by osymh@gemini.oscs.montana.edu. Neither
suggested fix was correct: the suggested change to cache_lookup would cause
the counters to be incremented when doingcache was zero, and the suggested
change to cache_enter was prone to a race condition (e.g. if doingcache
became 1 between the cache_lookup and cache_enter).
1994-07-05 19:09:32 +00:00
chopps
344d199647 we like cache. 1994-07-02 20:26:19 +00:00
cgd
cf92afd66e New RCS ID's, take two. they're more aesthecially pleasant, and use 'NetBSD' 1994-06-29 06:29:24 +00:00
mycroft
699bbb84b6 Update to 4.4-Lite fs code. 1994-06-08 11:28:29 +00:00
mycroft
7f50bd1829 Canonicalize all #includes. 1993-12-18 04:21:37 +00:00
ws
053f138dae Changes to VFS readdir semantics
NFS changes for better cookie support
ISOFS changes for better Rockridge support and support for generation numbers
1993-09-07 15:40:14 +00:00
cgd
230dcf0d05 add $Id$ strings, and clean up file headers where necessary 1993-05-20 02:54:09 +00:00
cgd
61f282557f initial import of 386bsd-0.1 sources 1993-03-21 09:45:37 +00:00