CVS commit: [ad-namecache] src/sys/kern

2020-03-22 Thread Andrew Doran
Module Name:src
Committed By:   ad
Date:   Sun Mar 22 14:16:50 UTC 2020

Modified Files:
src/sys/kern [ad-namecache]: vfs_cache.c

Log Message:
Resurrect the counter stuff from HEAD, which tries to deal with 32-bit
counter rollover.  Drive it by sysctl and/or callout every 5 minutes,
since there's no garbage collection kthread any more.


To generate a diff of this commit:
cvs rdiff -u -r1.126.2.16 -r1.126.2.17 src/sys/kern/vfs_cache.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: [ad-namecache] src/sys/kern

2020-03-21 Thread Andrew Doran
Module Name:src
Committed By:   ad
Date:   Sun Mar 22 01:58:22 UTC 2020

Modified Files:
src/sys/kern [ad-namecache]: vfs_cache.c

Log Message:
- rb_tree_insert_node() refuses to insert duplicate nodes.  It always
  returns a pointer to the current node in the tree for the given key.
  Therefore the call to rb_tree_lookup_node() in cache_enter() is not
  needed.

- Adjust a comment and move some code for clarity.


To generate a diff of this commit:
cvs rdiff -u -r1.126.2.15 -r1.126.2.16 src/sys/kern/vfs_cache.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: [ad-namecache] src/sys/kern

2020-03-21 Thread Andrew Doran
Module Name:src
Committed By:   ad
Date:   Sun Mar 22 00:34:31 UTC 2020

Modified Files:
src/sys/kern [ad-namecache]: vfs_cache.c

Log Message:
- Fold the "doingcache" conditional into the max length conditional.
- Mark the tunables __read_mostly.


To generate a diff of this commit:
cvs rdiff -u -r1.126.2.14 -r1.126.2.15 src/sys/kern/vfs_cache.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: [ad-namecache] src/sys/kern

2020-03-21 Thread Andrew Doran
Module Name:src
Committed By:   ad
Date:   Sat Mar 21 22:00:56 UTC 2020

Modified Files:
src/sys/kern [ad-namecache]: vfs_cache.c

Log Message:
- Include sys/types.h for vax.
- Use macro versions of kpreempt_disable()/enable().
- Use atomic_load_relaxed().
- Make cache_key() inline.


To generate a diff of this commit:
cvs rdiff -u -r1.126.2.13 -r1.126.2.14 src/sys/kern/vfs_cache.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: [ad-namecache] src/sys/kern

2020-03-10 Thread Andrew Doran
Module Name:src
Committed By:   ad
Date:   Tue Mar 10 21:53:46 UTC 2020

Modified Files:
src/sys/kern [ad-namecache]: vfs_cache.c

Log Message:
__read_mostly -> const in one place


To generate a diff of this commit:
cvs rdiff -u -r1.126.2.12 -r1.126.2.13 src/sys/kern/vfs_cache.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: [ad-namecache] src/sys/kern

2020-03-03 Thread Andrew Doran
Module Name:src
Committed By:   ad
Date:   Tue Mar  3 22:30:57 UTC 2020

Modified Files:
src/sys/kern [ad-namecache]: vfs_lookup.c

Log Message:
lookup_fastforward(): bail out on mount -o union


To generate a diff of this commit:
cvs rdiff -u -r1.212.4.10 -r1.212.4.11 src/sys/kern/vfs_lookup.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: [ad-namecache] src/sys/kern

2020-02-29 Thread Andrew Doran
Module Name:src
Committed By:   ad
Date:   Sat Feb 29 22:00:03 UTC 2020

Modified Files:
src/sys/kern [ad-namecache]: vfs_vnops.c

Log Message:
Back out experimental change - not ready for LK_SHARED on VOP_OPEN() just yet.


To generate a diff of this commit:
cvs rdiff -u -r1.204.2.3 -r1.204.2.4 src/sys/kern/vfs_vnops.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: [ad-namecache] src/sys/kern

2020-02-23 Thread Andrew Doran
Module Name:src
Committed By:   ad
Date:   Sun Feb 23 19:14:03 UTC 2020

Modified Files:
src/sys/kern [ad-namecache]: vfs_vnode.c

Log Message:
Turns out there's no point adjusting v_holdcnt with atomics.


To generate a diff of this commit:
cvs rdiff -u -r1.105.2.7 -r1.105.2.8 src/sys/kern/vfs_vnode.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: [ad-namecache] src/sys/kern

2020-02-16 Thread Andrew Doran
Module Name:src
Committed By:   ad
Date:   Sun Feb 16 22:00:53 UTC 2020

Modified Files:
src/sys/kern [ad-namecache]: vfs_cache.c

Log Message:
Comments.


To generate a diff of this commit:
cvs rdiff -u -r1.126.2.11 -r1.126.2.12 src/sys/kern/vfs_cache.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: [ad-namecache] src/sys/kern

2020-01-25 Thread Andrew Doran
Module Name:src
Committed By:   ad
Date:   Sat Jan 25 18:42:24 UTC 2020

Modified Files:
src/sys/kern [ad-namecache]: vfs_cwd.c

Log Message:
Add a missing membar to previous.


To generate a diff of this commit:
cvs rdiff -u -r1.4.62.1 -r1.4.62.2 src/sys/kern/vfs_cwd.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: [ad-namecache] src/sys/kern

2020-01-24 Thread Andrew Doran
Module Name:src
Committed By:   ad
Date:   Fri Jan 24 16:05:37 UTC 2020

Modified Files:
src/sys/kern [ad-namecache]: vfs_lookup.c

Log Message:
Add a comment.


To generate a diff of this commit:
cvs rdiff -u -r1.212.4.7 -r1.212.4.8 src/sys/kern/vfs_lookup.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: [ad-namecache] src/sys/kern

2020-01-23 Thread Andrew Doran
Module Name:src
Committed By:   ad
Date:   Thu Jan 23 21:23:56 UTC 2020

Modified Files:
src/sys/kern [ad-namecache]: vfs_lookup.c

Log Message:
Improve an assertion.


To generate a diff of this commit:
cvs rdiff -u -r1.212.4.6 -r1.212.4.7 src/sys/kern/vfs_lookup.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: [ad-namecache] src/sys/kern

2020-01-23 Thread Andrew Doran
Module Name:src
Committed By:   ad
Date:   Thu Jan 23 19:28:39 UTC 2020

Modified Files:
src/sys/kern [ad-namecache]: vfs_vnode.c

Log Message:
vcache_reclaim(): purge namecache immediately after setting vnode to
VS_RECLAIMED.


To generate a diff of this commit:
cvs rdiff -u -r1.105.2.3 -r1.105.2.4 src/sys/kern/vfs_vnode.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: [ad-namecache] src/sys/kern

2020-01-23 Thread Andrew Doran
Module Name:src
Committed By:   ad
Date:   Thu Jan 23 12:33:18 UTC 2020

Modified Files:
src/sys/kern [ad-namecache]: vfs_cache.c

Log Message:
Update comments.


To generate a diff of this commit:
cvs rdiff -u -r1.126.2.9 -r1.126.2.10 src/sys/kern/vfs_cache.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: [ad-namecache] src/sys/kern

2020-01-23 Thread Andrew Doran
Module Name:src
Committed By:   ad
Date:   Thu Jan 23 12:21:01 UTC 2020

Modified Files:
src/sys/kern [ad-namecache]: vfs_lookup.c

Log Message:
- Change style of new code slightly to match rest of file.
- NFS lookup needs to cross mountpoint too.
- Update comments.


To generate a diff of this commit:
cvs rdiff -u -r1.212.4.5 -r1.212.4.6 src/sys/kern/vfs_lookup.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: [ad-namecache] src/sys/kern

2020-01-23 Thread Andrew Doran
Module Name:src
Committed By:   ad
Date:   Thu Jan 23 12:17:08 UTC 2020

Modified Files:
src/sys/kern [ad-namecache]: kern_synch.c

Log Message:
Back out previous.


To generate a diff of this commit:
cvs rdiff -u -r1.334.2.2 -r1.334.2.3 src/sys/kern/kern_synch.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: [ad-namecache] src/sys/kern

2020-01-22 Thread Andrew Doran
Module Name:src
Committed By:   ad
Date:   Wed Jan 22 12:10:46 UTC 2020

Modified Files:
src/sys/kern [ad-namecache]: vfs_lookup.c

Log Message:
Fast-forward through the namecache was stopping one component too soon when
there was an obstacle, e.g. a mountpoint.  The obstacle should be returned
not the parent directory.


To generate a diff of this commit:
cvs rdiff -u -r1.212.4.4 -r1.212.4.5 src/sys/kern/vfs_lookup.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: [ad-namecache] src/sys/kern

2020-01-19 Thread Andrew Doran
Module Name:src
Committed By:   ad
Date:   Sun Jan 19 21:23:36 UTC 2020

Modified Files:
src/sys/kern [ad-namecache]: vfs_syscalls.c vfs_vnops.c

Log Message:
Use LOCKLEAF in the few cases it's useful for ffs/tmpfs/nullfs.  Others need
to be checked.


To generate a diff of this commit:
cvs rdiff -u -r1.539.2.1 -r1.539.2.2 src/sys/kern/vfs_syscalls.c
cvs rdiff -u -r1.204.2.1 -r1.204.2.2 src/sys/kern/vfs_vnops.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: [ad-namecache] src/sys/kern

2020-01-18 Thread Andrew Doran
Module Name:src
Committed By:   ad
Date:   Sat Jan 18 17:16:20 UTC 2020

Modified Files:
src/sys/kern [ad-namecache]: vfs_cache.c

Log Message:
Fix namecache_print().


To generate a diff of this commit:
cvs rdiff -u -r1.126.2.7 -r1.126.2.8 src/sys/kern/vfs_cache.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: [ad-namecache] src/sys/kern

2020-01-18 Thread Andrew Doran
Module Name:src
Committed By:   ad
Date:   Sat Jan 18 17:14:13 UTC 2020

Modified Files:
src/sys/kern [ad-namecache]: vnode_if.c

Log Message:
Regen.


To generate a diff of this commit:
cvs rdiff -u -r1.109 -r1.109.2.1 src/sys/kern/vnode_if.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: [ad-namecache] src/sys/kern

2020-01-18 Thread Andrew Doran
Module Name:src
Committed By:   ad
Date:   Sat Jan 18 15:42:02 UTC 2020

Modified Files:
src/sys/kern [ad-namecache]: vfs_cache.c

Log Message:
- Adjust comments & assertions.
- Ditch memcmp().


To generate a diff of this commit:
cvs rdiff -u -r1.126.2.6 -r1.126.2.7 src/sys/kern/vfs_cache.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: [ad-namecache] src/sys/kern

2020-01-17 Thread Andrew Doran
Module Name:src
Committed By:   ad
Date:   Fri Jan 17 21:55:13 UTC 2020

Modified Files:
src/sys/kern [ad-namecache]: vfs_vnode.c

Log Message:
vrelel: don't change the vnode state to VS_BLOCKED for VOP_INACTIVE(), it's
not needed (at least not for the usual case).  Will revist before merge.


To generate a diff of this commit:
cvs rdiff -u -r1.105.2.2 -r1.105.2.3 src/sys/kern/vfs_vnode.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: [ad-namecache] src/sys/kern

2020-01-17 Thread Andrew Doran
Module Name:src
Committed By:   ad
Date:   Fri Jan 17 21:54:27 UTC 2020

Modified Files:
src/sys/kern [ad-namecache]: vfs_getcwd.c

Log Message:
- Get shared locks on the directories, except for VOP_GETATTR() which
  unfortunately still needs LK_EXCLUSIVE due to itimes handling in UFS.

- vnode locks are not needed to traverse the namecache.


To generate a diff of this commit:
cvs rdiff -u -r1.53.2.1 -r1.53.2.2 src/sys/kern/vfs_getcwd.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: [ad-namecache] src/sys/kern

2020-01-17 Thread Andrew Doran
Module Name:src
Committed By:   ad
Date:   Fri Jan 17 21:53:01 UTC 2020

Modified Files:
src/sys/kern [ad-namecache]: exec_script.c

Log Message:
LK_SHARED for VOP_ACCESS().


To generate a diff of this commit:
cvs rdiff -u -r1.80 -r1.80.2.1 src/sys/kern/exec_script.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: [ad-namecache] src/sys/kern

2020-01-16 Thread Andrew Doran
Module Name:src
Committed By:   ad
Date:   Thu Jan 16 16:45:31 UTC 2020

Modified Files:
src/sys/kern [ad-namecache]: vfs_lookup.c

Log Message:
Push the vnode locking in namei() about as far back as it will go.


To generate a diff of this commit:
cvs rdiff -u -r1.212 -r1.212.4.1 src/sys/kern/vfs_lookup.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: [ad-namecache] src/sys/kern

2020-01-08 Thread Andrew Doran
Module Name:src
Committed By:   ad
Date:   Wed Jan  8 21:55:10 UTC 2020

Modified Files:
src/sys/kern [ad-namecache]: vfs_cache.c

Log Message:
Fix a comment.


To generate a diff of this commit:
cvs rdiff -u -r1.126.2.2 -r1.126.2.3 src/sys/kern/vfs_cache.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: [ad-namecache] src/sys/kern

2020-01-08 Thread Andrew Doran
Module Name:src
Committed By:   ad
Date:   Wed Jan  8 11:44:30 UTC 2020

Modified Files:
src/sys/kern [ad-namecache]: vfs_cache.c

Log Message:
cache_enter(): check namelen before touching name.


To generate a diff of this commit:
cvs rdiff -u -r1.126.2.1 -r1.126.2.2 src/sys/kern/vfs_cache.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.