The NetBSD Project

CVS log for src/sys/kern/vfs_lookup.c

[BACK] Up to [cvs.NetBSD.org] / src / sys / kern

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.232 / (download) - annotate - [select for diffs], Mon Aug 22 09:14:59 2022 UTC (5 months, 1 week ago) by hannken
Branch: MAIN
CVS Tags: netbsd-10-base, netbsd-10, bouyer-sunxi-drm-base, bouyer-sunxi-drm, HEAD
Changes since 1.231: +13 -27 lines
Diff to previous 1.231 (colored)

Use fstrans_start()/fstrans_done() to cross the mount in lookup_crossmount().
It is sufficient here as it prevents the file system from unmount and
makes it safe to use VFS_ROOT() here.

Removes a rare deadlock where one thread has "foundobj" locked and waits
for "foundobj->v_mountedhere" to resume while the thread holding the file
system suspended tries to lookup a node and needs a lock on "foundobj".

Revision 1.231 / (download) - annotate - [select for diffs], Thu Feb 10 10:59:12 2022 UTC (11 months, 3 weeks ago) by hannken
Branch: MAIN
Changes since 1.230: +2 -4 lines
Diff to previous 1.230 (colored)

Remove the assertion "searchdir != foundobj" from lookup_crossmount().

It will trigger whenever we lookup "." on a directory that becomes
mounted

    fd = open("/mnt")
    mount(..., "/mnt", ...)
    fd2 = openat(fd, ".")

or

    Unlocked searchdir gets mounted mounted on between
    lookup_fastforward()/lookup_once() and the test for
    foundobj->v_mountedhere.

May address syzkaller:

Reported-by: syzbot+9197ac681ce50f707d9a@syzkaller.appspotmail.com
Reported-by: syzbot+eb4854df8ee3c9bc278d@syzkaller.appspotmail.com
Reported-by: syzbot+3cc5b4126ab554f145d3@syzkaller.appspotmail.com
Reported-by: syzbot+7eae48a3ea952efee8c8@syzkaller.appspotmail.com
Reported-by: syzbot+b7f662083ccf8be3e669@syzkaller.appspotmail.com

Revision 1.230 / (download) - annotate - [select for diffs], Sat Nov 13 14:52:08 2021 UTC (14 months, 2 weeks ago) by hannken
Branch: MAIN
Changes since 1.229: +4 -8 lines
Diff to previous 1.229 (colored)

If lookup_fastforward() loses an intermediate searchdir, has to roll
back and retry it must use the initial searchdir from *searchdir_ret
for lookup_parsepath().

Revision 1.225.4.2 / (download) - annotate - [select for diffs], Sun Aug 1 22:42:39 2021 UTC (18 months ago) by thorpej
Branch: thorpej-i2c-spi-conf
Changes since 1.225.4.1: +25 -41 lines
Diff to previous 1.225.4.1 (colored) to branchpoint 1.225 (colored) next main 1.226 (colored)

Sync with HEAD.

Revision 1.229 / (download) - annotate - [select for diffs], Tue Jun 29 22:39:21 2021 UTC (19 months ago) by dholland
Branch: MAIN
CVS Tags: thorpej-i2c-spi-conf2-base, thorpej-i2c-spi-conf2, thorpej-i2c-spi-conf-base, thorpej-futex2-base, thorpej-futex2, thorpej-cfargs2-base, thorpej-cfargs2
Changes since 1.228: +2 -17 lines
Diff to previous 1.228 (colored)

Now remove cn_consume from struct componentname.

This change requires a kernel bump.

Note though that I'm not going to version the VOP_LOOKUP args
structure (or any other args structure) as code that doesn't touch
cn_consume doesn't need attention and code that does will fail on it
without further intervention.

Revision 1.228 / (download) - annotate - [select for diffs], Tue Jun 29 22:34:08 2021 UTC (19 months ago) by dholland
Branch: MAIN
Changes since 1.227: +5 -26 lines
Diff to previous 1.227 (colored)

- Add a new vnode op: VOP_PARSEPATH.
 - Move namei_getcomponent to genfs_vnops.c and call it genfs_parsepath.
 - Add a parsepath entry to every vnode ops table.

VOP_PARSEPATH takes a directory vnode to be searched and a complete
following path and chooses how much of that path to consume. To begin
with, all parsepath calls are genfs_parsepath, which locates the first
'/' as always.

Note that the call doesn't take the whole struct componentname, only
the string. The other bits of struct componentname should not be
needed and there's no reason to cause potential complications by
exposing them.

Revision 1.227 / (download) - annotate - [select for diffs], Tue Jun 29 22:29:59 2021 UTC (19 months ago) by dholland
Branch: MAIN
Changes since 1.226: +33 -13 lines
Diff to previous 1.226 (colored)

Adjust namei internals to be able to make an external call to parse
the pathname. (Basically, this means change the signature of
namei_getcomponent(), and thus lookup_parsepath(), to pass in the
directory vnode and to allow failures.)

Revision 1.207.2.2 / (download) - annotate - [select for diffs], Mon Jun 21 14:55:15 2021 UTC (19 months, 1 week ago) by martin
Branch: netbsd-8
Changes since 1.207.2.1: +26 -3 lines
Diff to previous 1.207.2.1 (colored) to branchpoint 1.207 (colored) next main 1.208 (colored)

Pull up following revision(s) (requested by dholland in ticket #1685):

	sys/sys/namei.src: revision 1.59	(via patch)
	sys/kern/vfs_vnops.c: revision 1.215
	sys/kern/vfs_lookup.c: revision 1.226

Add a new namei flag NONEXCLHACK for open with O_CREAT and not O_EXCL.
This case needs to be distinguished from the other CREATE operations
because it is supposed to successfully return (and open) the target if
it exists. In the case where that target is the root, or a mount
point, such that there's no parent dir, "real" CREATE operations fail,
but O_CREAT without O_EXCL needs to succeed.

So (a) add the flag, (b) test for it in namei in the situation
described above, (c) set it in open under the appropriate
circumstances, and (d) because this can result in namei returning
ni_dvp of NULL, cope with that case.

Should get into -9 and maybe even -8, because it was prompted by
issues with 3rd-party code. The use of a flag (vs. adding an
additional nameiop, which would be more appropriate) was deliberate to
make the patch small and noninvasive.

Revision 1.212.2.1 / (download) - annotate - [select for diffs], Mon Jun 21 14:50:57 2021 UTC (19 months, 1 week ago) by martin
Branch: netbsd-9
CVS Tags: netbsd-9-3-RELEASE
Changes since 1.212: +26 -3 lines
Diff to previous 1.212 (colored) next main 1.213 (colored)

Pull up following revision(s) (requested by dholland in ticket #1296):

	sys/sys/namei.src: revision 1.59	(via patch)
	sys/kern/vfs_vnops.c: revision 1.215
	sys/kern/vfs_lookup.c: revision 1.226

Add a new namei flag NONEXCLHACK for open with O_CREAT and not O_EXCL.
This case needs to be distinguished from the other CREATE operations
because it is supposed to successfully return (and open) the target if
it exists. In the case where that target is the root, or a mount
point, such that there's no parent dir, "real" CREATE operations fail,
but O_CREAT without O_EXCL needs to succeed.

So (a) add the flag, (b) test for it in namei in the situation
described above, (c) set it in open under the appropriate
circumstances, and (d) because this can result in namei returning
ni_dvp of NULL, cope with that case.

Should get into -9 and maybe even -8, because it was prompted by
issues with 3rd-party code. The use of a flag (vs. adding an
additional nameiop, which would be more appropriate) was deliberate to
make the patch small and noninvasive.

Revision 1.225.4.1 / (download) - annotate - [select for diffs], Thu Jun 17 04:46:33 2021 UTC (19 months, 2 weeks ago) by thorpej
Branch: thorpej-i2c-spi-conf
Changes since 1.225: +26 -3 lines
Diff to previous 1.225 (colored)

Sync w/ HEAD.

Revision 1.226 / (download) - annotate - [select for diffs], Wed Jun 16 01:51:57 2021 UTC (19 months, 2 weeks ago) by dholland
Branch: MAIN
Changes since 1.225: +26 -3 lines
Diff to previous 1.225 (colored)

Add a new namei flag NONEXCLHACK for open with O_CREAT and not O_EXCL.

This case needs to be distinguished from the other CREATE operations
because it is supposed to successfully return (and open) the target if
it exists. In the case where that target is the root, or a mount
point, such that there's no parent dir, "real" CREATE operations fail,
but O_CREAT without O_EXCL needs to succeed.

So (a) add the flag, (b) test for it in namei in the situation
described above, (c) set it in open under the appropriate
circumstances, and (d) because this can result in namei returning
ni_dvp of NULL, cope with that case.

Should get into -9 and maybe even -8, because it was prompted by
issues with 3rd-party code. The use of a flag (vs. adding an
additional nameiop, which would be more appropriate) was deliberate to
make the patch small and noninvasive.

Revision 1.224.2.1 / (download) - annotate - [select for diffs], Sun Jan 3 16:35:04 2021 UTC (2 years ago) by thorpej
Branch: thorpej-futex
Changes since 1.224: +30 -15 lines
Diff to previous 1.224 (colored) next main 1.225 (colored)

Sync w/ HEAD.

Revision 1.225 / (download) - annotate - [select for diffs], Tue Dec 29 22:13:40 2020 UTC (2 years, 1 month ago) by chs
Branch: MAIN
CVS Tags: thorpej-futex-base, thorpej-cfargs-base, thorpej-cfargs, cjep_sun2x-base1, cjep_sun2x-base, cjep_sun2x, cjep_staticlib_x-base1, cjep_staticlib_x-base, cjep_staticlib_x
Branch point for: thorpej-i2c-spi-conf
Changes since 1.224: +30 -15 lines
Diff to previous 1.224 (colored)

Honor LOCKPARENT for ".." of the root directory.

Reported-by: syzbot+f40b9f241b818fd12198@syzkaller.appspotmail.com

Revision 1.224 / (download) - annotate - [select for diffs], Mon Jun 15 18:44:10 2020 UTC (2 years, 7 months ago) by ad
Branch: MAIN
Branch point for: thorpej-futex
Changes since 1.223: +15 -3 lines
Diff to previous 1.223 (colored)

lookup_fastforward():

- If the root vnode of a mount is being reclaimed concurrent to a lookup,
  it's possbile to become confounded and bail out of the loop with both
  foundobj=NULL and searchdir=NULL (causing a NULL pointer deref).  If that
  happens everything should be rolled back to the start for retry.  Problem
  found and debugged by hannken@.

- If the terminal node was !VDIR then searchdir was needlessly referenced.
  No functional impact.

Revision 1.223 / (download) - annotate - [select for diffs], Thu Jun 4 03:12:26 2020 UTC (2 years, 8 months ago) by riastradh
Branch: MAIN
Changes since 1.222: +8 -8 lines
Diff to previous 1.222 (colored)

Nix trailing whitespace.  NFCI.

Revision 1.222 / (download) - annotate - [select for diffs], Sat May 30 20:23:25 2020 UTC (2 years, 8 months ago) by ad
Branch: MAIN
Changes since 1.221: +5 -4 lines
Diff to previous 1.221 (colored)

Fix merge error - adjust assertions.

Revision 1.221 / (download) - annotate - [select for diffs], Sat May 30 20:16:14 2020 UTC (2 years, 8 months ago) by ad
Branch: MAIN
Changes since 1.220: +127 -48 lines
Diff to previous 1.220 (colored)

A couple of small changes to lookup that cut 5-10% system time from
"build.sh release" on my test system:

- Crossing mount points during lookup is slow because the set up for, and
  act of doing VFS_ROOT() is quite involved.  Use the name cache to help
  with this.  Cache an "impossible" zero-length name with covered vnodes,
  that points to the root of the file system mounted there.  Use it to cross
  mounts.  When cache_purge() is called on either of the vnodes involved the
  cache entry will disappear.  All of the needed calls for that are already
  in place (vnode reclaim, unmount, etc).

- In lookup_fastforward(), if the the last component has been found and the
  parent directory (searchdir) is not going to be returned, then don't get a
  reference to it.

Revision 1.220 / (download) - annotate - [select for diffs], Tue May 26 18:38:37 2020 UTC (2 years, 8 months ago) by ad
Branch: MAIN
Changes since 1.219: +2 -6 lines
Diff to previous 1.219 (colored)

Make vcache_tryvget() lockless.  Reviewed by hannken@.

Revision 1.217.2.1 / (download) - annotate - [select for diffs], Sat Apr 25 11:24:06 2020 UTC (2 years, 9 months ago) by bouyer
Branch: bouyer-xenpvh
Changes since 1.217: +29 -21 lines
Diff to previous 1.217 (colored) next main 1.218 (colored)

Sync with bouyer-xenpvh-base2 (HEAD)

Revision 1.219 / (download) - annotate - [select for diffs], Wed Apr 22 21:35:52 2020 UTC (2 years, 9 months ago) by ad
Branch: MAIN
CVS Tags: bouyer-xenpvh-base2
Changes since 1.218: +25 -18 lines
Diff to previous 1.218 (colored)

lookup_fastforward(): handle dotdot lookups and give up less often in
the union mount case.

Revision 1.218 / (download) - annotate - [select for diffs], Tue Apr 21 21:42:47 2020 UTC (2 years, 9 months ago) by ad
Branch: MAIN
Changes since 1.217: +6 -5 lines
Diff to previous 1.217 (colored)

Revert the changes made in February to make cwdinfo use mostly lockless,
which relied on taking extra vnode refs.

Having benchmarked various experimental changes over the past few months it
seems that it's better to avoid vnode refs as much as possible.  cwdi_lock
as a RW lock already did that to some extent for getcwd() and will permit
the same for namei() too.

Revision 1.208.6.3 / (download) - annotate - [select for diffs], Mon Apr 13 08:05:04 2020 UTC (2 years, 9 months ago) by martin
Branch: phil-wifi
Changes since 1.208.6.2: +22 -9 lines
Diff to previous 1.208.6.2 (colored) to branchpoint 1.208 (colored) next main 1.209 (colored)

Mostly merge changes from HEAD upto 20200411

Revision 1.208.6.2 / (download) - annotate - [select for diffs], Wed Apr 8 14:08:52 2020 UTC (2 years, 9 months ago) by martin
Branch: phil-wifi
Changes since 1.208.6.1: +441 -163 lines
Diff to previous 1.208.6.1 (colored) to branchpoint 1.208 (colored)

Merge changes from current as of 20200406

Revision 1.217 / (download) - annotate - [select for diffs], Tue Apr 7 19:17:50 2020 UTC (2 years, 9 months ago) by ad
Branch: MAIN
CVS Tags: phil-wifi-20200421, phil-wifi-20200411, bouyer-xenpvh-base1, bouyer-xenpvh-base
Branch point for: bouyer-xenpvh
Changes since 1.216: +3 -2 lines
Diff to previous 1.216 (colored)

lookup_fastforward(): failure to vget foundobj vnode also translates into
EOPNOTSUPP; VOP_LOOKUP() should retry it.

Revision 1.216 / (download) - annotate - [select for diffs], Tue Apr 7 18:28:31 2020 UTC (2 years, 9 months ago) by ad
Branch: MAIN
Changes since 1.215: +7 -7 lines
Diff to previous 1.215 (colored)

PR kern/55146 (100+ file system test cases failing)

- namei_oneroot(): key on negative return from lookup_fastforward()
  (EOPNOTSUPP), not positive.

- lookup_crossmount(): don't lose track of founddir.

From hannken@, with a couple of tweaks.

Revision 1.215 / (download) - annotate - [select for diffs], Sat Apr 4 20:49:30 2020 UTC (2 years, 9 months ago) by ad
Branch: MAIN
CVS Tags: phil-wifi-20200406
Changes since 1.214: +438 -159 lines
Diff to previous 1.214 (colored)

Merge the remaining changes from the ad-namecache branch, affecting namei()
and getcwd():

- push vnode locking back as far as possible.
- do most lookups directly in the namecache, avoiding vnode locks & refs.
- don't block new refs to vnodes across VOP_INACTIVE().
- get shared locks for VOP_LOOKUP() if the file system supports it.
- correct lock types for VOP_ACCESS() / VOP_GETATTR() in a few places.

Possible future enhancements:

- make the lookups lockless.
- support dotdot lookups by being lockless and inferring absence of chroot.
- maybe make it work for layered file systems.
- avoid vnode references at the root & cwd.

Revision 1.212.4.11 / (download) - annotate - [select for diffs], Tue Mar 3 22:30:57 2020 UTC (2 years, 11 months ago) by ad
Branch: ad-namecache
Changes since 1.212.4.10: +9 -3 lines
Diff to previous 1.212.4.10 (colored) to branchpoint 1.212 (colored) next main 1.213 (colored)

lookup_fastforward(): bail out on mount -o union

Revision 1.212.4.10 / (download) - annotate - [select for diffs], Sat Feb 29 20:21:03 2020 UTC (2 years, 11 months ago) by ad
Branch: ad-namecache
Changes since 1.212.4.9: +3 -3 lines
Diff to previous 1.212.4.9 (colored) to branchpoint 1.212 (colored)

Sync with head.

Revision 1.214 / (download) - annotate - [select for diffs], Sun Feb 23 22:14:03 2020 UTC (2 years, 11 months ago) by ad
Branch: MAIN
CVS Tags: is-mlppp-base, is-mlppp, ad-namecache-base3
Changes since 1.213: +5 -6 lines
Diff to previous 1.213 (colored)

Merge from ad-namecache:

- Have a stab at clustering the members of vnode_t and vnode_impl_t in a
  more cache-conscious way.  With that done, go back to adjusting v_usecount
  with atomics and keep vi_lock directly in vnode_impl_t (saves KVA).

- Allow VOP_LOCK(LK_NONE) for the benefit of VFS_VGET() and VFS_ROOT().
  Make sure LK_UPGRADE always comes with LK_NOWAIT.

- Make cwdinfo use mostly lockless.

Revision 1.212.4.9 / (download) - annotate - [select for diffs], Sat Jan 25 15:54:03 2020 UTC (3 years ago) by ad
Branch: ad-namecache
Changes since 1.212.4.8: +5 -6 lines
Diff to previous 1.212.4.8 (colored) to branchpoint 1.212 (colored)

Make cwdinfo use mostly lockless, and largely hide the details in vfs_cwd.c.

Revision 1.212.4.8 / (download) - annotate - [select for diffs], Fri Jan 24 16:05:37 2020 UTC (3 years ago) by ad
Branch: ad-namecache
Changes since 1.212.4.7: +3 -2 lines
Diff to previous 1.212.4.7 (colored) to branchpoint 1.212 (colored)

Add a comment.

Revision 1.212.4.7 / (download) - annotate - [select for diffs], Thu Jan 23 21:23:56 2020 UTC (3 years ago) by ad
Branch: ad-namecache
Changes since 1.212.4.6: +3 -3 lines
Diff to previous 1.212.4.6 (colored) to branchpoint 1.212 (colored)

Improve an assertion.

Revision 1.212.4.6 / (download) - annotate - [select for diffs], Thu Jan 23 12:21:01 2020 UTC (3 years ago) by ad
Branch: ad-namecache
Changes since 1.212.4.5: +80 -61 lines
Diff to previous 1.212.4.5 (colored) to branchpoint 1.212 (colored)

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

Revision 1.212.4.5 / (download) - annotate - [select for diffs], Wed Jan 22 12:10:46 2020 UTC (3 years ago) by ad
Branch: ad-namecache
Changes since 1.212.4.4: +27 -26 lines
Diff to previous 1.212.4.4 (colored) to branchpoint 1.212 (colored)

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.

Revision 1.212.4.4 / (download) - annotate - [select for diffs], Sun Jan 19 21:19:25 2020 UTC (3 years ago) by ad
Branch: ad-namecache
Changes since 1.212.4.3: +85 -36 lines
Diff to previous 1.212.4.3 (colored) to branchpoint 1.212 (colored)

- Add a LOCKSHARED flag to namei (matching FreeBSD) indicating that we want
  the leaf locked with LK_SHARED.

- Add an IMNT_SHRLOOKUP flag to struct mount indicating that the file
  system can do VOP_LOOKUP() with an shared lock.  If it encounters
  something tricky, VOP_LOOKUP() is free to return ENOLCK and namei() will
  retry the lookup with an exclusive lock.  If the file system has this flag
  set, namei() will try with shared locks for all of the "read only"
  lookups, i.e. nameiop=LOOKUP or !ISLASTCN.

- vfs_getcwd: only take vnode locks when really needed, take shared locks if
  possible, and where the namecache has identify info for the directories,
  do it all in the namecache.

- vfs_lookup: when crossing mountpoints take only a shared lock on the
  covered vnode; don't need anything else.

Revision 1.212.4.3 / (download) - annotate - [select for diffs], Fri Jan 17 22:26:25 2020 UTC (3 years ago) by ad
Branch: ad-namecache
Changes since 1.212.4.2: +266 -108 lines
Diff to previous 1.212.4.2 (colored) to branchpoint 1.212 (colored)

vfs_lookup:

- Do the easy component name lookups directly in the namecache without
  taking vnode locks nor vnode references (between the start and the leaf /
  parent), which seems to largely solve the lock contention problem with
  namei().  It needs support from the file system, which has to tell the
  name cache about directory permissions (only ffs and tmpfs tried so far),
  and I'm not sure how or if it can work with layered file systems yet.
  Work in progress.

vfs_cache:

- Make the rbtree operations more efficient: inline the lookup, and key on a
  64-bit hash value (32 bits plus 16 bits length) rather than names.

- Take namecache stuff out of vnode_impl, and take the rwlocks, and put them
  all together an an nchnode struct which is mapped 1:1: with vnodes.  Saves
  memory and nicer cache profile.

- Add a routine to help vfs_lookup do its easy component name lookups.

- Report some more stats.

- Tidy up the file a bit.

Revision 1.212.4.2 / (download) - annotate - [select for diffs], Fri Jan 17 21:47:35 2020 UTC (3 years ago) by ad
Branch: ad-namecache
Changes since 1.212.4.1: +3 -3 lines
Diff to previous 1.212.4.1 (colored) to branchpoint 1.212 (colored)

Sync with head.

Revision 1.213 / (download) - annotate - [select for diffs], Fri Jan 17 20:08:09 2020 UTC (3 years ago) by ad
Branch: MAIN
CVS Tags: ad-namecache-base2, ad-namecache-base1
Changes since 1.212: +3 -3 lines
Diff to previous 1.212 (colored)

VFS_VGET(), VFS_ROOT(), VFS_FHTOVP(): give them a "int lktype" argument, to
allow us to get shared locks (or no lock) on the returned vnode.  Matches
FreeBSD.

Revision 1.212.4.1 / (download) - annotate - [select for diffs], Thu Jan 16 16:45:30 2020 UTC (3 years ago) by ad
Branch: ad-namecache
Changes since 1.212: +170 -128 lines
Diff to previous 1.212 (colored)

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

Revision 1.212 / (download) - annotate - [select for diffs], Thu Jul 18 09:39:40 2019 UTC (3 years, 6 months ago) by hannken
Branch: MAIN
CVS Tags: phil-wifi-20191119, netbsd-9-base, netbsd-9-2-RELEASE, netbsd-9-1-RELEASE, netbsd-9-0-RELEASE, netbsd-9-0-RC2, netbsd-9-0-RC1, ad-namecache-base
Branch point for: netbsd-9, ad-namecache
Changes since 1.211: +17 -6 lines
Diff to previous 1.211 (colored)

Make namei() work with no root dir yet.

From David Holland with minor tweaks from me.

Should fix PR kern/54378 (panic with TLB miss when attempting to reboot)

Revision 1.211 / (download) - annotate - [select for diffs], Sat Jul 6 14:27:38 2019 UTC (3 years, 6 months ago) by maxv
Branch: MAIN
Changes since 1.210: +3 -2 lines
Diff to previous 1.210 (colored)

Fix (harmless) uninitialized variable. In the path

	namei_tryemulroot -> namei_oneroot-> namei_start

There was a branch where 'ndp->ni_erootdir' was not initialized.

Revision 1.208.6.1 / (download) - annotate - [select for diffs], Mon Jun 10 22:09:04 2019 UTC (3 years, 7 months ago) by christos
Branch: phil-wifi
Changes since 1.208: +27 -7 lines
Diff to previous 1.208 (colored)

Sync with HEAD

Revision 1.210 / (download) - annotate - [select for diffs], Sun Mar 17 10:14:52 2019 UTC (3 years, 10 months ago) by hannken
Branch: MAIN
CVS Tags: phil-wifi-20190609, isaki-audio2-base, isaki-audio2
Changes since 1.209: +9 -3 lines
Diff to previous 1.209 (colored)

With TRYEMULROOT namei_getstartdir() gets used twice so have to
vrele() "ni_rootdir" and "ni_erootdir" on entry.

Revision 1.209 / (download) - annotate - [select for diffs], Tue Mar 12 14:03:35 2019 UTC (3 years, 10 months ago) by hannken
Branch: MAIN
Changes since 1.208: +21 -7 lines
Diff to previous 1.208 (colored)

Take a reference on ndp->ni_rootdir and ndp->ni_erootdir.

A multithreaded process may chroot during namei() and we end up with
vn_under() trying to reference the now unreferenced ni_rootdir.

Ok: David Holland <dholland@netbsd.org>

Reported-by: syzbot+889319cdf91a3d0373a9@syzkaller.appspotmail.com

Revision 1.192.12.3 / (download) - annotate - [select for diffs], Sun Dec 3 11:38:45 2017 UTC (5 years, 2 months ago) by jdolecek
Branch: tls-maxphys
Changes since 1.192.12.2: +94 -55 lines
Diff to previous 1.192.12.2 (colored) to branchpoint 1.192 (colored) next main 1.193 (colored)

update from HEAD

Revision 1.201.6.4 / (download) - annotate - [select for diffs], Mon Aug 28 17:53:08 2017 UTC (5 years, 5 months ago) by skrll
Branch: nick-nhusb
Changes since 1.201.6.3: +7 -11 lines
Diff to previous 1.201.6.3 (colored) to branchpoint 1.201 (colored) next main 1.202 (colored)

Sync with HEAD

Revision 1.201.8.1 / (download) - annotate - [select for diffs], Mon Jul 10 13:15:00 2017 UTC (5 years, 6 months ago) by martin
Branch: netbsd-7-0
Changes since 1.201: +5 -3 lines
Diff to previous 1.201 (colored) next main 1.202 (colored)

Pull up following revision(s) (requested by dh in ticket #1451):
	sys/kern/vfs_lookup.c: revision 1.208
Fix vnode leak on error, introduced by the openat family changes in -r1.200.
From mjg@freebsd.

Revision 1.201.12.1 / (download) - annotate - [select for diffs], Mon Jul 10 13:13:15 2017 UTC (5 years, 6 months ago) by martin
Branch: netbsd-7-1
CVS Tags: netbsd-7-1-2-RELEASE, netbsd-7-1-1-RELEASE
Changes since 1.201: +5 -3 lines
Diff to previous 1.201 (colored) next main 1.202 (colored)

Pull up following revision(s) (requested by dh in ticket #1451):
	sys/kern/vfs_lookup.c: revision 1.208
Fix vnode leak on error, introduced by the openat family changes in -r1.200.
From mjg@freebsd.

Revision 1.201.4.1 / (download) - annotate - [select for diffs], Mon Jul 10 13:12:04 2017 UTC (5 years, 6 months ago) by martin
Branch: netbsd-7
CVS Tags: netbsd-7-2-RELEASE
Changes since 1.201: +5 -3 lines
Diff to previous 1.201 (colored) next main 1.202 (colored)

Pull up following revision(s) (requested by dh in ticket #1451):
	sys/kern/vfs_lookup.c: revision 1.208
Fix vnode leak on error, introduced by the openat family changes in -r1.200.
From mjg@freebsd.

Revision 1.207.2.1 / (download) - annotate - [select for diffs], Mon Jul 10 13:02:47 2017 UTC (5 years, 6 months ago) by martin
Branch: netbsd-8
CVS Tags: netbsd-8-2-RELEASE, netbsd-8-1-RELEASE, netbsd-8-1-RC1, netbsd-8-0-RELEASE, netbsd-8-0-RC2, netbsd-8-0-RC1, matt-nb8-mediatek-base, matt-nb8-mediatek
Changes since 1.207: +5 -3 lines
Diff to previous 1.207 (colored)

Pull up following revision(s) (requested by dh in ticket #116):
	sys/kern/vfs_lookup.c: revision 1.208
Fix vnode leak on error, introduced by the openat family changes in -r1.200.
From mjg@freebsd.

Revision 1.208 / (download) - annotate - [select for diffs], Sun Jul 9 22:48:44 2017 UTC (5 years, 6 months ago) by dholland
Branch: MAIN
CVS Tags: tls-maxphys-base-20171202, phil-wifi-base, pgoyette-compat-merge-20190127, pgoyette-compat-base, pgoyette-compat-20190127, pgoyette-compat-20190118, pgoyette-compat-1226, pgoyette-compat-1126, pgoyette-compat-1020, pgoyette-compat-0930, pgoyette-compat-0906, pgoyette-compat-0728, pgoyette-compat-0625, pgoyette-compat-0521, pgoyette-compat-0502, pgoyette-compat-0422, pgoyette-compat-0415, pgoyette-compat-0407, pgoyette-compat-0330, pgoyette-compat-0322, pgoyette-compat-0315, pgoyette-compat, perseant-stdc-iso10646-base, perseant-stdc-iso10646, nick-nhusb-base-20170825
Branch point for: phil-wifi
Changes since 1.207: +5 -3 lines
Diff to previous 1.207 (colored)

Fix vnode leak on error, introduced by the openat family changes in -r1.200.
From mjg@freebsd.

Revision 1.207 / (download) - annotate - [select for diffs], Thu Jun 1 02:45:13 2017 UTC (5 years, 8 months ago) by chs
Branch: MAIN
CVS Tags: netbsd-8-base
Branch point for: netbsd-8
Changes since 1.206: +2 -8 lines
Diff to previous 1.206 (colored)

remove checks for failure after memory allocation calls that cannot fail:

  kmem_alloc() with KM_SLEEP
  kmem_zalloc() with KM_SLEEP
  percpu_alloc()
  pserialize_create()
  psref_class_create()

all of these paths include an assertion that the allocation has not failed,
so callers should not assert that again.

Revision 1.205.2.1 / (download) - annotate - [select for diffs], Wed Apr 26 02:53:27 2017 UTC (5 years, 9 months ago) by pgoyette
Branch: pgoyette-localcount
Changes since 1.205: +4 -4 lines
Diff to previous 1.205 (colored) next main 1.206 (colored)

Sync with HEAD

Revision 1.205.4.1 / (download) - annotate - [select for diffs], Fri Apr 21 16:54:03 2017 UTC (5 years, 9 months ago) by bouyer
Branch: bouyer-socketcan
Changes since 1.205: +4 -4 lines
Diff to previous 1.205 (colored) next main 1.206 (colored)

Sync with HEAD

Revision 1.206 / (download) - annotate - [select for diffs], Mon Apr 17 08:32:01 2017 UTC (5 years, 9 months ago) by hannken
Branch: MAIN
CVS Tags: prg-localcount2-base3, prg-localcount2-base2, prg-localcount2-base1, prg-localcount2-base, prg-localcount2, pgoyette-localcount-20170426, bouyer-socketcan-base1
Changes since 1.205: +4 -4 lines
Diff to previous 1.205 (colored)

Remove unused argument "nextp" from vfs_busy() and vfs_unbusy().
Remove argument "keepref" from vfs_unbusy() and add vfs_ref() where needed.

Revision 1.201.6.3 / (download) - annotate - [select for diffs], Fri Apr 22 15:44:16 2016 UTC (6 years, 9 months ago) by skrll
Branch: nick-nhusb
Changes since 1.201.6.2: +88 -45 lines
Diff to previous 1.201.6.2 (colored) to branchpoint 1.201 (colored)

Sync with HEAD

Revision 1.205 / (download) - annotate - [select for diffs], Fri Apr 22 05:34:58 2016 UTC (6 years, 9 months ago) by riastradh
Branch: MAIN
CVS Tags: pgoyette-localcount-base, pgoyette-localcount-20170320, pgoyette-localcount-20170107, pgoyette-localcount-20161104, pgoyette-localcount-20160806, pgoyette-localcount-20160726, nick-nhusb-base-20170204, nick-nhusb-base-20161204, nick-nhusb-base-20161004, nick-nhusb-base-20160907, nick-nhusb-base-20160529, nick-nhusb-base-20160422, localcount-20160914, jdolecek-ncq-base, jdolecek-ncq, bouyer-socketcan-base
Branch point for: pgoyette-localcount, bouyer-socketcan
Changes since 1.204: +18 -22 lines
Diff to previous 1.204 (colored)

#if DIAGNOSTIC panic ---> KASSERTMSG

Revision 1.204 / (download) - annotate - [select for diffs], Tue Apr 12 04:02:55 2016 UTC (6 years, 9 months ago) by dholland
Branch: MAIN
Changes since 1.203: +72 -25 lines
Diff to previous 1.203 (colored)

Fix (finally) the rest of PR 47040.

Revert the supporting logic in -r1.190 of vfs_lookup.c, and fix the
important change to set searchdir = NULL instead of searchdir =
foundobj. Then supply the necessary new supporting logic to cope with
some new cases where searchdir can be null.

This is at the point when lookup_once crosses a mountpoint going down;
the idea was to avoid coupling locks across filesystems as that has a
number of potentially negative consequences. At this stage of namei,
though, it's important to set searchdir to null as this is what is
used later on to handle other cases arising from crossing mount
points. If you set it to be the same as foundobj, that instead creates
the impression that you looked up "/." on the new volume, and that
causes odd things to happen in corner cases such as the one appearing
in PR 47040.

This fix ought to be pulled up to -6 and -7, and it probably could be
safely, but given the delicacy of this code and the fact that it's
taken me more than three years to find the combination of time and
intestinal fortitude to do it, as well as the minor nature of the
resulting wrong behavior observed so far, I think we'll let that part
go.

This change also exposes an annoying corner case: if you cross a mount
point and the root directory vnode of the new volume is not a
directory but a symlink, we now have no searchdir to follow the
symlink relative to. In principle one could hang onto the searchdir
from before calling lookup_once and use that, or complexify the
interface of lookup_once to hang onto it as desired for this case.
Alternatively one could add the necessary null checks to namei_follow
and allow only absolute symlinks in this case, as for an absolute
symlink one doesn't need the old searchdir. However, given that only
broken filesystems have symlinks as their root vnodes, I'm not going
to bother. Instead if this happens we'll just fail with ENOTDIR.

Revision 1.201.6.2 / (download) - annotate - [select for diffs], Tue Sep 22 12:06:07 2015 UTC (7 years, 4 months ago) by skrll
Branch: nick-nhusb
Changes since 1.201.6.1: +7 -5 lines
Diff to previous 1.201.6.1 (colored) to branchpoint 1.201 (colored)

Sync with HEAD

Revision 1.203 / (download) - annotate - [select for diffs], Mon Aug 24 22:50:32 2015 UTC (7 years, 5 months ago) by pooka
Branch: MAIN
CVS Tags: nick-nhusb-base-20160319, nick-nhusb-base-20151226, nick-nhusb-base-20150921
Changes since 1.202: +4 -2 lines
Diff to previous 1.202 (colored)

to garnish, dust with _KERNEL_OPT

Revision 1.201.6.1 / (download) - annotate - [select for diffs], Sat Jun 6 14:40:22 2015 UTC (7 years, 7 months ago) by skrll
Branch: nick-nhusb
Changes since 1.201: +3 -5 lines
Diff to previous 1.201 (colored)

Sync with HEAD

Revision 1.202 / (download) - annotate - [select for diffs], Tue Apr 21 03:19:03 2015 UTC (7 years, 9 months ago) by riastradh
Branch: MAIN
CVS Tags: nick-nhusb-base-20150606
Changes since 1.201: +3 -5 lines
Diff to previous 1.201 (colored)

Cull unused INRENAME and INRELOOKUP from callers.

Revision 1.192.12.2 / (download) - annotate - [select for diffs], Wed Aug 20 00:04:29 2014 UTC (8 years, 5 months ago) by tls
Branch: tls-maxphys
Changes since 1.192.12.1: +26 -5 lines
Diff to previous 1.192.12.1 (colored) to branchpoint 1.192 (colored)

Rebase to HEAD as of a few days ago.

Revision 1.192.2.3 / (download) - annotate - [select for diffs], Thu May 22 11:41:04 2014 UTC (8 years, 8 months ago) by yamt
Branch: yamt-pagecache
Changes since 1.192.2.2: +26 -5 lines
Diff to previous 1.192.2.2 (colored) to branchpoint 1.192 (colored) next main 1.193 (colored)

sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs.  ("Protocol error: too many arguments")

Revision 1.200.2.1 / (download) - annotate - [select for diffs], Sun May 18 17:46:08 2014 UTC (8 years, 8 months ago) by rmind
Branch: rmind-smpnet
Changes since 1.200: +26 -5 lines
Diff to previous 1.200 (colored) next main 1.201 (colored)

sync with head

Revision 1.201 / (download) - annotate - [select for diffs], Fri Feb 7 15:29:22 2014 UTC (8 years, 11 months ago) by hannken
Branch: MAIN
CVS Tags: yamt-pagecache-base9, tls-maxphys-base, tls-earlyentropy-base, tls-earlyentropy, rmind-smpnet-nbase, rmind-smpnet-base, riastradh-xf86-video-intel-2-7-1-pre-2-21-15, riastradh-drm2-base3, nick-nhusb-base-20150406, nick-nhusb-base, netbsd-7-nhusb-base-20170116, netbsd-7-nhusb-base, netbsd-7-nhusb, netbsd-7-base, netbsd-7-1-RELEASE, netbsd-7-1-RC2, netbsd-7-1-RC1, netbsd-7-0-RELEASE, netbsd-7-0-RC3, netbsd-7-0-RC2, netbsd-7-0-RC1, netbsd-7-0-2-RELEASE, netbsd-7-0-1-RELEASE
Branch point for: nick-nhusb, netbsd-7-1, netbsd-7-0, netbsd-7
Changes since 1.200: +26 -5 lines
Diff to previous 1.200 (colored)

Change vnode operation lookup to return the resulting vnode *vpp unlocked.
Change cache_lookup() to return an unlocked vnode.

Discussed on tech-kern@

Welcome to 6.99.31

Revision 1.192.2.2 / (download) - annotate - [select for diffs], Wed Jan 16 05:33:45 2013 UTC (10 years ago) by yamt
Branch: yamt-pagecache
CVS Tags: yamt-pagecache-tag8
Changes since 1.192.2.1: +68 -25 lines
Diff to previous 1.192.2.1 (colored) to branchpoint 1.192 (colored)

sync with (a bit old) head

Revision 1.192.12.1 / (download) - annotate - [select for diffs], Tue Nov 20 03:02:44 2012 UTC (10 years, 2 months ago) by tls
Branch: tls-maxphys
Changes since 1.192: +94 -34 lines
Diff to previous 1.192 (colored)

Resync to 2012-11-19 00:00:00 UTC

Revision 1.192.8.1 / (download) - annotate - [select for diffs], Sun Nov 18 18:36:58 2012 UTC (10 years, 2 months ago) by msaitoh
Branch: netbsd-6
CVS Tags: netbsd-6-1-RELEASE, netbsd-6-1-RC4, netbsd-6-1-RC3, netbsd-6-1-RC2, netbsd-6-1-RC1, netbsd-6-1-5-RELEASE, netbsd-6-1-4-RELEASE, netbsd-6-1-3-RELEASE, netbsd-6-1-2-RELEASE, netbsd-6-1-1-RELEASE, netbsd-6-1
Changes since 1.192: +3 -2 lines
Diff to previous 1.192 (colored) next main 1.193 (colored)

Pull up following revision(s) (requested by dholland in ticket #664):
	sys/kern/vfs_lookup.c: revision 1.195
	sys/miscfs/genfs/layer_vnops.c: revision 1.51
In layer_lookup(), clear *vpp before returning EROFS, as otherwise a
stale value can be returned and this causes a diagnostic panic in
namei.
In relookup(), clear *vpp before calling VOP_LOOKUP, as is done in
lookup_once(), as an additional precautionary measure.
(in theory both of these fixes are not required together)
Should fix PR 47040.

Revision 1.200 / (download) - annotate - [select for diffs], Sun Nov 18 17:41:53 2012 UTC (10 years, 2 months ago) by manu
Branch: MAIN
CVS Tags: yamt-pagecache-base8, yamt-pagecache-base7, riastradh-drm2-base2, riastradh-drm2-base1, riastradh-drm2-base, riastradh-drm2, khorben-n900, agc-symver-base, agc-symver
Branch point for: rmind-smpnet
Changes since 1.199: +30 -4 lines
Diff to previous 1.199 (colored)

Add most system calls for POSIX extended API set, part 2, with test cases:
faccessat(2), fchmodat(2), fchownat(2), fstatat(2), mkdirat(2), mkfifoat(2),
mknodat(2), linkat(2), readlinkat(2), symlinkat(2), renameat(2), unlinkat(2),
utimensat(2), openat(2).

Also implement O_SEARCH for openat(2)

Still missing:
- some flags for openat(2)
- fexecve(2) implementation

Revision 1.72.2.3.6.1 / (download) - annotate - [select for diffs], Wed Nov 14 20:15:36 2012 UTC (10 years, 2 months ago) by riz
Branch: netbsd-4-0
Changes since 1.72.2.3: +3 -2 lines
Diff to previous 1.72.2.3 (colored) next main 1.72.2.4 (colored)

Pull up following revision(s) (requested by dholland in ticket #1466):
	sys/kern/vfs_lookup.c: revision 1.195
	sys/miscfs/genfs/layer_vnops.c: revision 1.51
In layer_lookup(), clear *vpp before returning EROFS, as otherwise a
stale value can be returned and this causes a diagnostic panic in
namei.
In relookup(), clear *vpp before calling VOP_LOOKUP, as is done in
lookup_once(), as an additional precautionary measure.
(in theory both of these fixes are not required together)
Should fix PR 47040.

Revision 1.72.2.4 / (download) - annotate - [select for diffs], Wed Nov 14 20:07:44 2012 UTC (10 years, 2 months ago) by riz
Branch: netbsd-4
Changes since 1.72.2.3: +3 -2 lines
Diff to previous 1.72.2.3 (colored) to branchpoint 1.72 (colored) next main 1.73 (colored)

Pull up following revision(s) (requested by dholland in ticket #1466):
	sys/kern/vfs_lookup.c: revision 1.195
	sys/miscfs/genfs/layer_vnops.c: revision 1.51
In layer_lookup(), clear *vpp before returning EROFS, as otherwise a
stale value can be returned and this causes a diagnostic panic in
namei.
In relookup(), clear *vpp before calling VOP_LOOKUP, as is done in
lookup_once(), as an additional precautionary measure.
(in theory both of these fixes are not required together)
Should fix PR 47040.

Revision 1.110.4.2 / (download) - annotate - [select for diffs], Tue Nov 6 20:02:46 2012 UTC (10 years, 2 months ago) by riz
Branch: netbsd-5
CVS Tags: netbsd-5-2-RELEASE, netbsd-5-2-RC1, netbsd-5-2-3-RELEASE, netbsd-5-2-2-RELEASE, netbsd-5-2-1-RELEASE, netbsd-5-2
Changes since 1.110.4.1: +3 -2 lines
Diff to previous 1.110.4.1 (colored) to branchpoint 1.110 (colored) next main 1.111 (colored)

Pull up following revision(s) (requested by dholland in ticket #1814):
	sys/kern/vfs_lookup.c: revision 1.195
	sys/miscfs/genfs/layer_vnops.c: revision 1.51
In layer_lookup(), clear *vpp before returning EROFS, as otherwise a
stale value can be returned and this causes a diagnostic panic in
namei.
In relookup(), clear *vpp before calling VOP_LOOKUP, as is done in
lookup_once(), as an additional precautionary measure.
(in theory both of these fixes are not required together)
Should fix PR 47040.

Revision 1.199 / (download) - annotate - [select for diffs], Mon Nov 5 21:35:28 2012 UTC (10 years, 2 months ago) by para
Branch: MAIN
Changes since 1.198: +3 -3 lines
Diff to previous 1.198 (colored)

make DEBUG kernels buildable again (typo)

Revision 1.198 / (download) - annotate - [select for diffs], Mon Nov 5 19:06:26 2012 UTC (10 years, 2 months ago) by dholland
Branch: MAIN
Changes since 1.197: +12 -12 lines
Diff to previous 1.197 (colored)

Rename the new ni_startdir (the slot used to hold the starting point
for openat() and friends) to ni_atdir to avoid confusion with a
previously existing (and, alas, still documented) ni_startdir field
that meant something else entirely.

Revision 1.197 / (download) - annotate - [select for diffs], Mon Nov 5 17:24:11 2012 UTC (10 years, 2 months ago) by dholland
Branch: MAIN
Changes since 1.196: +30 -13 lines
Diff to previous 1.196 (colored)

Disentangle the namecache from the internals of namei.

 - Move the namecache's hash computation to inside the namecache code,
instead of being spread out all over the place. Remove cn_hash from
struct componentname and delete all uses of it.

 - It is no longer necessary (if it ever was) for cache_lookup and
cache_lookup_raw to clear MAKEENTRY from cnp->cn_flags for the cases
that cache_enter already checks for.

 - Rearrange the interface of cache_lookup (and cache_lookup_raw) to
make it somewhat simpler, to exclude certain nonexistent error
conditions, and (most importantly) to make it not require write access
to cnp->cn_flags.

This change requires a kernel bump.

Revision 1.192.2.1 / (download) - annotate - [select for diffs], Tue Oct 30 17:22:38 2012 UTC (10 years, 3 months ago) by yamt
Branch: yamt-pagecache
Changes since 1.192: +38 -21 lines
Diff to previous 1.192 (colored)

sync with head

Revision 1.196 / (download) - annotate - [select for diffs], Sat Oct 13 17:46:50 2012 UTC (10 years, 3 months ago) by dholland
Branch: MAIN
CVS Tags: yamt-pagecache-base6
Changes since 1.195: +31 -36 lines
Diff to previous 1.195 (colored)

Replace hack implementation of NDAT() for "nameiat" with a proper one.
(This change requires a kernel bump.)

Revision 1.195 / (download) - annotate - [select for diffs], Wed Oct 10 06:55:25 2012 UTC (10 years, 3 months ago) by dholland
Branch: MAIN
Changes since 1.194: +3 -2 lines
Diff to previous 1.194 (colored)

In layer_lookup(), clear *vpp before returning EROFS, as otherwise a
stale value can be returned and this causes a diagnostic panic in
namei.

In relookup(), clear *vpp before calling VOP_LOOKUP, as is done in
lookup_once(), as an additional precautionary measure.

(in theory both of these fixes are not required together)

Should fix PR 47040.

Revision 1.194 / (download) - annotate - [select for diffs], Mon Oct 8 23:43:33 2012 UTC (10 years, 3 months ago) by dholland
Branch: MAIN
Changes since 1.193: +17 -3 lines
Diff to previous 1.193 (colored)

Add namei-level support for openat() and friends. The way you do it is
by calling NDAT(&nd, dirvp) after NDINIT().

Right now the implementation is vile and unspeakable to avoid changing
the kernel ABI; this way we can get openat() and friends into 6.1. I
will rectify the mess and bump the kernel once things are working.

Revision 1.193 / (download) - annotate - [select for diffs], Mon Oct 8 23:41:39 2012 UTC (10 years, 3 months ago) by dholland
Branch: MAIN
Changes since 1.192: +20 -13 lines
Diff to previous 1.192 (colored)

Tidy up namei internals to allow openat() and friends without getting
tangled in nfsd's special cases.

Revision 1.192 / (download) - annotate - [select for diffs], Tue Sep 27 02:10:55 2011 UTC (11 years, 4 months ago) by christos
Branch: MAIN
CVS Tags: yamt-pagecache-base5, yamt-pagecache-base4, yamt-pagecache-base3, yamt-pagecache-base2, yamt-pagecache-base, netbsd-6-base, netbsd-6-0-RELEASE, netbsd-6-0-RC2, netbsd-6-0-RC1, netbsd-6-0-6-RELEASE, netbsd-6-0-5-RELEASE, netbsd-6-0-4-RELEASE, netbsd-6-0-3-RELEASE, netbsd-6-0-2-RELEASE, netbsd-6-0-1-RELEASE, netbsd-6-0, matt-nb6-plus-nbase, matt-nb6-plus-base, matt-nb6-plus, jmcneill-usbmp-pre-base2, jmcneill-usbmp-base9, jmcneill-usbmp-base8, jmcneill-usbmp-base7, jmcneill-usbmp-base6, jmcneill-usbmp-base5, jmcneill-usbmp-base4, jmcneill-usbmp-base3, jmcneill-usbmp-base2, jmcneill-usbmp-base10, jmcneill-usbmp-base, jmcneill-usbmp, jmcneill-audiomp3-base, jmcneill-audiomp3
Branch point for: yamt-pagecache, tls-maxphys, netbsd-6
Changes since 1.191: +3 -2 lines
Diff to previous 1.191 (colored)

include <sys/dirent.h> to make MAXNAMLEN visible.

Revision 1.191 / (download) - annotate - [select for diffs], Tue Sep 27 01:42:45 2011 UTC (11 years, 4 months ago) by christos
Branch: MAIN
Changes since 1.190: +7 -5 lines
Diff to previous 1.190 (colored)

use KERNEL_NAME_MAX to enforce the same limit to names as before, and
make sure that MAXNAMLEN == NAME_MAX

Revision 1.190 / (download) - annotate - [select for diffs], Thu Sep 1 15:31:27 2011 UTC (11 years, 5 months ago) by yamt
Branch: MAIN
Changes since 1.189: +36 -12 lines
Diff to previous 1.189 (colored)

redo vfs_lookup.c rev.1.126.
when crossing a mount point, don't keep the parent vnode locked.
ie. don't lock a vnode while holding another vnode which belongs to a
different filesystem.  otherwise we propagate slowness (or deadness) of a
filesystem to another via vnode lock chain.

Revision 1.189 / (download) - annotate - [select for diffs], Sat Aug 13 19:40:02 2011 UTC (11 years, 5 months ago) by riastradh
Branch: MAIN
Changes since 1.188: +16 -2 lines
Diff to previous 1.188 (colored)

Handle absolute symlinks to the root.

Fixes panic on `ln -s / foo && cd foo' found by ober by trying to run
wine.

ok dholland

Revision 1.188 / (download) - annotate - [select for diffs], Wed Aug 10 05:42:32 2011 UTC (11 years, 5 months ago) by dholland
Branch: MAIN
Changes since 1.187: +4 -3 lines
Diff to previous 1.187 (colored)

Revert previous, it breaks nullfs. (And I guess there are no tests for
nullfs?)

Revision 1.187 / (download) - annotate - [select for diffs], Tue Aug 9 23:46:05 2011 UTC (11 years, 5 months ago) by dholland
Branch: MAIN
Changes since 1.186: +5 -6 lines
Diff to previous 1.186 (colored)

Fail namei immediately if searchdir is unlinked / has been rmdir'd.
Do this by checking if v_size == 0. Should fix PR 44658 (and PR 32661).

Revision 1.186 / (download) - annotate - [select for diffs], Tue Aug 9 23:16:17 2011 UTC (11 years, 5 months ago) by dholland
Branch: MAIN
Changes since 1.185: +6 -2 lines
Diff to previous 1.185 (colored)

Include missing part of previous commit to this file. (sigh)

Revision 1.185 / (download) - annotate - [select for diffs], Tue Aug 9 18:37:56 2011 UTC (11 years, 5 months ago) by dholland
Branch: MAIN
Changes since 1.184: +26 -36 lines
Diff to previous 1.184 (colored)

Simplify handling of slashes. Provides a proper fix for PR 44961.

Revision 1.131.2.1 / (download) - annotate - [select for diffs], Mon Jun 6 09:09:40 2011 UTC (11 years, 8 months ago) by jruoho
Branch: jruoho-x86intr
Changes since 1.131: +722 -589 lines
Diff to previous 1.131 (colored) next main 1.132 (colored)

Sync with HEAD.

Revision 1.121.4.4 / (download) - annotate - [select for diffs], Tue May 31 03:05:04 2011 UTC (11 years, 8 months ago) by rmind
Branch: rmind-uvmplock
Changes since 1.121.4.3: +1 -1 lines
Diff to previous 1.121.4.3 (colored) to branchpoint 1.121 (colored) next main 1.122 (colored)

sync with head

Revision 1.184 / (download) - annotate - [select for diffs], Mon May 16 15:09:31 2011 UTC (11 years, 8 months ago) by dholland
Branch: MAIN
CVS Tags: rmind-uvmplock-nbase, rmind-uvmplock-base, cherry-xenmp-base, cherry-xenmp
Changes since 1.183: +3 -3 lines
Diff to previous 1.183 (colored)

Hack for PR 44961: restore the prior "logic" pertaining to looking up /
to prevent a crash when attempting rename("/", "foo"). This is not really
what I want going forward and it may cause e.g. rmdir("blah/") to fail, so
if it causes trouble for anyone back it out. The right fix is going to have
to wait until the qemu/tcp_vtw problems I ran into last night get sorted out.

Revision 1.121.4.3 / (download) - annotate - [select for diffs], Thu Apr 21 01:42:11 2011 UTC (11 years, 9 months ago) by rmind
Branch: rmind-uvmplock
Changes since 1.121.4.2: +720 -587 lines
Diff to previous 1.121.4.2 (colored) to branchpoint 1.121 (colored)

sync with head

Revision 1.183 / (download) - annotate - [select for diffs], Mon Apr 18 00:47:24 2011 UTC (11 years, 9 months ago) by dholland
Branch: MAIN
Changes since 1.182: +18 -16 lines
Diff to previous 1.182 (colored)

Simplify logic: at the bottom of the loop, instead of checking if we
should continue and if not breaking unconditionally, check if we
should break and if not use the bottom of the loop to continue to the
next iteration.

Revision 1.182 / (download) - annotate - [select for diffs], Mon Apr 18 00:47:04 2011 UTC (11 years, 9 months ago) by dholland
Branch: MAIN
Changes since 1.181: +3 -9 lines
Diff to previous 1.181 (colored)

Goto considered harmful: now the "goto alldone" can be dropped by
reversing the sense of the associated test and using the big block I
moved a couple versions back (and didn't reindent on purpose) as the
body of the if statement.

There are now no gotos in namei_oneroot, only normal loop logic.

Revision 1.181 / (download) - annotate - [select for diffs], Mon Apr 18 00:46:39 2011 UTC (11 years, 9 months ago) by dholland
Branch: MAIN
Changes since 1.180: +8 -4 lines
Diff to previous 1.180 (colored)

The "goto alldone" from a couple patches back (inside the loop) can
now be changed to a loop break and another null test and goto outside
the loop. In neither of the other two cases for exiting the loop can
foundobj be null.

Revision 1.180 / (download) - annotate - [select for diffs], Mon Apr 18 00:46:14 2011 UTC (11 years, 9 months ago) by dholland
Branch: MAIN
Changes since 1.179: +3 -4 lines
Diff to previous 1.179 (colored)

Goto considered harmful: "goto terminal" can now just be "break".

Revision 1.179 / (download) - annotate - [select for diffs], Mon Apr 18 00:45:53 2011 UTC (11 years, 9 months ago) by dholland
Branch: MAIN
Changes since 1.178: +7 -4 lines
Diff to previous 1.178 (colored)

Move the big chunk of code at "terminal:" outside the loop; since it
has an unconditional loop break at the end this can be done safely,
now that the other loop break has been patched out.

Add a spurious set of braces to preserve the indent for the moment.

Revision 1.178 / (download) - annotate - [select for diffs], Mon Apr 18 00:45:29 2011 UTC (11 years, 9 months ago) by dholland
Branch: MAIN
Changes since 1.177: +5 -4 lines
Diff to previous 1.177 (colored)

Goto still harmful, but use "goto alldone" in place of a loop break
for now anyway.

Revision 1.177 / (download) - annotate - [select for diffs], Mon Apr 18 00:45:07 2011 UTC (11 years, 9 months ago) by dholland
Branch: MAIN
Changes since 1.176: +3 -4 lines
Diff to previous 1.176 (colored)

Goto considered harmful; remove dirloop: in favor of using a loop
continue.

This runs the "are we mounted?" test on every directory instead of
only sometimes; however, it's not exactly an expensive test (null
pointer check) and the prior logic wasn't exactly sensible -- it
checked at the beginning and after following a symlink but, for some
reason, not after crossing a mount point.

Revision 1.176 / (download) - annotate - [select for diffs], Mon Apr 18 00:40:53 2011 UTC (11 years, 9 months ago) by dholland
Branch: MAIN
Changes since 1.175: +4 -9 lines
Diff to previous 1.175 (colored)

ISSYMLINK is now only referenced inside vfs_lookup.c, and not needed
there, so get rid of it.

Revision 1.175 / (download) - annotate - [select for diffs], Thu Apr 14 15:29:25 2011 UTC (11 years, 9 months ago) by yamt
Branch: MAIN
Changes since 1.174: +28 -11 lines
Diff to previous 1.174 (colored)

assertions

Revision 1.174 / (download) - annotate - [select for diffs], Mon Apr 11 18:24:49 2011 UTC (11 years, 9 months ago) by jakllsch
Branch: MAIN
Changes since 1.173: +9 -3 lines
Diff to previous 1.173 (colored)

Partially revert part of -r1.167; it was wrong. From dholland.

Revision 1.173 / (download) - annotate - [select for diffs], Mon Apr 11 02:21:17 2011 UTC (11 years, 9 months ago) by dholland
Branch: MAIN
Changes since 1.172: +103 -54 lines
Diff to previous 1.172 (colored)

description:
Update comments.

Revision 1.172 / (download) - annotate - [select for diffs], Mon Apr 11 02:21:01 2011 UTC (11 years, 9 months ago) by dholland
Branch: MAIN
Changes since 1.171: +13 -2 lines
Diff to previous 1.171 (colored)

Add comment warning about case with LOCKPARENT but not LOCKLEAF. bleh.

Revision 1.171 / (download) - annotate - [select for diffs], Mon Apr 11 02:20:15 2011 UTC (11 years, 9 months ago) by dholland
Branch: MAIN
Changes since 1.170: +7 -11 lines
Diff to previous 1.170 (colored)

description:
Remove dead assignment of "error" and simplify some uses of it.

Revision 1.170 / (download) - annotate - [select for diffs], Mon Apr 11 02:20:00 2011 UTC (11 years, 9 months ago) by dholland
Branch: MAIN
Changes since 1.169: +25 -19 lines
Diff to previous 1.169 (colored)

description:
Simplify refcount handling/cleanup in three places.

Revision 1.169 / (download) - annotate - [select for diffs], Mon Apr 11 02:19:42 2011 UTC (11 years, 9 months ago) by dholland
Branch: MAIN
Changes since 1.168: +4 -3 lines
Diff to previous 1.168 (colored)

description:
Don't assign inside an if-expression without an explicit comparison.

Revision 1.168 / (download) - annotate - [select for diffs], Mon Apr 11 02:19:27 2011 UTC (11 years, 9 months ago) by dholland
Branch: MAIN
Changes since 1.167: +11 -16 lines
Diff to previous 1.167 (colored)

description:
Assign NULL to ni_dvp immediately before error return, rather than
halfway through the logic.

Revision 1.167 / (download) - annotate - [select for diffs], Mon Apr 11 02:19:11 2011 UTC (11 years, 9 months ago) by dholland
Branch: MAIN
Changes since 1.166: +7 -4 lines
Diff to previous 1.166 (colored)

description:
namei_follow() randomly drops foundobj on success. Do that in the
caller instead. On the other hand, the caller was updating cn_nameptr,
and since that's closely related to the buffer manipulation in
namei_follow, do that there.

Revision 1.166 / (download) - annotate - [select for diffs], Mon Apr 11 02:18:20 2011 UTC (11 years, 9 months ago) by dholland
Branch: MAIN
Changes since 1.165: +8 -7 lines
Diff to previous 1.165 (colored)

description:
Update some comments.

Revision 1.165 / (download) - annotate - [select for diffs], Mon Apr 11 02:18:07 2011 UTC (11 years, 9 months ago) by dholland
Branch: MAIN
Changes since 1.164: +7 -9 lines
Diff to previous 1.164 (colored)

description:
Don't assign ni_vp until namei_oneroot() returns.

Revision 1.164 / (download) - annotate - [select for diffs], Mon Apr 11 02:17:54 2011 UTC (11 years, 9 months ago) by dholland
Branch: MAIN
Changes since 1.163: +10 -7 lines
Diff to previous 1.163 (colored)

description:
Make sure namei_oneroot leaves ni_dvp and ni_vp NULL on error.

Revision 1.163 / (download) - annotate - [select for diffs], Mon Apr 11 02:17:41 2011 UTC (11 years, 9 months ago) by dholland
Branch: MAIN
Changes since 1.162: +10 -11 lines
Diff to previous 1.162 (colored)

description:
Cosmetic: names of scratch vnodes.

Revision 1.162 / (download) - annotate - [select for diffs], Mon Apr 11 02:17:28 2011 UTC (11 years, 9 months ago) by dholland
Branch: MAIN
Changes since 1.161: +12 -18 lines
Diff to previous 1.161 (colored)

description:
Remove state->lookup_alldone. Don't need it any more; it's set
precisely when succeeding with a null result vnode and it now works to
just check for that case.

(also, when "error" is already 0 we don't need to assign another 0 to
it, even as a precaution.)

Revision 1.161 / (download) - annotate - [select for diffs], Mon Apr 11 02:17:14 2011 UTC (11 years, 9 months ago) by dholland
Branch: MAIN
Changes since 1.160: +8 -8 lines
Diff to previous 1.160 (colored)

description:
Pass foundobj to namei_follow() instead of fishing in the global state.

Revision 1.160 / (download) - annotate - [select for diffs], Mon Apr 11 02:17:01 2011 UTC (11 years, 9 months ago) by dholland
Branch: MAIN
Changes since 1.159: +11 -5 lines
Diff to previous 1.159 (colored)

description:
Fix lookup_for_nfsd_index() -- it wasn't locking the directory it was
searching. I'm not sure if this is something I introduced or if it's
just been wrong for ages; the code path is used only for serving
index.html in WebNFS and probably just ought to be removed.

Revision 1.159 / (download) - annotate - [select for diffs], Mon Apr 11 02:16:27 2011 UTC (11 years, 9 months ago) by dholland
Branch: MAIN
Changes since 1.158: +14 -2 lines
Diff to previous 1.158 (colored)

description:
Ensure we don't leak stale pointers out in ni_dvp or ni_vp on error return.

Revision 1.158 / (download) - annotate - [select for diffs], Mon Apr 11 02:16:07 2011 UTC (11 years, 9 months ago) by dholland
Branch: MAIN
Changes since 1.157: +12 -7 lines
Diff to previous 1.157 (colored)

description:
In the test where we check if searchdir is NULL and fail if we needed
to return ni_dvp, also check if searchdir is on a different volume
from foundobj. I believe the NULL test was meant to encompass this
situation, but it definitely doesn't in some cases related to
emulroots. This appears to be a bug, and I'm pretty sure it's not one
I introduced.

(The search directory and result are on different volumes if we
crossed a mount point.)

Revision 1.157 / (download) - annotate - [select for diffs], Mon Apr 11 02:15:54 2011 UTC (11 years, 9 months ago) by dholland
Branch: MAIN
Changes since 1.156: +35 -29 lines
Diff to previous 1.156 (colored)

description:
Don't assign ni_dvp until the end of namei_oneroot().

Revision 1.156 / (download) - annotate - [select for diffs], Mon Apr 11 02:15:38 2011 UTC (11 years, 9 months ago) by dholland
Branch: MAIN
Changes since 1.155: +9 -6 lines
Diff to previous 1.155 (colored)

description:
Improve previous by manipulating ni_dvp more intelligently.

Revision 1.155 / (download) - annotate - [select for diffs], Mon Apr 11 02:15:21 2011 UTC (11 years, 9 months ago) by dholland
Branch: MAIN
Changes since 1.154: +4 -11 lines
Diff to previous 1.154 (colored)

description:
Don't bother conditionally doing vput(ndp->ni_dvp) where it's always null.
(and don't bother testing for null where it never is)

Revision 1.154 / (download) - annotate - [select for diffs], Mon Apr 11 02:15:09 2011 UTC (11 years, 9 months ago) by dholland
Branch: MAIN
Changes since 1.153: +8 -6 lines
Diff to previous 1.153 (colored)

description:
In lookup_once(), assign newsearchdir_ret when searchdir is updated,
instead of upon return.

Revision 1.153 / (download) - annotate - [select for diffs], Mon Apr 11 02:14:57 2011 UTC (11 years, 9 months ago) by dholland
Branch: MAIN
Changes since 1.152: +4 -4 lines
Diff to previous 1.152 (colored)

description:
vref new vnodes before vrele'ing old vnodes, just in case.

Revision 1.152 / (download) - annotate - [select for diffs], Mon Apr 11 02:13:22 2011 UTC (11 years, 9 months ago) by dholland
Branch: MAIN
Changes since 1.151: +14 -16 lines
Diff to previous 1.151 (colored)

description:
state->namei_startdir has no further reason to exist.

Revision 1.151 / (download) - annotate - [select for diffs], Mon Apr 11 02:13:10 2011 UTC (11 years, 9 months ago) by dholland
Branch: MAIN
Changes since 1.150: +3 -18 lines
Diff to previous 1.150 (colored)

description:
namei_end() doesn't really do anything useful at this point, so get
rid of it.

Revision 1.150 / (download) - annotate - [select for diffs], Mon Apr 11 02:12:58 2011 UTC (11 years, 9 months ago) by dholland
Branch: MAIN
Changes since 1.149: +11 -9 lines
Diff to previous 1.149 (colored)

description:
As ndp->ni_dvp is also assigned to the updated search dir on every
return from lookup_once(), pass it back instead and update ni_dvp in
the caller.

Revision 1.149 / (download) - annotate - [select for diffs], Mon Apr 11 02:12:42 2011 UTC (11 years, 9 months ago) by dholland
Branch: MAIN
Changes since 1.148: +4 -6 lines
Diff to previous 1.148 (colored)

description:
lookup_once() on success always sets ni_vp to the same thing as the
returned foundobj, so do that in the caller instead.

Revision 1.148 / (download) - annotate - [select for diffs], Mon Apr 11 02:11:32 2011 UTC (11 years, 9 months ago) by dholland
Branch: MAIN
Changes since 1.147: +17 -16 lines
Diff to previous 1.147 (colored)

description:
In lookup_once(), move the assignments to ni_dvp and ni_vp to just
before function return.

Revision 1.147 / (download) - annotate - [select for diffs], Mon Apr 11 01:40:13 2011 UTC (11 years, 9 months ago) by dholland
Branch: MAIN
Changes since 1.146: +53 -47 lines
Diff to previous 1.146 (colored)

Use locals/args instead of state->dp in namei_once(). Remove
state->dp.

Revision 1.146 / (download) - annotate - [select for diffs], Mon Apr 11 01:40:01 2011 UTC (11 years, 9 months ago) by dholland
Branch: MAIN
Changes since 1.145: +25 -28 lines
Diff to previous 1.145 (colored)

Split the variable that replaced state->dp into two, to reflect its
actual usage.

Revision 1.145 / (download) - annotate - [select for diffs], Mon Apr 11 01:39:46 2011 UTC (11 years, 9 months ago) by dholland
Branch: MAIN
Changes since 1.144: +33 -25 lines
Diff to previous 1.144 (colored)

In namei_oneroot(), use a local in place of state->dp.
state->dp is now only used by/in lookup_once().

Revision 1.144 / (download) - annotate - [select for diffs], Mon Apr 11 01:39:28 2011 UTC (11 years, 9 months ago) by dholland
Branch: MAIN
Changes since 1.143: +5 -5 lines
Diff to previous 1.143 (colored)

Improve namei_atsymlink to take the found object as an argument
instead of fetching it from the global state.

Revision 1.143 / (download) - annotate - [select for diffs], Mon Apr 11 01:39:13 2011 UTC (11 years, 9 months ago) by dholland
Branch: MAIN
Changes since 1.142: +4 -4 lines
Diff to previous 1.142 (colored)

Move unrelated error handling logic out of namei_parsepath.

Revision 1.142 / (download) - annotate - [select for diffs], Mon Apr 11 01:38:47 2011 UTC (11 years, 9 months ago) by dholland
Branch: MAIN
Changes since 1.141: +3 -3 lines
Diff to previous 1.141 (colored)

Move assignment of search directory from ni_dvp outside namei_follow.

Revision 1.141 / (download) - annotate - [select for diffs], Mon Apr 11 01:38:24 2011 UTC (11 years, 9 months ago) by dholland
Branch: MAIN
Changes since 1.140: +16 -11 lines
Diff to previous 1.140 (colored)

Improve namei_follow to handle the search dir as an argument instead
of in the global state.

Revision 1.140 / (download) - annotate - [select for diffs], Mon Apr 11 01:38:10 2011 UTC (11 years, 9 months ago) by dholland
Branch: MAIN
Changes since 1.139: +10 -8 lines
Diff to previous 1.139 (colored)

Improve namei_start to pass back its result instead of updating the
global state.

Revision 1.139 / (download) - annotate - [select for diffs], Mon Apr 11 01:37:43 2011 UTC (11 years, 9 months ago) by dholland
Branch: MAIN
Changes since 1.138: +187 -224 lines
Diff to previous 1.138 (colored)

Simplify.

Revision 1.138 / (download) - annotate - [select for diffs], Mon Apr 11 01:37:14 2011 UTC (11 years, 9 months ago) by dholland
Branch: MAIN
Changes since 1.137: +164 -142 lines
Diff to previous 1.137 (colored)

Fold do_lookup into namei.

Revision 1.137 / (download) - annotate - [select for diffs], Mon Apr 11 01:36:59 2011 UTC (11 years, 9 months ago) by dholland
Branch: MAIN
Changes since 1.136: +63 -40 lines
Diff to previous 1.136 (colored)

Split TRYEMULROOT handling into its own function.

Revision 1.136 / (download) - annotate - [select for diffs], Mon Apr 11 01:36:28 2011 UTC (11 years, 9 months ago) by dholland
Branch: MAIN
Changes since 1.135: +65 -3 lines
Diff to previous 1.135 (colored)

Cut and paste and simplify code used by the other nfsd entry point, so
it won't get in the way.

Revision 1.135 / (download) - annotate - [select for diffs], Mon Apr 11 01:35:55 2011 UTC (11 years, 9 months ago) by dholland
Branch: MAIN
Changes since 1.134: +11 -62 lines
Diff to previous 1.134 (colored)

Merge nfsd's cut&paste copy of namei with the master one.

Revision 1.134 / (download) - annotate - [select for diffs], Mon Apr 11 01:35:00 2011 UTC (11 years, 9 months ago) by dholland
Branch: MAIN
Changes since 1.133: +55 -99 lines
Diff to previous 1.133 (colored)

More cleanup.

Revision 1.133 / (download) - annotate - [select for diffs], Mon Apr 11 01:33:04 2011 UTC (11 years, 9 months ago) by dholland
Branch: MAIN
Changes since 1.132: +165 -110 lines
Diff to previous 1.132 (colored)

Clean up. Move some more code across from nfsd's private entry points.

Revision 1.132 / (download) - annotate - [select for diffs], Tue Mar 22 15:16:23 2011 UTC (11 years, 10 months ago) by pooka
Branch: MAIN
Changes since 1.131: +2 -4 lines
Diff to previous 1.131 (colored)

pnbuf_cache is used all over the place outside of vfs, so put it
in one place to avoid many definitions.

Revision 1.121.4.2 / (download) - annotate - [select for diffs], Sat Mar 5 20:55:26 2011 UTC (11 years, 11 months ago) by rmind
Branch: rmind-uvmplock
Changes since 1.121.4.1: +398 -236 lines
Diff to previous 1.121.4.1 (colored) to branchpoint 1.121 (colored)

sync with head

Revision 1.131 / (download) - annotate - [select for diffs], Tue Jan 4 07:43:42 2011 UTC (12 years, 1 month ago) by dholland
Branch: MAIN
CVS Tags: jruoho-x86intr-base, bouyer-quota2-nbase, bouyer-quota2-base, bouyer-quota2
Branch point for: jruoho-x86intr
Changes since 1.130: +151 -148 lines
Diff to previous 1.130 (colored)

Tsort functions and remove a small #if 0 block leftover from earlier cleanup.
No functional change.

Revision 1.130 / (download) - annotate - [select for diffs], Sun Jan 2 05:09:31 2011 UTC (12 years, 1 month ago) by dholland
Branch: MAIN
CVS Tags: matt-mips64-premerge-20101231
Changes since 1.129: +5 -5 lines
Diff to previous 1.129 (colored)

Remove the special refcount behavior (adding an extra reference to the
parent dir) associated with SAVESTART in relookup().

Check all call sites to make sure that SAVESTART wasn't set while
calling relookup(); if it was, adjust the refcount behavior. Remove
related references to SAVESTART.

The only code that was reaching the extra ref was msdosfs_rename,
where the refcount behavior was already fairly broken and/or gross;
repair it.

Add a dummy 4th argument to relookup to make sure code that hasn't
been inspected won't compile. (This will go away next time the
relookup semantics change, which they will.)

Revision 1.129 / (download) - annotate - [select for diffs], Sun Jan 2 05:04:58 2011 UTC (12 years, 1 month ago) by dholland
Branch: MAIN
Changes since 1.128: +7 -3 lines
Diff to previous 1.128 (colored)

Add an INRELOOKUP namei flag. Sigh. (We don't need more namei flags.)

However, because of a protocol deficiency puffs relies on being able
to keep track of VOP_LOOKUP calls by inspecting their contents, and
this at least allows it to use something vaguely principled instead of
making wild guesses based on whether SAVESTART is set.

Update libp2k to use INRELOOKUP instead of SAVESTART.

Revision 1.128 / (download) - annotate - [select for diffs], Sun Jan 2 05:01:20 2011 UTC (12 years, 1 month ago) by dholland
Branch: MAIN
Changes since 1.127: +17 -28 lines
Diff to previous 1.127 (colored)

Remove unused nameidata field ni_startdir.

Revision 1.127 / (download) - annotate - [select for diffs], Mon Dec 20 00:12:46 2010 UTC (12 years, 1 month ago) by yamt
Branch: MAIN
Changes since 1.126: +8 -33 lines
Diff to previous 1.126 (colored)

revert vfs_lookup.c rev.1.126 for now because some problems are reported
on source-changes-d@ (thanks pooka) and i don't think i can take a look at
them in a timely manner.

Revision 1.126 / (download) - annotate - [select for diffs], Fri Dec 17 22:34:04 2010 UTC (12 years, 1 month ago) by yamt
Branch: MAIN
Changes since 1.125: +35 -10 lines
Diff to previous 1.125 (colored)

- lookup_once: when crossing a mount point, don't keep the parent vnode locked.
  ie. don't lock a vnode while holding another vnode which belongs to a
  different filesystem.  otherwise we propagate slowness (or deadness) of a
  filesystem to another via vnode lock chain.
- lookup_parsepath: don't alter vnode states.  let the caller do it instead.
- add comments and assertions.

Revision 1.125 / (download) - annotate - [select for diffs], Tue Nov 30 10:43:05 2010 UTC (12 years, 2 months ago) by dholland
Branch: MAIN
Changes since 1.124: +2 -3 lines
Diff to previous 1.124 (colored)

Abolish the SAVENAME and HASBUF flags. There is now always a buffer,
so the path in a struct componentname is now always valid during VOP
calls.

Revision 1.124 / (download) - annotate - [select for diffs], Tue Nov 30 10:30:02 2010 UTC (12 years, 2 months ago) by dholland
Branch: MAIN
Changes since 1.123: +93 -72 lines
Diff to previous 1.123 (colored)

Abolish struct componentname's cn_pnbuf. Use the path buffer in the
pathbuf object passed to namei as work space instead. (For now a pnbuf
pointer appears in struct nameidata, to support certain unclean things
that haven't been fixed yet, but it will be going away in the future.)

This removes the need for the SAVENAME and HASBUF namei flags.

Revision 1.123 / (download) - annotate - [select for diffs], Fri Nov 19 06:44:43 2010 UTC (12 years, 2 months ago) by dholland
Branch: MAIN
Changes since 1.122: +169 -23 lines
Diff to previous 1.122 (colored)

Introduce struct pathbuf. This is an abstraction to hold a pathname
and the metadata required to interpret it. Callers of namei must now
create a pathbuf and pass it to NDINIT (instead of a string and a
uio_seg), then destroy the pathbuf after the namei session is
complete.

Update all namei call sites accordingly. Add a pathbuf(9) man page and
update namei(9).

The pathbuf interface also now appears in a couple of related
additional places that were passing string/uio_seg pairs that were
later fed into NDINIT. Update other call sites accordingly.

Revision 1.121.2.1 / (download) - annotate - [select for diffs], Tue Aug 17 06:47:33 2010 UTC (12 years, 5 months ago) by uebayasi
Branch: uebayasi-xip
Changes since 1.121: +6 -6 lines
Diff to previous 1.121 (colored) next main 1.122 (colored)

Sync with HEAD.

Revision 1.104.10.6 / (download) - annotate - [select for diffs], Wed Aug 11 22:54:44 2010 UTC (12 years, 5 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.104.10.5: +6 -6 lines
Diff to previous 1.104.10.5 (colored) to branchpoint 1.104 (colored) next main 1.105 (colored)

sync with head.

Revision 1.121.4.1 / (download) - annotate - [select for diffs], Sat Jul 3 01:19:56 2010 UTC (12 years, 7 months ago) by rmind
Branch: rmind-uvmplock
Changes since 1.121: +6 -6 lines
Diff to previous 1.121 (colored)

sync with head

Revision 1.122 / (download) - annotate - [select for diffs], Thu Jun 24 13:03:11 2010 UTC (12 years, 7 months ago) by hannken
Branch: MAIN
CVS Tags: yamt-nfs-mp-base11, yamt-nfs-mp-base10, uebayasi-xip-base4, uebayasi-xip-base3, uebayasi-xip-base2
Changes since 1.121: +6 -6 lines
Diff to previous 1.121 (colored)

Clean up vnode lock operations pass 2:

VOP_UNLOCK(vp, flags) -> VOP_UNLOCK(vp): Remove the unneeded flags argument.

Welcome to 5.99.32.

Discussed on tech-kern.

Revision 1.104.10.5 / (download) - annotate - [select for diffs], Thu Mar 11 15:04:21 2010 UTC (12 years, 10 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.104.10.4: +166 -16 lines
Diff to previous 1.104.10.4 (colored) to branchpoint 1.104 (colored)

sync with head

Revision 1.121 / (download) - annotate - [select for diffs], Fri Jan 8 11:35:10 2010 UTC (13 years ago) by pooka
Branch: MAIN
CVS Tags: yamt-nfs-mp-base9, uebayasi-xip-base1, uebayasi-xip-base
Branch point for: uebayasi-xip, rmind-uvmplock
Changes since 1.120: +15 -15 lines
Diff to previous 1.120 (colored)

The VATTR_NULL/VREF/VHOLD/HOLDRELE() macros lost their will to live
years ago when the kernel was modified to not alter ABI based on
DIAGNOSTIC, and now just call the respective function interfaces
(in lowercase).  Plenty of mix'n match upper/lowercase has creeped
into the tree since then.  Nuke the macros and convert all callsites
to lowercase.

no functional change

Revision 1.120 / (download) - annotate - [select for diffs], Sun Sep 27 17:23:54 2009 UTC (13 years, 4 months ago) by dholland
Branch: MAIN
CVS Tags: matt-premerge-20091211, jym-xensuspend-nbase
Changes since 1.119: +133 -3 lines
Diff to previous 1.119 (colored)

Move a big wodge of symlink-following code from nfsd to inside
lookup_for_nfsd(). This code is, or at least should be, the same as
the regular symlink-following code plus an extra flag nfsd needs.

The two lots of code can/will be merged in the future.

Revision 1.119 / (download) - annotate - [select for diffs], Sun Sep 27 17:19:07 2009 UTC (13 years, 4 months ago) by dholland
Branch: MAIN
Changes since 1.118: +25 -5 lines
Diff to previous 1.118 (colored)

Rename lookup() to lookup_for_nfsd(), to make it clear just whose
private backdoor entry point this is.

Also, clone the lookup_for_nfsd() entry point as
lookup_for_nfsd_index(), for use by a different call site in nfsd that
does different unclean things with nameidata.

Revision 1.104.10.4 / (download) - annotate - [select for diffs], Wed Aug 19 18:48:18 2009 UTC (13 years, 5 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.104.10.3: +469 -222 lines
Diff to previous 1.104.10.3 (colored) to branchpoint 1.104 (colored)

sync with head.

Revision 1.118 / (download) - annotate - [select for diffs], Sun Aug 9 07:27:54 2009 UTC (13 years, 5 months ago) by dholland
Branch: MAIN
CVS Tags: yamt-nfs-mp-base8, yamt-nfs-mp-base7
Changes since 1.117: +226 -121 lines
Diff to previous 1.117 (colored)

Begin splitting lookup() into more tractable pieces too.

Revision 1.117 / (download) - annotate - [select for diffs], Sun Aug 9 03:28:35 2009 UTC (13 years, 5 months ago) by dholland
Branch: MAIN
Changes since 1.116: +267 -125 lines
Diff to previous 1.116 (colored)

Begin splitting up namei into smaller pieces.

Revision 1.112.2.2 / (download) - annotate - [select for diffs], Thu Jul 23 23:32:36 2009 UTC (13 years, 6 months ago) by jym
Branch: jym-xensuspend
Changes since 1.112.2.1: +112 -32 lines
Diff to previous 1.112.2.1 (colored) to branchpoint 1.112 (colored) next main 1.113 (colored)

Sync with HEAD.

Revision 1.104.10.3 / (download) - annotate - [select for diffs], Sat Jul 18 14:53:23 2009 UTC (13 years, 6 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.104.10.2: +112 -32 lines
Diff to previous 1.104.10.2 (colored) to branchpoint 1.104 (colored)

sync with head.

Revision 1.116 / (download) - annotate - [select for diffs], Mon Jun 29 05:00:14 2009 UTC (13 years, 7 months ago) by dholland
Branch: MAIN
CVS Tags: yamt-nfs-mp-base6, jymxensuspend-base
Changes since 1.115: +75 -2 lines
Diff to previous 1.115 (colored)

Add namei_simple_kernel and namei_simple_user. These provide the common
case functionality of namei in a simple package with only a couple flags.

A substantial majority of the namei call sites in the kernel can use
this interface; this will isolate those areas from the changes arising
as the internals of namei are fumigated.

Revision 1.115 / (download) - annotate - [select for diffs], Fri Jun 26 15:49:03 2009 UTC (13 years, 7 months ago) by christos
Branch: MAIN
Changes since 1.114: +39 -32 lines
Diff to previous 1.114 (colored)

magic symlink cleanup:
- use size_t for len
- don't call strlen multiple times in macro
- add gid
- off by one in bounds calculation

Revision 1.112.2.1 / (download) - annotate - [select for diffs], Wed May 13 17:21:58 2009 UTC (13 years, 8 months ago) by jym
Branch: jym-xensuspend
Changes since 1.112: +10 -6 lines
Diff to previous 1.112 (colored)

Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.

Revision 1.104.10.2 / (download) - annotate - [select for diffs], Mon May 4 08:13:49 2009 UTC (13 years, 9 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.104.10.1: +12 -6 lines
Diff to previous 1.104.10.1 (colored) to branchpoint 1.104 (colored)

sync with head.

Revision 1.114 / (download) - annotate - [select for diffs], Mon May 4 06:05:19 2009 UTC (13 years, 9 months ago) by yamt
Branch: MAIN
CVS Tags: yamt-nfs-mp-base5, yamt-nfs-mp-base4, yamt-nfs-mp-base3, jym-xensuspend-base
Changes since 1.113: +8 -4 lines
Diff to previous 1.113 (colored)

when freeing cn_pnbuf, make it NULL if DIAGNOSTIC.

Revision 1.110.2.2 / (download) - annotate - [select for diffs], Tue Mar 3 18:32:57 2009 UTC (13 years, 11 months ago) by skrll
Branch: nick-hppapmap
Changes since 1.110.2.1: +4 -4 lines
Diff to previous 1.110.2.1 (colored) to branchpoint 1.110 (colored) next main 1.111 (colored)

Sync with HEAD.

Revision 1.113 / (download) - annotate - [select for diffs], Wed Feb 11 00:19:11 2009 UTC (13 years, 11 months ago) by enami
Branch: MAIN
CVS Tags: nick-hppapmap-base4, nick-hppapmap-base3, nick-hppapmap-base2, nick-hppapmap-base
Changes since 1.112: +4 -4 lines
Diff to previous 1.112 (colored)

Make module (auto)loading under chroot envrionment actually work:
- NOCHROOT flag must be assigned to different bit from TRYEMULROOT
  since the code expected to be executed is in the else clase of
  if (flags & TRYEMULROOT).
- Necessary variables aren't set.

Revision 1.110.2.1 / (download) - annotate - [select for diffs], Mon Jan 19 13:19:40 2009 UTC (14 years ago) by skrll
Branch: nick-hppapmap
Changes since 1.110: +6 -4 lines
Diff to previous 1.110 (colored)

Sync with HEAD.

Revision 1.104.6.2 / (download) - annotate - [select for diffs], Sat Jan 17 13:29:20 2009 UTC (14 years ago) by mjf
Branch: mjf-devfs2
Changes since 1.104.6.1: +4 -2 lines
Diff to previous 1.104.6.1 (colored) to branchpoint 1.104 (colored) next main 1.105 (colored)

Sync with HEAD.

Revision 1.112 / (download) - annotate - [select for diffs], Sat Jan 17 07:02:35 2009 UTC (14 years ago) by yamt
Branch: MAIN
CVS Tags: mjf-devfs2-base
Branch point for: jym-xensuspend
Changes since 1.111: +2 -3 lines
Diff to previous 1.111 (colored)

malloc -> kmem_alloc.

Revision 1.108.6.2 / (download) - annotate - [select for diffs], Sat Dec 13 01:15:09 2008 UTC (14 years, 1 month ago) by haad
Branch: haad-dm
Changes since 1.108.6.1: +6 -3 lines
Diff to previous 1.108.6.1 (colored) to branchpoint 1.108 (colored) next main 1.109 (colored)

Update haad-dm branch to haad-dm-base2.

Revision 1.110.4.1 / (download) - annotate - [select for diffs], Mon Nov 17 19:01:15 2008 UTC (14 years, 2 months ago) by snj
Branch: netbsd-5
CVS Tags: netbsd-5-1-RELEASE, netbsd-5-1-RC4, netbsd-5-1-RC3, netbsd-5-1-RC2, netbsd-5-1-RC1, netbsd-5-1-5-RELEASE, netbsd-5-1-4-RELEASE, netbsd-5-1-3-RELEASE, netbsd-5-1-2-RELEASE, netbsd-5-1-1-RELEASE, netbsd-5-1, netbsd-5-0-RELEASE, netbsd-5-0-RC4, netbsd-5-0-RC3, netbsd-5-0-RC2, netbsd-5-0-RC1, netbsd-5-0-2-RELEASE, netbsd-5-0-1-RELEASE, netbsd-5-0, matt-nb5-pq3-base, matt-nb5-pq3, matt-nb5-mips64-u2-k2-k4-k7-k8-k9, matt-nb5-mips64-u1-k1-k5, matt-nb5-mips64-premerge-20101231, matt-nb5-mips64-premerge-20091211, matt-nb5-mips64-k15, matt-nb5-mips64, matt-nb4-mips64-k7-u2a-k9b
Changes since 1.110: +6 -3 lines
Diff to previous 1.110 (colored)

Pull up following revision(s) (requested by ad in ticket #76):
	sys/sys/namei.h: revision 1.61
	sys/kern/vfs_lookup.c: revision 1.111
Add a NOCHROOT flag for namei(). Looks outside any chroot and performs the
lookup from the root directory if given an absolute path.

Revision 1.111 / (download) - annotate - [select for diffs], Fri Nov 14 21:57:14 2008 UTC (14 years, 2 months ago) by ad
Branch: MAIN
CVS Tags: haad-nbase2, haad-dm-base2, haad-dm-base, ad-audiomp2-base, ad-audiomp2
Changes since 1.110: +6 -3 lines
Diff to previous 1.110 (colored)

Add a NOCHROOT flag for namei(). Looks outside any chroot and performs the
lookup from the root directory if given an absolute path.

Revision 1.108.6.1 / (download) - annotate - [select for diffs], Sun Oct 19 22:17:29 2008 UTC (14 years, 3 months ago) by haad
Branch: haad-dm
Changes since 1.108: +2 -2 lines
Diff to previous 1.108 (colored)

Sync with HEAD.

Revision 1.110 / (download) - annotate - [select for diffs], Wed Aug 20 14:06:35 2008 UTC (14 years, 5 months ago) by pooka
Branch: MAIN
CVS Tags: wrstuden-revivesa-base-4, wrstuden-revivesa-base-3, wrstuden-revivesa-base-2, netbsd-5-base, matt-mips64-base2, haad-dm-base1
Branch point for: nick-hppapmap, netbsd-5
Changes since 1.109: +2 -4 lines
Diff to previous 1.109 (colored)

Remove my development ifdefs.  (hi simon!)

Revision 1.109 / (download) - annotate - [select for diffs], Thu Jul 31 05:38:05 2008 UTC (14 years, 6 months ago) by simonb
Branch: MAIN
Changes since 1.108: +4 -2 lines
Diff to previous 1.108 (colored)

Merge the simonb-wapbl branch.  From the original branch commit:

   Add Wasabi System's WAPBL (Write Ahead Physical Block Logging)
   journaling code.  Originally written by Darrin B. Jewell while
   at Wasabi and updated to -current by Antti Kantee, Andy Doran,
   Greg Oster and Simon Burge.

OK'd by core@, releng@.

Revision 1.108.4.1 / (download) - annotate - [select for diffs], Tue Jun 10 14:51:22 2008 UTC (14 years, 7 months ago) by simonb
Branch: simonb-wapbl
Changes since 1.108: +4 -2 lines
Diff to previous 1.108 (colored) next main 1.109 (colored)

Initial commit of Wasabi System's WAPBL (Write Ahead Physical Block
Logging) journaling code.  Originally written by Darrin B. Jewell
while at Wasabi and updated to -current by Antti Kantee, Andy Doran,
Greg Oster and Simon Burge.

Still a number of issues - look in doc/BRANCHES for "simonb-wapbl"
for more info.

Revision 1.104.6.1 / (download) - annotate - [select for diffs], Mon Jun 2 13:24:14 2008 UTC (14 years, 8 months ago) by mjf
Branch: mjf-devfs2
Changes since 1.104: +8 -6 lines
Diff to previous 1.104 (colored)

Sync with HEAD.

Revision 1.104.8.1 / (download) - annotate - [select for diffs], Sun May 18 12:35:11 2008 UTC (14 years, 8 months ago) by yamt
Branch: yamt-pf42
Changes since 1.104: +8 -6 lines
Diff to previous 1.104 (colored) next main 1.105 (colored)

sync with head.

Revision 1.104.10.1 / (download) - annotate - [select for diffs], Fri May 16 02:25:28 2008 UTC (14 years, 8 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.104: +8 -6 lines
Diff to previous 1.104 (colored)

sync with head.

Revision 1.108 / (download) - annotate - [select for diffs], Tue May 6 18:43:44 2008 UTC (14 years, 9 months ago) by ad
Branch: MAIN
CVS Tags: yamt-pf42-base4, yamt-pf42-base3, yamt-pf42-base2, yamt-nfs-mp-base2, wrstuden-revivesa-base-1, wrstuden-revivesa-base, wrstuden-revivesa, simonb-wapbl-nbase, simonb-wapbl-base, hpcarm-cleanup-nbase
Branch point for: simonb-wapbl, haad-dm
Changes since 1.107: +3 -4 lines
Diff to previous 1.107 (colored)

PR kern/38141 lookup/vfs_busy acquire rwlock recursively

Simplify the mount locking. Remove all the crud to deal with recursion on
the mount lock, and crud to deal with unmount as another weirdo lock.

Hopefully this will once and for all fix the deadlocks with this. With this
commit there are two locks on each mount:

- krwlock_t mnt_unmounting. This is used to prevent unmount across critical
  sections like getnewvnode(). It's only ever read locked with rw_tryenter(),
  and is only ever write locked in dounmount(). A write hold can't be taken
  on this lock if the current LWP could hold a vnode lock.

- kmutex_t mnt_updating. This is taken by threads updating the mount, for
  example when going r/o -> r/w, and is only present to serialize updates.
  In order to take this lock, a read hold must first be taken on
  mnt_unmounting, and the two need to be held across the operation.

One effect of this change: previously if an unmount failed, we would make a
half hearted attempt to back out of it gracefully, but that was unlikely to
work in a lot of cases. Now while an unmount that will be aborted is in
progress, new file operations within the mount will fail instead of being
delayed. That is unlikely to be a problem though, because if the admin
requests unmount of a file system then s(he) has made a decision to deny
access to the resource.

Revision 1.107 / (download) - annotate - [select for diffs], Tue May 6 15:04:00 2008 UTC (14 years, 9 months ago) by ad
Branch: MAIN
Changes since 1.106: +7 -4 lines
Diff to previous 1.106 (colored)

lookup: Do a vfs_trybusy(). If the file system is being unmounted, then
just fail the operation.

Revision 1.106 / (download) - annotate - [select for diffs], Wed Apr 30 12:49:16 2008 UTC (14 years, 9 months ago) by ad
Branch: MAIN
Changes since 1.105: +3 -3 lines
Diff to previous 1.105 (colored)

PR kern/38135 vfs_busy/vfs_trybusy confusion

The previous fix worked, but it opened a window where mounts could have
disappeared from mountlist while the caller was traversing it using
vfs_trybusy(). Fix that.

Revision 1.105 / (download) - annotate - [select for diffs], Tue Apr 29 23:51:04 2008 UTC (14 years, 9 months ago) by ad
Branch: MAIN
Changes since 1.104: +3 -3 lines
Diff to previous 1.104 (colored)

kern/38135 vfs_busy/vfs_trybusy confusion

The symptom was that sometimes file systems would occasionally not appear
in output from 'df' or 'mount' if the system was busy. Resolution:

- Make mount locks work somewhat like vm_map locks.
- vfs_trybusy() now only fails if the mount is gone, or if someone is
  unmounting the file system. Simple contention on mnt_lock doesn't
  cause it to fail.
- vfs_busy() will wait even if the file system is being unmounted.

Revision 1.97.2.4 / (download) - annotate - [select for diffs], Sun Mar 23 02:05:02 2008 UTC (14 years, 10 months ago) by matt
Branch: matt-armv6
Changes since 1.97.2.3: +4 -4 lines
Diff to previous 1.97.2.3 (colored) to branchpoint 1.97 (colored) next main 1.98 (colored)

sync with HEAD

Revision 1.98.4.4 / (download) - annotate - [select for diffs], Mon Feb 18 21:06:48 2008 UTC (14 years, 11 months ago) by mjf
Branch: mjf-devfs
Changes since 1.98.4.3: +4 -14 lines
Diff to previous 1.98.4.3 (colored) to branchpoint 1.98 (colored) next main 1.99 (colored)

Sync with HEAD.

Revision 1.62.2.9 / (download) - annotate - [select for diffs], Mon Feb 4 09:24:22 2008 UTC (15 years ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.62.2.8: +4 -4 lines
Diff to previous 1.62.2.8 (colored) next main 1.63 (colored)

sync with head.

Revision 1.104 / (download) - annotate - [select for diffs], Wed Jan 30 11:47:00 2008 UTC (15 years ago) by ad
Branch: MAIN
CVS Tags: yamt-pf42-baseX, yamt-pf42-base, yamt-nfs-mp-base, yamt-lazymbuf-base15, yamt-lazymbuf-base14, nick-net80211-sync-base, nick-net80211-sync, mjf-devfs-base, matt-armv6-nbase, keiichi-mipv6-nbase, keiichi-mipv6-base, keiichi-mipv6, hpcarm-cleanup-base, ad-socklock-base1
Branch point for: yamt-pf42, yamt-nfs-mp, mjf-devfs2
Changes since 1.103: +4 -4 lines
Diff to previous 1.103 (colored)

PR kern/37706 (forced unmount of file systems is unsafe):

- Do reference counting for 'struct mount'. Each vnode associated with a
  mount takes a reference, and in turn the mount takes a reference to the
  vfsops.
- Now that mounts are reference counted, replace the overcomplicated mount
  locking inherited from 4.4BSD with a recursable rwlock.

Revision 1.62.2.8 / (download) - annotate - [select for diffs], Mon Jan 21 09:46:32 2008 UTC (15 years ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.62.2.7: +8 -17 lines
Diff to previous 1.62.2.7 (colored)

sync with head

Revision 1.97.2.3 / (download) - annotate - [select for diffs], Wed Jan 9 01:56:30 2008 UTC (15 years ago) by matt
Branch: matt-armv6
Changes since 1.97.2.2: +15 -21 lines
Diff to previous 1.97.2.2 (colored) to branchpoint 1.97 (colored)

sync with HEAD

Revision 1.102.4.1 / (download) - annotate - [select for diffs], Wed Jan 2 21:56:23 2008 UTC (15 years, 1 month ago) by bouyer
Branch: bouyer-xeni386
CVS Tags: bouyer-xeni386-merge1
Changes since 1.102: +2 -12 lines
Diff to previous 1.102 (colored) next main 1.103 (colored)

Sync with HEAD

Revision 1.103 / (download) - annotate - [select for diffs], Mon Dec 31 15:32:13 2007 UTC (15 years, 1 month ago) by ad
Branch: MAIN
CVS Tags: matt-armv6-base, bouyer-xeni386-nbase, bouyer-xeni386-base
Changes since 1.102: +2 -12 lines
Diff to previous 1.102 (colored)

Remove systrace. Ok core@.

Revision 1.98.4.3 / (download) - annotate - [select for diffs], Thu Dec 27 00:46:19 2007 UTC (15 years, 1 month ago) by mjf
Branch: mjf-devfs
Changes since 1.98.4.2: +9 -8 lines
Diff to previous 1.98.4.2 (colored) to branchpoint 1.98 (colored)

Sync with HEAD.

Revision 1.100.2.2 / (download) - annotate - [select for diffs], Wed Dec 26 21:39:48 2007 UTC (15 years, 1 month ago) by ad
Branch: vmlocking2
Changes since 1.100.2.1: +9 -8 lines
Diff to previous 1.100.2.1 (colored) to branchpoint 1.100 (colored) next main 1.101 (colored)

Sync with head.

Revision 1.93.6.5 / (download) - annotate - [select for diffs], Sun Dec 9 19:38:28 2007 UTC (15 years, 1 month ago) by jmcneill
Branch: jmcneill-pm
Changes since 1.93.6.4: +15 -10 lines
Diff to previous 1.93.6.4 (colored) to branchpoint 1.93 (colored) next main 1.94 (colored)

Sync with HEAD.

Revision 1.102 / (download) - annotate - [select for diffs], Sat Dec 8 19:29:49 2007 UTC (15 years, 1 month ago) by pooka
Branch: MAIN
CVS Tags: yamt-kmem-base3, yamt-kmem-base2, yamt-kmem-base, yamt-kmem, vmlocking2-base3, jmcneill-pm-base, cube-autoconf-base, cube-autoconf
Branch point for: bouyer-xeni386
Changes since 1.101: +9 -8 lines
Diff to previous 1.101 (colored)

Remove cn_lwp from struct componentname.  curlwp should be used
from on.  The NDINIT() macro no longer takes the lwp parameter and
associates the credentials of the calling thread with the namei
structure.

Revision 1.98.4.2 / (download) - annotate - [select for diffs], Sat Dec 8 18:20:44 2007 UTC (15 years, 1 month ago) by mjf
Branch: mjf-devfs
Changes since 1.98.4.1: +9 -6 lines
Diff to previous 1.98.4.1 (colored) to branchpoint 1.98 (colored)

Sync with HEAD.

Revision 1.100.2.1 / (download) - annotate - [select for diffs], Sat Dec 8 17:57:50 2007 UTC (15 years, 1 month ago) by ad
Branch: vmlocking2
Changes since 1.100: +8 -4 lines
Diff to previous 1.100 (colored)

Sync with head.

Revision 1.62.2.7 / (download) - annotate - [select for diffs], Fri Dec 7 17:33:21 2007 UTC (15 years, 1 month ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.62.2.6: +9 -6 lines
Diff to previous 1.62.2.6 (colored)

sync with head

Revision 1.101 / (download) - annotate - [select for diffs], Tue Dec 4 22:09:02 2007 UTC (15 years, 2 months ago) by mjf
Branch: MAIN
CVS Tags: vmlocking2-base2, reinoud-bufcleanup-nbase, reinoud-bufcleanup-base
Changes since 1.100: +8 -4 lines
Diff to previous 1.100 (colored)

Implement a new magic string for magic symlinks, @ruid, which exapnds to the
real user id of the process and use this magic string for per-user tmp.
This should fix PR/35687

Kernel parts reviewed by wrstuden@

Revision 1.93.6.4 / (download) - annotate - [select for diffs], Tue Nov 27 19:38:17 2007 UTC (15 years, 2 months ago) by joerg
Branch: jmcneill-pm
Changes since 1.93.6.3: +3 -4 lines
Diff to previous 1.93.6.3 (colored) to branchpoint 1.93 (colored)

Sync with HEAD. amd64 Xen support needs testing.

Revision 1.100 / (download) - annotate - [select for diffs], Mon Nov 26 19:02:07 2007 UTC (15 years, 2 months ago) by pooka
Branch: MAIN
CVS Tags: vmlocking2-base1, vmlocking-nbase
Branch point for: vmlocking2
Changes since 1.99: +3 -4 lines
Diff to previous 1.99 (colored)

Remove the "struct lwp *" argument from all VFS and VOP interfaces.
The general trend is to remove it from all kernel interfaces and
this is a start.  In case the calling lwp is desired, curlwp should
be used.

quick consensus on tech-kern

Revision 1.98.4.1 / (download) - annotate - [select for diffs], Mon Nov 19 00:48:59 2007 UTC (15 years, 2 months ago) by mjf
Branch: mjf-devfs
Changes since 1.98: +3 -4 lines
Diff to previous 1.98 (colored)

Sync with HEAD.

Revision 1.62.2.6 / (download) - annotate - [select for diffs], Thu Nov 15 11:44:57 2007 UTC (15 years, 2 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.62.2.5: +3 -4 lines
Diff to previous 1.62.2.5 (colored)

sync with head.

Revision 1.98.2.1 / (download) - annotate - [select for diffs], Tue Nov 13 16:02:37 2007 UTC (15 years, 2 months ago) by bouyer
Branch: bouyer-xenamd64
Changes since 1.98: +3 -4 lines
Diff to previous 1.98 (colored) next main 1.99 (colored)

Sync with HEAD

Revision 1.93.6.3 / (download) - annotate - [select for diffs], Sun Nov 11 16:48:19 2007 UTC (15 years, 2 months ago) by joerg
Branch: jmcneill-pm
Changes since 1.93.6.2: +3 -4 lines
Diff to previous 1.93.6.2 (colored) to branchpoint 1.93 (colored)

Sync with HEAD.

Revision 1.97.2.2 / (download) - annotate - [select for diffs], Thu Nov 8 11:00:10 2007 UTC (15 years, 2 months ago) by matt
Branch: matt-armv6
CVS Tags: matt-armv6-prevmlocking
Changes since 1.97.2.1: +3 -4 lines
Diff to previous 1.97.2.1 (colored) to branchpoint 1.97 (colored)

sync with -HEAD

Revision 1.99 / (download) - annotate - [select for diffs], Wed Nov 7 00:23:25 2007 UTC (15 years, 3 months ago) by ad
Branch: MAIN
CVS Tags: bouyer-xenamd64-base2, bouyer-xenamd64-base
Changes since 1.98: +3 -4 lines
Diff to previous 1.98 (colored)

Merge from vmlocking:

- pool_cache changes.
- Debugger/procfs locking fixes.
- Other minor changes.

Revision 1.97.2.1 / (download) - annotate - [select for diffs], Tue Nov 6 23:32:47 2007 UTC (15 years, 3 months ago) by matt
Branch: matt-armv6
Changes since 1.97: +4 -4 lines
Diff to previous 1.97 (colored)

sync with HEAD

Revision 1.62.2.5 / (download) - annotate - [select for diffs], Sat Oct 27 11:35:41 2007 UTC (15 years, 3 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.62.2.4: +4 -4 lines
Diff to previous 1.62.2.4 (colored)

sync with head.

Revision 1.93.6.2 / (download) - annotate - [select for diffs], Fri Oct 26 15:48:46 2007 UTC (15 years, 3 months ago) by joerg
Branch: jmcneill-pm
Changes since 1.93.6.1: +4 -4 lines
Diff to previous 1.93.6.1 (colored) to branchpoint 1.93 (colored)

Sync with HEAD.

Follow the merge of pmap.c on i386 and amd64 and move
pmap_init_tmp_pgtbl into arch/x86/x86/pmap.c. Modify the ACPI wakeup
code to restore CR4 before jumping back into kernel space as the large
page option might cover that.

Revision 1.97.4.1 / (download) - annotate - [select for diffs], Sun Oct 14 11:48:49 2007 UTC (15 years, 3 months ago) by yamt
Branch: yamt-x86pmap
Changes since 1.97: +4 -4 lines
Diff to previous 1.97 (colored) next main 1.98 (colored)

sync with head.

Revision 1.98 / (download) - annotate - [select for diffs], Wed Oct 10 20:42:27 2007 UTC (15 years, 3 months ago) by ad
Branch: MAIN
CVS Tags: yamt-x86pmap-base4, yamt-x86pmap-base3, vmlocking-base, jmcneill-base
Branch point for: mjf-devfs, bouyer-xenamd64
Changes since 1.97: +4 -4 lines
Diff to previous 1.97 (colored)

Merge from vmlocking:

- Split vnode::v_flag into three fields, depending on field locking.
- simple_lock -> kmutex in a few places.
- Fix some simple locking problems.

Revision 1.62.2.4 / (download) - annotate - [select for diffs], Mon Sep 3 14:41:21 2007 UTC (15 years, 5 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.62.2.3: +122 -96 lines
Diff to previous 1.62.2.3 (colored)

sync with head.

Revision 1.93.2.2 / (download) - annotate - [select for diffs], Mon Sep 3 10:23:05 2007 UTC (15 years, 5 months ago) by skrll
Branch: nick-csl-alignment
Changes since 1.93.2.1: +7 -11 lines
Diff to previous 1.93.2.1 (colored) to branchpoint 1.93 (colored) next main 1.94 (colored)

Sync with HEAD.

Revision 1.84.4.5 / (download) - annotate - [select for diffs], Sat Sep 1 12:56:50 2007 UTC (15 years, 5 months ago) by ad
Branch: vmlocking
Changes since 1.84.4.4: +3 -4 lines
Diff to previous 1.84.4.4 (colored) to branchpoint 1.84 (colored) next main 1.85 (colored)

Update for pool_cache API changes.

Revision 1.84.4.4 / (download) - annotate - [select for diffs], Mon Aug 20 21:27:43 2007 UTC (15 years, 5 months ago) by ad
Branch: vmlocking
Changes since 1.84.4.3: +10 -18 lines
Diff to previous 1.84.4.3 (colored) to branchpoint 1.84 (colored)

Sync with HEAD.

Revision 1.93.6.1 / (download) - annotate - [select for diffs], Thu Aug 16 11:03:43 2007 UTC (15 years, 5 months ago) by jmcneill
Branch: jmcneill-pm
Changes since 1.93: +10 -18 lines
Diff to previous 1.93 (colored)

Sync with HEAD.

Revision 1.93.2.1 / (download) - annotate - [select for diffs], Wed Aug 15 13:49:22 2007 UTC (15 years, 5 months ago) by skrll
Branch: nick-csl-alignment
Changes since 1.93: +5 -9 lines
Diff to previous 1.93 (colored)

Sync with HEAD.

Revision 1.97 / (download) - annotate - [select for diffs], Wed Aug 15 12:07:34 2007 UTC (15 years, 5 months ago) by ad
Branch: MAIN
CVS Tags: yamt-x86pmap-base2, yamt-x86pmap-base, nick-csl-alignment-base5
Branch point for: yamt-x86pmap, matt-armv6
Changes since 1.96: +7 -11 lines
Diff to previous 1.96 (colored)

Changes to make ktrace LKM friendly and reduce ifdef KTRACE. Proposed
on tech-kern.

Revision 1.96 / (download) - annotate - [select for diffs], Sun Aug 12 23:40:40 2007 UTC (15 years, 5 months ago) by pooka
Branch: MAIN
Changes since 1.95: +4 -4 lines
Diff to previous 1.95 (colored)

Revert code part of rev 1.95, yamt pointed out it changes NFS semantics.

Revision 1.95 / (download) - annotate - [select for diffs], Sun Aug 12 19:42:09 2007 UTC (15 years, 5 months ago) by pooka
Branch: MAIN
Changes since 1.94: +4 -8 lines
Diff to previous 1.94 (colored)

CREATE is a write operation in my book, so check for that also when
checking for a readonly lookup.  This shouldn't make a difference
now, though, as the only RDONLY lookup is done by getcwd(), and
that a) doesn't create files b) calls LOOKUP directly anyway.

Also, fix comment I managed to miss in the previous commit (I didn't
expect the same comment to be there twice).

Revision 1.94 / (download) - annotate - [select for diffs], Sun Aug 12 19:31:12 2007 UTC (15 years, 5 months ago) by pooka
Branch: MAIN
Changes since 1.93: +4 -4 lines
Diff to previous 1.93 (colored)

cn_flags RDONLY brilliantly has nothing to do with the file system
itself being r/o, so fix a couple of misguided comments.

Revision 1.84.6.1 / (download) - annotate - [select for diffs], Wed Jul 11 20:10:22 2007 UTC (15 years, 6 months ago) by mjf
Branch: mjf-ufs-trans
Changes since 1.84: +119 -85 lines
Diff to previous 1.84 (colored) next main 1.85 (colored)

Sync with head.

Revision 1.93 / (download) - annotate - [select for diffs], Mon Jul 9 21:10:57 2007 UTC (15 years, 6 months ago) by ad
Branch: MAIN
CVS Tags: nick-csl-alignment-base, mjf-ufs-trans-base, matt-mips64-base, matt-mips64, hpcarm-cleanup
Branch point for: nick-csl-alignment, jmcneill-pm
Changes since 1.92: +5 -4 lines
Diff to previous 1.92 (colored)

Merge some of the less invasive changes from the vmlocking branch:

- kthread, callout, devsw API changes
- select()/poll() improvements
- miscellaneous MT safety improvements

Revision 1.84.4.3 / (download) - annotate - [select for diffs], Sun Jun 17 21:31:32 2007 UTC (15 years, 7 months ago) by ad
Branch: vmlocking
Changes since 1.84.4.2: +4 -4 lines
Diff to previous 1.84.4.2 (colored) to branchpoint 1.84 (colored)

- Increase the number of thread priorities from 128 to 256. How the space
  is set up is to be revisited.
- Implement soft interrupts as kernel threads. A generic implementation
  is provided, with hooks for fast-path MD code that can run the interrupt
  threads over the top of other threads executing in the kernel.
- Split vnode::v_flag into three fields, depending on how the flag is
  locked (by the interlock, by the vnode lock, by the file system).
- Miscellaneous locking fixes and improvements.

Revision 1.84.4.2 / (download) - annotate - [select for diffs], Fri Jun 8 14:17:29 2007 UTC (15 years, 7 months ago) by ad
Branch: vmlocking
Changes since 1.84.4.1: +115 -84 lines
Diff to previous 1.84.4.1 (colored) to branchpoint 1.84 (colored)

Sync with head.

Revision 1.92 / (download) - annotate - [select for diffs], Sat May 19 22:11:22 2007 UTC (15 years, 8 months ago) by christos
Branch: MAIN
Changes since 1.91: +2 -49 lines
Diff to previous 1.91 (colored)

- remove pathname_ interface.
- use macros to deal with pathnames in userspace, when veriexec is used.
- reorder the veriexec_ call arguments for consistency.
With help from elad@ finding the last bug.

Revision 1.81.2.2 / (download) - annotate - [select for diffs], Mon May 7 10:55:50 2007 UTC (15 years, 9 months ago) by yamt
Branch: yamt-idlelwp
Changes since 1.81.2.1: +118 -38 lines
Diff to previous 1.81.2.1 (colored) to branchpoint 1.81 (colored) next main 1.82 (colored)

sync with head.

Revision 1.91 / (download) - annotate - [select for diffs], Thu Apr 26 21:21:44 2007 UTC (15 years, 9 months ago) by dsl
Branch: MAIN
CVS Tags: yamt-idlelwp-base8
Changes since 1.90: +3 -3 lines
Diff to previous 1.90 (colored)

Since ktrace/systrace can sleep, move the VREF(dp) to before them.

Revision 1.90 / (download) - annotate - [select for diffs], Thu Apr 26 20:58:37 2007 UTC (15 years, 9 months ago) by dsl
Branch: MAIN
Changes since 1.89: +16 -17 lines
Diff to previous 1.89 (colored)

Be a little less over-zelous about converting ".." at the emulation root
to the real root.  Rather that do the check inside lookup() - where it
applies to to every ".." in a pathname, explicitly check the start of
the caller-supplied buffers and any absolute symbolic links.
Note that in the latter case the re-search from the real root is supressed.
Should fix PR kern/36225

Revision 1.89 / (download) - annotate - [select for diffs], Thu Apr 26 20:06:55 2007 UTC (15 years, 9 months ago) by dsl
Branch: MAIN
Changes since 1.88: +16 -9 lines
Diff to previous 1.88 (colored)

Pass the emulation root string into namei() from emul_find_interp() so that
the ktrace entries for lookups done during exec can have the full filename.
This is rather a hack :-)

Revision 1.88 / (download) - annotate - [select for diffs], Thu Apr 26 16:27:32 2007 UTC (15 years, 9 months ago) by dsl
Branch: MAIN
Changes since 1.87: +22 -11 lines
Diff to previous 1.87 (colored)

Move the ktrace (and systrace) in namei() inside the retry loop for
emulation lookups.
If doing a lookup relative to the emulation root, prepend the emulation root
to the traced filename.
While here pass the filename length through to the ktrace code since namei()
knows the length and ktr_namei() would have to call strlen().
Note: that if namei() is being called during execve processing, the emulation
root name isn't available and "/emul/???" is used.  Also namei() has to use
strlen() to get the lenght on the emulatoon root - even though it is a
compile-time constant string.

Revision 1.87 / (download) - annotate - [select for diffs], Wed Apr 25 20:41:42 2007 UTC (15 years, 9 months ago) by dsl
Branch: MAIN
Changes since 1.86: +44 -37 lines
Diff to previous 1.86 (colored)

Move the place where we convert the return value of emulation lookups that
would return the emulation-root to the real root to the main exit path.
Means that lookups of both "/" and "/." get converted from "/emul/xxx" to "/".

Revision 1.86 / (download) - annotate - [select for diffs], Mon Apr 23 07:04:30 2007 UTC (15 years, 9 months ago) by dsl
Branch: MAIN
Changes since 1.85: +6 -4 lines
Diff to previous 1.85 (colored)

When we return the real root instead of the emulated root, we may
not have the parent vnode for the emulated root - so dont vput() it.
May fix PR kern/36197.

Revision 1.85 / (download) - annotate - [select for diffs], Sun Apr 22 08:30:01 2007 UTC (15 years, 9 months ago) by dsl
Branch: MAIN
Changes since 1.84: +66 -12 lines
Diff to previous 1.84 (colored)

Change the way that emulations locate files within the emulation root to
  avoid having to allocate space in the 'stackgap'
  - which is very LWP unfriendly.
The additional code for non-emulation namei() is trivial, the reduction for
  the emulations is massive.
The vnode for a processes emulation root is saved in the cwdi structure
  during process exec.
If the emulation root the TRYEMULROOT flag are set, namei() will do an initial
  search for absolute pathnames in the emulation root, if that fails it will
  retry from the normal root.
".." at the emulation root will always go to the real root, even in the middle
  of paths and when expanding symlinks.
Absolute symlinks found using absolute paths in the emulation root will be
  relative to the emulation root (so /usr/lib/xxx.so -> /lib/xxx.so links
  inside the emulation root don't need changing).
If the root of the emulation would be returned (for an emulation lookup), then
  the real root is returned instead (matching the behaviour of emul_lookup,
  but being a cheap comparison here) so that programs that scan "../.."
  looking for the root dircetory don't loop forever.
The target for symbolic links is no longer mangled (it used to get the
  CHECK_ALT_xxx() treatment, so could get /emul/xxx prepended).
CHECK_ALT_xxx() are no more. Most of the change is deleting them, and adding
  TRYEMULROOT to the flags to NDINIT().
A lot of the emulation system call stubs could now be deleted.

Revision 1.84.4.1 / (download) - annotate - [select for diffs], Wed Mar 21 20:16:32 2007 UTC (15 years, 10 months ago) by ad
Branch: vmlocking
Changes since 1.84: +6 -3 lines
Diff to previous 1.84 (colored)

- Put a lock around the proc's CWD info (work in progress).
- Replace some more simplelocks.
- Make lbolt a condvar.

Revision 1.81.2.1 / (download) - annotate - [select for diffs], Tue Feb 27 16:54:35 2007 UTC (15 years, 11 months ago) by yamt
Branch: yamt-idlelwp
Changes since 1.81: +6 -6 lines
Diff to previous 1.81 (colored)

- sync with head.
- move sched_changepri back to kern_synch.c as it doesn't know PPQ anymore.

Revision 1.62.2.3 / (download) - annotate - [select for diffs], Mon Feb 26 09:11:22 2007 UTC (15 years, 11 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.62.2.2: +23 -53 lines
Diff to previous 1.62.2.2 (colored)

sync with head.

Revision 1.84 / (download) - annotate - [select for diffs], Thu Feb 22 06:34:45 2007 UTC (15 years, 11 months ago) by thorpej
Branch: MAIN
CVS Tags: thorpej-atomic-base, thorpej-atomic, reinoud-bufcleanup, ad-audiomp-base, ad-audiomp
Branch point for: vmlocking, mjf-ufs-trans
Changes since 1.83: +4 -4 lines
Diff to previous 1.83 (colored)

TRUE -> true, FALSE -> false

Revision 1.83 / (download) - annotate - [select for diffs], Wed Feb 21 23:00:05 2007 UTC (15 years, 11 months ago) by thorpej
Branch: MAIN
Changes since 1.82: +3 -3 lines
Diff to previous 1.82 (colored)

Replace the Mach-derived boolean_t type with the C99 bool type.  A
future commit will replace use of TRUE and FALSE with true and false.

Revision 1.72.2.3 / (download) - annotate - [select for diffs], Sat Feb 17 23:27:47 2007 UTC (15 years, 11 months ago) by tron
Branch: netbsd-4
CVS Tags: wrstuden-fixsa-newbase, wrstuden-fixsa-base-1, wrstuden-fixsa-base, wrstuden-fixsa, netbsd-4-0-RELEASE, netbsd-4-0-RC5, netbsd-4-0-RC4, netbsd-4-0-RC3, netbsd-4-0-RC2, netbsd-4-0-RC1, netbsd-4-0-1-RELEASE, matt-nb4-arm-base, matt-nb4-arm
Branch point for: netbsd-4-0
Changes since 1.72.2.2: +92 -98 lines
Diff to previous 1.72.2.2 (colored) to branchpoint 1.72 (colored)

Apply patch (requested by chs in ticket #422):
- Fix various deadlock problems with nullfs and unionfs.
- Speed up path lookups by upto 25%.

Revision 1.82 / (download) - annotate - [select for diffs], Sat Feb 17 22:31:44 2007 UTC (15 years, 11 months ago) by pavel
Branch: MAIN
Changes since 1.81: +3 -3 lines
Diff to previous 1.81 (colored)

Change the process/lwp flags seen by userland via sysctl back to the
P_*/L_* naming convention, and rename the in-kernel flags to avoid
conflict. (P_ -> PK_, L_ -> LW_ ). Add back the (now unused) LSDEAD
constant.

Restores source compatibility with pre-newlock2 tools like ps or top.

Reviewed by Andrew Doran.

Revision 1.71.4.4 / (download) - annotate - [select for diffs], Fri Feb 9 21:03:53 2007 UTC (15 years, 11 months ago) by ad
Branch: newlock2
Changes since 1.71.4.3: +10 -39 lines
Diff to previous 1.71.4.3 (colored) to branchpoint 1.71 (colored) next main 1.72 (colored)

Sync with HEAD.

Revision 1.72.2.2 / (download) - annotate - [select for diffs], Wed Feb 7 13:02:17 2007 UTC (15 years, 11 months ago) by tron
Branch: netbsd-4
Changes since 1.72.2.1: +2 -1 lines
Diff to previous 1.72.2.1 (colored) to branchpoint 1.72 (colored)

Pull up following revision(s) (requested by elad in ticket #399):
	sys/kern/vfs_lookup.c: revision 1.80
PR/35524: Brian de Alwis: panic from free in pathname_get
Patch applied, thanks for the report!

Revision 1.81 / (download) - annotate - [select for diffs], Sun Feb 4 15:03:20 2007 UTC (16 years ago) by chs
Branch: MAIN
CVS Tags: post-newlock2-merge, newlock2-nbase, newlock2-base
Branch point for: yamt-idlelwp
Changes since 1.80: +10 -39 lines
Diff to previous 1.80 (colored)

more fixes for the new vnode locking scheme:
 - don't use SAVESTART in calls to relookup() from unionfs,
   just vref() the desired vnode when we need to.
 - fix locking and refcounting in the unionfs EEXIST error cases.
 - release any vnode locks before calling VFS_ROOT(), vfs_busy() is enough.
   this allows us to simplify union_root() and fix PR 3006.
 - union_lock() doesn't handle shared lock requests correctly,
   so convert them to exclusive instead.  fixes PR 34775.
 - in relookup(), avoid reusing "dp" for different purposes,
   the error handling wasn't right.  (actually just get rid of dp.)
   also, change relookup() to ignore LOCKLEAF and always return the
   vnode locked since the callers already expect this.

Revision 1.71.4.3 / (download) - annotate - [select for diffs], Thu Feb 1 08:48:39 2007 UTC (16 years ago) by ad
Branch: newlock2
Changes since 1.71.4.2: +4 -3 lines
Diff to previous 1.71.4.2 (colored) to branchpoint 1.71 (colored)

Sync with head.

Revision 1.80 / (download) - annotate - [select for diffs], Wed Jan 31 08:29:20 2007 UTC (16 years ago) by elad
Branch: MAIN
Changes since 1.79: +4 -3 lines
Diff to previous 1.79 (colored)

PR/35524: Brian de Alwis: panic from free in pathname_get

Patch applied, thanks for the report!

Revision 1.71.4.2 / (download) - annotate - [select for diffs], Fri Jan 12 01:04:07 2007 UTC (16 years ago) by ad
Branch: newlock2
Changes since 1.71.4.1: +139 -65 lines
Diff to previous 1.71.4.1 (colored) to branchpoint 1.71 (colored)

Sync with head.

Revision 1.79 / (download) - annotate - [select for diffs], Sun Jan 7 21:33:24 2007 UTC (16 years ago) by pooka
Branch: MAIN
Changes since 1.78: +8 -10 lines
Diff to previous 1.78 (colored)

update some comments for vnode locking smoergasbord change

amazing -- the description of VOP_LOOKUP is suddenly human-readable

Revision 1.78 / (download) - annotate - [select for diffs], Sun Jan 7 20:43:59 2007 UTC (16 years ago) by pooka
Branch: MAIN
Changes since 1.77: +3 -3 lines
Diff to previous 1.77 (colored)

Restore name caching behaviour accidentally removed in rev 1.73, using
variation suggested by yamt on tech-kern.

XXX: The exception is that this doesn't any longer prevent caching
of RENAME, which was implied in a weird weird way previously.  But
that's handled by the callers currently.

Revision 1.72.2.1 / (download) - annotate - [select for diffs], Wed Jan 3 13:59:32 2007 UTC (16 years, 1 month ago) by tron
Branch: netbsd-4
Changes since 1.72: +53 -2 lines
Diff to previous 1.72 (colored)

Pull up following revision(s) (requested by elad in ticket #304):
	sys/kern/vfs_syscalls.c: revision 1.282
	sys/kern/vfs_lookup.c: revision 1.76
	sys/sys/namei.h: revision 1.47
PR/35278: YAMAMOTO Takashi: veriexec sometimes feeds user va to log(9)
Introduce the (intentionally undocumented) pathname_get(), pathname_path(),
and pathname_put(), to deal with allocating and copying of pathnames from
either kernel- or user-space.

Revision 1.62.2.2 / (download) - annotate - [select for diffs], Sat Dec 30 20:50:07 2006 UTC (16 years, 1 month ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.62.2.1: +140 -58 lines
Diff to previous 1.62.2.1 (colored)

sync with head.

Revision 1.77 / (download) - annotate - [select for diffs], Wed Dec 27 23:21:02 2006 UTC (16 years, 1 month ago) by chs
Branch: MAIN
Changes since 1.76: +8 -2 lines
Diff to previous 1.76 (colored)

fix two more problems in the recent changes to lookup():
 - don't hold the parent directory vnode locked while traversing mount points.
   the fs that's mounted might be an NFS served by a userland process
   like the automounter, which might need to traverse the parent directory
   in order to complete the lookup.
 - in the ENAMETOOLONG case fixed in rev. 1.75, set ni_dvp to dp
   since we've logically moved on to using "dp" as the parent.
   the caller will then handle vput()ing it as normal.
   this fixes PR 35279.

Revision 1.76 / (download) - annotate - [select for diffs], Sun Dec 24 08:54:55 2006 UTC (16 years, 1 month ago) by elad
Branch: MAIN
Changes since 1.75: +53 -2 lines
Diff to previous 1.75 (colored)

PR/35278: YAMAMOTO Takashi: veriexec sometimes feeds user va to log(9)

Introduce the (intentionally undocumented) pathname_get(), pathname_path(),
and pathname_put(), to deal with allocating and copying of pathnames from
either kernel- or user-space.

Revision 1.71.6.2 / (download) - annotate - [select for diffs], Mon Dec 18 11:42:15 2006 UTC (16 years, 1 month ago) by yamt
Branch: yamt-splraiseipl
Changes since 1.71.6.1: +5 -2 lines
Diff to previous 1.71.6.1 (colored) to branchpoint 1.71 (colored) next main 1.72 (colored)

sync with head.

Revision 1.75 / (download) - annotate - [select for diffs], Wed Dec 13 13:36:19 2006 UTC (16 years, 1 month ago) by yamt
Branch: MAIN
CVS Tags: yamt-splraiseipl-base5, yamt-splraiseipl-base4
Changes since 1.74: +4 -2 lines
Diff to previous 1.74 (colored)

lookup: add more missing vput().

Revision 1.74 / (download) - annotate - [select for diffs], Wed Dec 13 06:36:35 2006 UTC (16 years, 1 month ago) by chs
Branch: MAIN
Changes since 1.73: +3 -2 lines
Diff to previous 1.73 (colored)

in lookup(), vput() the starting vnode in the case where
we return with both ni_dvp and ni_vp being NULL.

Revision 1.71.6.1 / (download) - annotate - [select for diffs], Sun Dec 10 07:18:46 2006 UTC (16 years, 1 month ago) by yamt
Branch: yamt-splraiseipl
Changes since 1.71: +79 -57 lines
Diff to previous 1.71 (colored)

sync with head.

Revision 1.73 / (download) - annotate - [select for diffs], Sat Dec 9 16:11:51 2006 UTC (16 years, 1 month ago) by chs
Branch: MAIN
CVS Tags: yamt-splraiseipl-base3
Changes since 1.72: +73 -57 lines
Diff to previous 1.72 (colored)

a smorgasbord of improvements to vnode locking and path lookup:
 - LOCKPARENT is no longer relevant for lookup(), relookup() or VOP_LOOKUP().
   these now always return the parent vnode locked.  namei() works as before.
   lookup() and various other paths no longer acquire vnode locks in the
   wrong order via vrele().  fixes PR 32535.
   as a nice side effect, path lookup is also up to 25% faster.
 - the above allows us to get rid of PDIRUNLOCK.
 - also get rid of WANTPARENT (just use LOCKPARENT and unlock it).
 - remove an assumption in layer_node_find() that all file systems implement
   a recursive VOP_LOCK() (unionfs doesn't).
 - require that all file systems supply vfs_vptofh and vfs_fhtovp routines.
   fill in eopnotsupp() for file systems that don't support being exported
   and remove the checks for NULL.  (layerfs calls these without checking.)
 - in union_lookup1(), don't change refcounts in the ISDOTDOT case, just
   adjust which vnode is locked.  fixes PR 33374.
 - apply fixes for ufs_rename() from ufs_vnops.c rev. 1.61 to ext2fs_rename().

Revision 1.71.4.1 / (download) - annotate - [select for diffs], Sat Nov 18 21:39:23 2006 UTC (16 years, 2 months ago) by ad
Branch: newlock2
Changes since 1.71: +8 -2 lines
Diff to previous 1.71 (colored)

Sync with head.

Revision 1.72 / (download) - annotate - [select for diffs], Sat Nov 4 10:14:00 2006 UTC (16 years, 3 months ago) by elad
Branch: MAIN
CVS Tags: netbsd-4-base
Branch point for: netbsd-4
Changes since 1.71: +8 -2 lines
Diff to previous 1.71 (colored)

Add "@uid" keyword translation, to translate effective user-id of the
process.

Revision 1.65.4.1 / (download) - annotate - [select for diffs], Sat Sep 9 02:57:17 2006 UTC (16 years, 4 months ago) by rpaulo
Branch: rpaulo-netinet-merge-pcb
Changes since 1.65: +23 -15 lines
Diff to previous 1.65 (colored) next main 1.66 (colored)

sync with head

Revision 1.69.2.2 / (download) - annotate - [select for diffs], Fri Aug 11 15:45:47 2006 UTC (16 years, 5 months ago) by yamt
Branch: yamt-pdpolicy
Changes since 1.69.2.1: +3 -3 lines
Diff to previous 1.69.2.1 (colored) to branchpoint 1.69 (colored) next main 1.70 (colored)

sync with head

Revision 1.71 / (download) - annotate - [select for diffs], Sun Jul 23 22:06:12 2006 UTC (16 years, 6 months ago) by ad
Branch: MAIN
CVS Tags: yamt-splraiseipl-base2, yamt-splraiseipl-base, yamt-pdpolicy-base9, yamt-pdpolicy-base8, yamt-pdpolicy-base7, rpaulo-netinet-merge-pcb-base, abandoned-netbsd-4-base, abandoned-netbsd-4
Branch point for: yamt-splraiseipl, newlock2
Changes since 1.70: +3 -3 lines
Diff to previous 1.70 (colored)

Use the LWP cached credentials where sane.

Revision 1.62.2.1 / (download) - annotate - [select for diffs], Wed Jun 21 15:09:39 2006 UTC (16 years, 7 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.62: +116 -67 lines
Diff to previous 1.62 (colored)

sync with head.

Revision 1.65.6.2 / (download) - annotate - [select for diffs], Thu Jun 1 22:38:10 2006 UTC (16 years, 8 months ago) by kardel
Branch: simonb-timecounters
CVS Tags: simonb-timcounters-final
Changes since 1.65.6.1: +4 -3 lines
Diff to previous 1.65.6.1 (colored) next main 1.66 (colored)

Sync with head.

Revision 1.69.6.1 / (download) - annotate - [select for diffs], Wed May 24 15:50:42 2006 UTC (16 years, 8 months ago) by tron
Branch: peter-altq
Changes since 1.69: +4 -3 lines
Diff to previous 1.69 (colored) next main 1.70 (colored)

Merge 2006-05-24 NetBSD-current into the "peter-altq" branch.

Revision 1.69.2.1 / (download) - annotate - [select for diffs], Wed May 24 10:58:42 2006 UTC (16 years, 8 months ago) by yamt
Branch: yamt-pdpolicy
Changes since 1.69: +4 -3 lines
Diff to previous 1.69 (colored)

sync with head.

Revision 1.70 / (download) - annotate - [select for diffs], Sun May 14 21:15:12 2006 UTC (16 years, 8 months ago) by elad
Branch: MAIN
CVS Tags: yamt-pdpolicy-base6, yamt-pdpolicy-base5, simonb-timecounters-base, gdamore-uart-base, gdamore-uart, chap-midi-nbase, chap-midi-base, chap-midi
Changes since 1.69: +4 -3 lines
Diff to previous 1.69 (colored)

integrate kauth.

Revision 1.69.4.2 / (download) - annotate - [select for diffs], Sat May 6 23:31:31 2006 UTC (16 years, 9 months ago) by christos
Branch: elad-kernelauth
Changes since 1.69.4.1: +3 -2 lines
Diff to previous 1.69.4.1 (colored) to branchpoint 1.69 (colored) next main 1.70 (colored)

- Move kauth_cred_t declaration to <sys/types.h>
- Cleanup struct ucred; forward declarations that are unused.
- Don't include <sys/kauth.h> in any header, but include it in the c files
  that need it.

Approved by core.

Revision 1.65.6.1 / (download) - annotate - [select for diffs], Sat Apr 22 11:40:00 2006 UTC (16 years, 9 months ago) by simonb
Branch: simonb-timecounters
Changes since 1.65: +21 -14 lines
Diff to previous 1.65 (colored)

Sync with head.

Revision 1.69.4.1 / (download) - annotate - [select for diffs], Wed Mar 8 00:53:41 2006 UTC (16 years, 11 months ago) by elad
Branch: elad-kernelauth
Changes since 1.69: +3 -3 lines
Diff to previous 1.69 (colored)

Adapt to kernel authorization KPI.

Revision 1.69 / (download) - annotate - [select for diffs], Fri Mar 3 16:15:11 2006 UTC (16 years, 11 months ago) by rumble
Branch: MAIN
CVS Tags: yamt-pdpolicy-base4, yamt-pdpolicy-base3, yamt-pdpolicy-base2, yamt-pdpolicy-base, peter-altq-base, elad-kernelauth-base
Branch point for: yamt-pdpolicy, peter-altq, elad-kernelauth
Changes since 1.68: +5 -5 lines
Diff to previous 1.68 (colored)

Update namei(9) comments and man page to indicate that we operate on
vnodes, not inodes.

Revision 1.68 / (download) - annotate - [select for diffs], Wed Mar 1 12:38:21 2006 UTC (16 years, 11 months ago) by yamt
Branch: MAIN
Changes since 1.67: +3 -4 lines
Diff to previous 1.67 (colored)

merge yamt-uio_vmspace branch.

- use vmspace rather than proc or lwp where appropriate.
  the latter is more natural to specify an address space.
  (and less likely to be abused for random purposes.)
- fix a swdmover race.

Revision 1.65.2.2 / (download) - annotate - [select for diffs], Sat Feb 18 15:39:18 2006 UTC (16 years, 11 months ago) by yamt
Branch: yamt-uio_vmspace
Changes since 1.65.2.1: +17 -9 lines
Diff to previous 1.65.2.1 (colored) next main 1.66 (colored)

sync with head.

Revision 1.67 / (download) - annotate - [select for diffs], Sun Feb 12 01:32:06 2006 UTC (16 years, 11 months ago) by chs
Branch: MAIN
CVS Tags: yamt-uio_vmspace-base5
Changes since 1.66: +10 -3 lines
Diff to previous 1.66 (colored)

convert "magiclinks" from a per-fs mount option to a system-wide sysctl.
as discussed on tech-kern quite some time ago.

Revision 1.66 / (download) - annotate - [select for diffs], Sat Feb 4 12:09:50 2006 UTC (17 years ago) by yamt
Branch: MAIN
Changes since 1.65: +9 -8 lines
Diff to previous 1.65 (colored)

for some random places, use PNBUF_GET/PUT rather than
	- on-stack buffer
	- malloc(MAXPATHLEN)

Revision 1.57.2.3 / (download) - annotate - [select for diffs], Fri Jan 20 20:48:41 2006 UTC (17 years ago) by riz
Branch: netbsd-3
CVS Tags: netbsd-3-1-RELEASE, netbsd-3-1-RC4, netbsd-3-1-RC3, netbsd-3-1-RC2, netbsd-3-1-RC1, netbsd-3-1-1-RELEASE, netbsd-3-1
Changes since 1.57.2.2: +3 -119 lines
Diff to previous 1.57.2.2 (colored) to branchpoint 1.57 (colored) next main 1.58 (colored)

Back out tickets 490, 559, and 560, which added "magic symlinks", at
the request of chs@ (thorpej@ concurs), as there is consensus that
this should be changed to a system-wide tunable, rather than a mount
option.

Revision 1.65.2.1 / (download) - annotate - [select for diffs], Sat Dec 31 11:14:01 2005 UTC (17 years, 1 month ago) by yamt
Branch: yamt-uio_vmspace
Changes since 1.65: +3 -4 lines
Diff to previous 1.65 (colored)

uio_segflg/uio_lwp -> uio_vmspace.

Revision 1.57.2.2 / (download) - annotate - [select for diffs], Thu Dec 29 01:03:56 2005 UTC (17 years, 1 month ago) by riz
Branch: netbsd-3
Changes since 1.57.2.1: +73 -43 lines
Diff to previous 1.57.2.1 (colored) to branchpoint 1.57 (colored)

Pull up following revision(s) (requested by thorpej in ticket #559):
	sys/kern/vfs_lookup.c: revision 1.63
A few tweaks to magic symlinks:
- Add a @{var} syntax in addition to @var.  This allows for
patterns like
@{ostype}-@{osrelease}-@{machine_arch}.
- Add a @emul variable that expands to the process's emulation name
(e.g. "netbsd", "netbsd32", "linux", etc.)

Revision 1.57.2.1 / (download) - annotate - [select for diffs], Thu Dec 29 00:57:09 2005 UTC (17 years, 1 month ago) by riz
Branch: netbsd-3
Changes since 1.57: +89 -3 lines
Diff to previous 1.57 (colored)

Pull up following revision(s) (requested by thorpej in ticket #490):
	lib/libc/sys/mount.2: revision 1.33
	sys/sys/systm.h: revision 1.179
	sys/sys/fstypes.h: revision 1.4
	include/mntopts.h: revision 1.6
	sys/conf/newvers.sh: revision 1.41
	sys/kern/vfs_syscalls.c: revision 1.223
	sys/conf/files: revision 1.720
	sys/kern/vfs_lookup.c: revision 1.61
	share/man/man7/symlink.7: revision 1.7
	sbin/mount/mount.8: revision 1.47
	sys/kern/init_main.c: revision 1.248 via patch
	share/man/man4/options.4: revision 1.280 via patch
Implement expansion of special "magic" strings in symlinks into
system-specific values.  Submitted by Chris Demetriou in Nov 1995 (!)
in PR kern/1781, modified only slighly by me.
This is enabled on a per-mount basis with the MNT_MAGICLINKS mount
flag.  It can be enabled at mountroot() time by building the kernel
with the ROOTFS_MAGICLINKS option.
The following magic strings are supported by the implementation:
@machine    value of MACHINE for the system
@machine_arch    value of MACHINE_ARCH for the system
@hostname    the system host name, as set with sethostname()
@domainname    the system domain name, as set with setdomainname()
@kernel_ident    the kernel config file name
@osrelease    the releaes number of the OS
@ostype        the name of the OS (always "NetBSD" for NetBSD)
Example usage:
mkdir /arch/i386/bin
mkdir /arch/sparc/bin
ln -s /arch/@machine_arch/bin /bin

Revision 1.65 / (download) - annotate - [select for diffs], Tue Dec 27 17:24:07 2005 UTC (17 years, 1 month ago) by chs
Branch: MAIN
Branch point for: yamt-uio_vmspace, simonb-timecounters, rpaulo-netinet-merge-pcb
Changes since 1.64: +13 -3 lines
Diff to previous 1.64 (colored)

change errors returned for various operations on "/" to conform to SUSv3.
as discussed on tech-kern some time back.

Revision 1.64 / (download) - annotate - [select for diffs], Sun Dec 11 12:24:30 2005 UTC (17 years, 1 month ago) by christos
Branch: MAIN
Changes since 1.63: +16 -15 lines
Diff to previous 1.63 (colored)

merge ktrace-lwp.

Revision 1.48.2.8 / (download) - annotate - [select for diffs], Thu Nov 10 14:09:46 2005 UTC (17 years, 2 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.48.2.7: +129 -19 lines
Diff to previous 1.48.2.7 (colored) next main 1.49 (colored)

Sync with HEAD. Here we go again...

Revision 1.63 / (download) - annotate - [select for diffs], Wed Jul 6 18:53:00 2005 UTC (17 years, 7 months ago) by thorpej
Branch: MAIN
CVS Tags: yamt-vop-base3, yamt-vop-base2, yamt-vop-base, yamt-vop, yamt-readahead-pervnode, yamt-readahead-perfile, yamt-readahead-base3, yamt-readahead-base2, yamt-readahead-base, yamt-readahead, thorpej-vnode-attr-base, thorpej-vnode-attr, ktrace-lwp-base
Changes since 1.62: +73 -43 lines
Diff to previous 1.62 (colored)

A few tweaks to magic symlinks:
- Add a @{var} syntax in addition to @var.  This allows for patterns like
  @{ostype}-@{osrelease}-@{machine_arch}.
- Add a @emul variable that expands to the process's emulation name
  (e.g. "netbsd", "netbsd32", "linux", etc.)

Revision 1.62 / (download) - annotate - [select for diffs], Thu Jun 23 17:00:30 2005 UTC (17 years, 7 months ago) by thorpej
Branch: MAIN
Branch point for: yamt-lazymbuf
Changes since 1.61: +2 -4 lines
Diff to previous 1.61 (colored)

Remove the last references to M_NAMEI; everything should be using PNBUF_*()
now (for a long time now).  Remove M_NAMEI, and bump the kernel version to
3.99.7 to reflect its removal.

Revision 1.61 / (download) - annotate - [select for diffs], Thu Jun 23 00:30:28 2005 UTC (17 years, 7 months ago) by thorpej
Branch: MAIN
Changes since 1.60: +89 -3 lines
Diff to previous 1.60 (colored)

Implement expansion of special "magic" strings in symlinks into
system-specific values.  Submitted by Chris Demetriou in Nov 1995 (!)
in PR kern/1781, modified only slighly by me.

This is enabled on a per-mount basis with the MNT_MAGICLINKS mount
flag.  It can be enabled at mountroot() time by building the kernel
with the ROOTFS_MAGICLINKS option.

The following magic strings are supported by the implementation:

	@machine	value of MACHINE for the system
	@machine_arch	value of MACHINE_ARCH for the system
	@hostname	the system host name, as set with sethostname()
	@domainname	the system domain name, as set with setdomainname()
	@kernel_ident	the kernel config file name
	@osrelease	the releaes number of the OS
	@ostype		the name of the OS (always "NetBSD" for NetBSD)

Example usage:

	mkdir /arch/i386/bin
	mkdir /arch/sparc/bin
	ln -s /arch/@machine_arch/bin /bin

Revision 1.60 / (download) - annotate - [select for diffs], Sun Jun 5 23:47:48 2005 UTC (17 years, 8 months ago) by thorpej
Branch: MAIN
Changes since 1.59: +5 -9 lines
Diff to previous 1.59 (colored)

Use ANSI function decls.

Revision 1.59 / (download) - annotate - [select for diffs], Sun May 29 22:24:15 2005 UTC (17 years, 8 months ago) by christos
Branch: MAIN
Changes since 1.58: +4 -4 lines
Diff to previous 1.58 (colored)

- add const.
- remove unnecessary casts.
- add __UNCONST casts and mark them with XXXUNCONST as necessary.

Revision 1.58 / (download) - annotate - [select for diffs], Sun May 8 18:44:40 2005 UTC (17 years, 8 months ago) by christos
Branch: MAIN
Changes since 1.57: +8 -8 lines
Diff to previous 1.57 (colored)

Panic strings should not end with \n.

Revision 1.55.4.1 / (download) - annotate - [select for diffs], Fri Apr 29 11:29:24 2005 UTC (17 years, 9 months ago) by kent
Branch: kent-audio2
Changes since 1.55: +7 -4 lines
Diff to previous 1.55 (colored) next main 1.56 (colored)

sync with -current

Revision 1.48.2.7 / (download) - annotate - [select for diffs], Fri Apr 1 14:30:57 2005 UTC (17 years, 10 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.48.2.6: +5 -2 lines
Diff to previous 1.48.2.6 (colored)

Sync with HEAD.

Revision 1.55.6.1 / (download) - annotate - [select for diffs], Sat Mar 19 08:36:12 2005 UTC (17 years, 10 months ago) by yamt
Branch: yamt-km
Changes since 1.55: +7 -4 lines
Diff to previous 1.55 (colored) next main 1.56 (colored)

sync with head.  xen and whitespace.  xen part is not finished.

Revision 1.54.4.1 / (download) - annotate - [select for diffs], Wed Mar 16 12:59:07 2005 UTC (17 years, 10 months ago) by tron
Branch: netbsd-2
CVS Tags: netbsd-2-1-RELEASE, netbsd-2-1-RC6, netbsd-2-1-RC5, netbsd-2-1-RC4, netbsd-2-1-RC3, netbsd-2-1-RC2, netbsd-2-1-RC1, netbsd-2-1
Changes since 1.54: +5 -2 lines
Diff to previous 1.54 (colored) next main 1.55 (colored)

Pull up revision 1.57 (requested by wrstuden in ticket #1298):
Adjust error case handling. If the VOP_LOOKUP() call unlocked the
parent directory node, remember that.
Addresses locking/lookup issues seen in:
http://mail-index.NetBSD.org/tech-kern/2004/06/20/0019.html
http://mail-index.netbsd.org/tech-kern/2005/01/08/0000.html

Revision 1.54.2.1 / (download) - annotate - [select for diffs], Wed Mar 16 12:59:03 2005 UTC (17 years, 10 months ago) by tron
Branch: netbsd-2-0
CVS Tags: netbsd-2-0-3-RELEASE, netbsd-2-0-2-RELEASE
Changes since 1.54: +5 -2 lines
Diff to previous 1.54 (colored) next main 1.55 (colored)

Pull up revision 1.57 (requested by wrstuden in ticket #1298):
Adjust error case handling. If the VOP_LOOKUP() call unlocked the
parent directory node, remember that.
Addresses locking/lookup issues seen in:
http://mail-index.NetBSD.org/tech-kern/2004/06/20/0019.html
http://mail-index.netbsd.org/tech-kern/2005/01/08/0000.html

Revision 1.57 / (download) - annotate - [select for diffs], Tue Mar 8 17:29:29 2005 UTC (17 years, 11 months ago) by wrstuden
Branch: MAIN
CVS Tags: yamt-km-base4, yamt-km-base3, netbsd-3-base, netbsd-3-0-RELEASE, netbsd-3-0-RC6, netbsd-3-0-RC5, netbsd-3-0-RC4, netbsd-3-0-RC3, netbsd-3-0-RC2, netbsd-3-0-RC1, netbsd-3-0-3-RELEASE, netbsd-3-0-2-RELEASE, netbsd-3-0-1-RELEASE, netbsd-3-0, kent-audio2-base
Branch point for: netbsd-3
Changes since 1.56: +5 -2 lines
Diff to previous 1.56 (colored)

Adjust error case handling. If the VOP_LOOKUP() call unlocked the
parent directory node, remember that.

Addresses locking/lookup issues seen in:

http://mail-index.NetBSD.org/tech-kern/2004/06/20/0019.html
http://mail-index.netbsd.org/tech-kern/2005/01/08/0000.html

Revision 1.48.2.6 / (download) - annotate - [select for diffs], Fri Mar 4 16:52:03 2005 UTC (17 years, 11 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.48.2.5: +4 -4 lines
Diff to previous 1.48.2.5 (colored)

Sync with HEAD.

Hi Perry!

Revision 1.56 / (download) - annotate - [select for diffs], Sat Feb 26 21:34:56 2005 UTC (17 years, 11 months ago) by perry
Branch: MAIN
Changes since 1.55: +4 -4 lines
Diff to previous 1.55 (colored)

nuke trailing whitespace

Revision 1.48.2.5 / (download) - annotate - [select for diffs], Tue Sep 21 13:35:17 2004 UTC (18 years, 4 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.48.2.4: +15 -14 lines
Diff to previous 1.48.2.4 (colored)

Fix the sync with head I botched.

Revision 1.48.2.4 / (download) - annotate - [select for diffs], Sat Sep 18 14:53:04 2004 UTC (18 years, 4 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.48.2.3: +14 -15 lines
Diff to previous 1.48.2.3 (colored)

Sync with HEAD.

Revision 1.55 / (download) - annotate - [select for diffs], Fri Sep 17 14:11:25 2004 UTC (18 years, 4 months ago) by skrll
Branch: MAIN
CVS Tags: yamt-km-base2, yamt-km-base, kent-audio1-beforemerge, kent-audio1-base, kent-audio1
Branch point for: yamt-km, kent-audio2
Changes since 1.54: +3 -3 lines
Diff to previous 1.54 (colored)

There's no need to pass a proc value when using UIO_SYSSPACE with
vn_rdwr(9) and uiomove(9).

OK'd by Jason Thorpe

Revision 1.48.2.3 / (download) - annotate - [select for diffs], Tue Aug 24 17:57:38 2004 UTC (18 years, 5 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.48.2.2: +3 -3 lines
Diff to previous 1.48.2.2 (colored)

Undo part of the ktrace/lwp changes.  In particular:
* Remove the "lwp *" argument that was added to vget().  Turns out
  that nothing actually used it!
* Remove the "lwp *" arguments that were added to VFS_ROOT(), VFS_VGET(),
  and VFS_FHTOVP(); all they did was pass it to vget() (which, as noted
  above, didn't use it).
* Remove all of the "lwp *" arguments to internal functions that were added
  just to appease the above.

Revision 1.48.2.2 / (download) - annotate - [select for diffs], Tue Aug 3 10:52:59 2004 UTC (18 years, 6 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.48.2.1: +27 -18 lines
Diff to previous 1.48.2.1 (colored)

Sync with HEAD

Revision 1.54 / (download) - annotate - [select for diffs], Mon Dec 8 14:23:33 2003 UTC (19 years, 2 months ago) by hannken
Branch: MAIN
CVS Tags: netbsd-2-base, netbsd-2-0-base, netbsd-2-0-RELEASE, netbsd-2-0-RC5, netbsd-2-0-RC4, netbsd-2-0-RC3, netbsd-2-0-RC2, netbsd-2-0-RC1, netbsd-2-0-1-RELEASE
Branch point for: netbsd-2-0, netbsd-2
Changes since 1.53: +3 -3 lines
Diff to previous 1.53 (colored)

Fix the last commit(s).  On machines with sizeof(long) != sizeof(int)
the hash compare would fail.

Revision 1.53 / (download) - annotate - [select for diffs], Sat Dec 6 14:17:13 2003 UTC (19 years, 2 months ago) by yamt
Branch: MAIN
Changes since 1.52: +4 -2 lines
Diff to previous 1.52 (colored)

fix a debug code to follow recent change about tailing slashes.

Revision 1.52 / (download) - annotate - [select for diffs], Sat Dec 6 14:16:11 2003 UTC (19 years, 2 months ago) by yamt
Branch: MAIN
Changes since 1.51: +12 -10 lines
Diff to previous 1.51 (colored)

- turn non-verbose parts of NAMEI_DIAGNOSTIC into normal DEBUG.
- comments on #endif.

Revision 1.51 / (download) - annotate - [select for diffs], Thu Sep 11 17:33:42 2003 UTC (19 years, 4 months ago) by christos
Branch: MAIN
Changes since 1.50: +5 -4 lines
Diff to previous 1.50 (colored)

PR/15397: Jason Thorpe: directory operations on pathnames that refer to
directories and have trailing slashes should succeed. Ok'd by kjk.
Fix provided by enami.

Revision 1.50 / (download) - annotate - [select for diffs], Mon Aug 25 09:12:44 2003 UTC (19 years, 5 months ago) by cb
Branch: MAIN
Changes since 1.49: +10 -2 lines
Diff to previous 1.49 (colored)

fix a race condition between path resolution in userland
and the subsequent namei(): inform the kernel portion of
valid filenames and then disallow symlink lookups for
those filenames by means of a hook in namei().
with suggestions from provos@

also, add (currently unused) seqnr field to struct
systrace_replace, from provos@

Revision 1.49 / (download) - annotate - [select for diffs], Thu Aug 7 16:32:02 2003 UTC (19 years, 6 months ago) by agc
Branch: MAIN
Changes since 1.48: +3 -7 lines
Diff to previous 1.48 (colored)

Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.

Revision 1.48.2.1 / (download) - annotate - [select for diffs], Wed Jul 2 15:26:46 2003 UTC (19 years, 7 months ago) by darrenr
Branch: ktrace-lwp
Changes since 1.48: +15 -14 lines
Diff to previous 1.48 (colored)

Apply the aborted ktrace-lwp changes to a specific branch.  This is just for
others to review, I'm concerned that patch fuziness may have resulted in some
errant code being generated but I'll look at that later by comparing the diff
from the base to the branch with the file I attempt to apply to it.  This will,
at the very least, put the changes in a better context for others to review
them and attempt to tinker with removing passing of 'struct lwp' through
the kernel.

Revision 1.48 / (download) - annotate - [select for diffs], Sun Jun 29 22:31:33 2003 UTC (19 years, 7 months ago) by fvdl
Branch: MAIN
Branch point for: ktrace-lwp
Changes since 1.47: +13 -14 lines
Diff to previous 1.47 (colored)

Back out the lwp/ktrace changes. They contained a lot of colateral damage,
and need to be examined and discussed more.

Revision 1.47 / (download) - annotate - [select for diffs], Sun Jun 29 18:43:28 2003 UTC (19 years, 7 months ago) by thorpej
Branch: MAIN
Changes since 1.46: +3 -3 lines
Diff to previous 1.46 (colored)

Undo part of the ktrace/lwp changes.  In particular:
* Remove the "lwp *" argument that was added to vget().  Turns out
  that nothing actually used it!
* Remove the "lwp *" arguments that were added to VFS_ROOT(), VFS_VGET(),
  and VFS_FHTOVP(); all they did was pass it to vget() (which, as noted
  above, didn't use it).
* Remove all of the "lwp *" arguments to internal functions that were added
  just to appease the above.

Revision 1.46 / (download) - annotate - [select for diffs], Sat Jun 28 14:21:59 2003 UTC (19 years, 7 months ago) by darrenr
Branch: MAIN
Changes since 1.45: +15 -14 lines
Diff to previous 1.45 (colored)

Pass lwp pointers throughtout the kernel, as required, so that the lwpid can
be inserted into ktrace records.  The general change has been to replace
"struct proc *" with "struct lwp *" in various function prototypes, pass
the lwp through and use l_proc to get the process pointer when needed.

Bump the kernel rev up to 1.6V

Revision 1.45 / (download) - annotate - [select for diffs], Thu Apr 10 07:26:52 2003 UTC (19 years, 9 months ago) by erh
Branch: MAIN
Changes since 1.44: +8 -2 lines
Diff to previous 1.44 (colored)

Make sure the directory is still mounted before looking things up in it.
Fixes PR kern/5683.

Revision 1.44 / (download) - annotate - [select for diffs], Sat Feb 1 06:23:45 2003 UTC (20 years ago) by thorpej
Branch: MAIN
Changes since 1.43: +4 -2 lines
Diff to previous 1.43 (colored)

Add extensible malloc types, adapted from FreeBSD.  This turns
malloc types into a structure, a pointer to which is passed around,
instead of an int constant.  Allow the limit to be adjusted when the
malloc type is defined, or with a function call, as suggested by
Jonathan Stone.

Revision 1.43 / (download) - annotate - [select for diffs], Mon Jan 20 23:57:49 2003 UTC (20 years ago) by christos
Branch: MAIN
Changes since 1.42: +4 -4 lines
Diff to previous 1.42 (colored)

name the component that should be leaf in the diagnostic.

Revision 1.35.2.7 / (download) - annotate - [select for diffs], Mon Nov 11 22:14:11 2002 UTC (20 years, 2 months ago) by nathanw
Branch: nathanw_sa
CVS Tags: nathanw_sa_end
Changes since 1.35.2.6: +0 -5 lines
Diff to previous 1.35.2.6 (colored) to branchpoint 1.35 (colored) next main 1.36 (colored)

Catch up to -current

Revision 1.42 / (download) - annotate - [select for diffs], Tue Oct 22 03:35:10 2002 UTC (20 years, 3 months ago) by simonb
Branch: MAIN
CVS Tags: nathanw_sa_before_merge, nathanw_sa_base, kqueue-beforemerge, kqueue-aftermerge, gmcgarry_ucred_base, gmcgarry_ucred, gmcgarry_ctxsw_base, gmcgarry_ctxsw, fvdl_fs64_base
Changes since 1.41: +2 -7 lines
Diff to previous 1.41 (colored)

We go to a lot of effort to choose a suitable value for "docache" in
relookup() ... then ignore it!  Remove it.

Revision 1.35.4.3 / (download) - annotate - [select for diffs], Fri Sep 6 08:48:20 2002 UTC (20 years, 5 months ago) by jdolecek
Branch: kqueue
Changes since 1.35.4.2: +33 -5 lines
Diff to previous 1.35.4.2 (colored) to branchpoint 1.35 (colored) next main 1.36 (colored)

sync kqueue branch with HEAD

Revision 1.39.8.2 / (download) - annotate - [select for diffs], Thu Aug 29 05:23:16 2002 UTC (20 years, 5 months ago) by gehenna
Branch: gehenna-devsw
Changes since 1.39.8.1: +5 -5 lines
Diff to previous 1.39.8.1 (colored) to branchpoint 1.39 (colored) next main 1.40 (colored)

catch up with -current.

Revision 1.35.2.6 / (download) - annotate - [select for diffs], Tue Aug 13 02:20:09 2002 UTC (20 years, 5 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.35.2.5: +3 -3 lines
Diff to previous 1.35.2.5 (colored) to branchpoint 1.35 (colored)

Catch up to -current.

Revision 1.41 / (download) - annotate - [select for diffs], Fri Aug 2 04:49:35 2002 UTC (20 years, 6 months ago) by soren
Branch: MAIN
CVS Tags: kqueue-base, gehenna-devsw-base
Changes since 1.40: +5 -5 lines
Diff to previous 1.40 (colored)

Make NAMEI_DIAGNOSTIC compile.

Revision 1.35.2.5 / (download) - annotate - [select for diffs], Thu Aug 1 02:46:27 2002 UTC (20 years, 6 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.35.2.4: +30 -2 lines
Diff to previous 1.35.2.4 (colored) to branchpoint 1.35 (colored)

Catch up to -current.

Revision 1.39.8.1 / (download) - annotate - [select for diffs], Mon Jul 15 10:36:42 2002 UTC (20 years, 6 months ago) by gehenna
Branch: gehenna-devsw
Changes since 1.39: +30 -2 lines
Diff to previous 1.39 (colored)

catch up with -current.

Revision 1.34.4.1 / (download) - annotate - [select for diffs], Wed Jun 26 17:44:52 2002 UTC (20 years, 7 months ago) by he
Branch: netbsd-1-5
CVS Tags: netbsd-1-5-PATCH003
Changes since 1.34: +29 -1 lines
Diff to previous 1.34 (colored) next main 1.35 (colored)

Pull up revision 1.40 (requested by wrstuden):
  Fix a chroot escape method, and log attempts.

Revision 1.39.10.1 / (download) - annotate - [select for diffs], Fri Jun 21 05:47:58 2002 UTC (20 years, 7 months ago) by lukem
Branch: netbsd-1-6
CVS Tags: netbsd-1-6-RELEASE, netbsd-1-6-RC3, netbsd-1-6-RC2, netbsd-1-6-RC1, netbsd-1-6-PATCH002-RELEASE, netbsd-1-6-PATCH002-RC4, netbsd-1-6-PATCH002-RC3, netbsd-1-6-PATCH002-RC2, netbsd-1-6-PATCH002-RC1, netbsd-1-6-PATCH002, netbsd-1-6-PATCH001-RELEASE, netbsd-1-6-PATCH001-RC3, netbsd-1-6-PATCH001-RC2, netbsd-1-6-PATCH001-RC1, netbsd-1-6-PATCH001
Changes since 1.39: +30 -2 lines
Diff to previous 1.39 (colored) next main 1.40 (colored)

Pull up revision 1.40 (requested by wrstuden in ticket #336):
If we're in a chroot, and we are looking up '..', make sure we are
still in the chroot. If not, teleport the lookup to the chroot
and log. Closes an assisted-jail escape method pointed out by
xs@kittenz.org. Patch from xs@kittenz.org and wrstuden

Revision 1.40 / (download) - annotate - [select for diffs], Fri Jun 21 02:19:12 2002 UTC (20 years, 7 months ago) by wrstuden
Branch: MAIN
Changes since 1.39: +30 -2 lines
Diff to previous 1.39 (colored)

If we're in a chroot, and we are looking up '..', make sure we are
still in the chroot. If not, teleport the lookup to the chroot
and log. Closes an assisted-jail escape method pointed out by
xs@kittenz.org. Patch from xs@kittenz.org and myself

Revision 1.35.4.2 / (download) - annotate - [select for diffs], Thu Jan 10 20:00:20 2002 UTC (21 years ago) by thorpej
Branch: kqueue
Changes since 1.35.4.1: +39 -7 lines
Diff to previous 1.35.4.1 (colored) to branchpoint 1.35 (colored)

Sync kqueue branch with -current.

Revision 1.35.2.4 / (download) - annotate - [select for diffs], Tue Jan 8 00:32:43 2002 UTC (21 years, 1 month ago) by nathanw
Branch: nathanw_sa
Changes since 1.35.2.3: +36 -8 lines
Diff to previous 1.35.2.3 (colored) to branchpoint 1.35 (colored)

Catch up to -current.

Revision 1.39 / (download) - annotate - [select for diffs], Sat Dec 8 04:09:59 2001 UTC (21 years, 2 months ago) by lukem
Branch: MAIN
CVS Tags: newlock-base, newlock, netbsd-1-6-base, ifpoll-base, eeh-devprop-base, eeh-devprop
Branch point for: netbsd-1-6, gehenna-devsw
Changes since 1.38: +36 -8 lines
Diff to previous 1.38 (colored)

- Implement
	uint32_t namei_hash(const char *p, const char **ep)
  which determines the equivalent MI hash32_str() hash for p.
  If *ep != NULL, calculate the hash to the character before ep.
  If *ep == NULL, calculate the has to the first / or NUL found, and
  point *ep to that location.
- Use namei_hash() to calculate cn_hash in lookup() and relookup().
  Hash distribution goes from 35-40% to 55-70%, with similar profiled
  time spent in cache_lookup() and cache_enter() on my P3-600.
- Use namei_hash() to calculate cn_hash in nfs_readdirplusrpc(),
  insetad of homegrown code (that differed from that in lookup() !)
  namei_hash() has better spread and is faster than previous code
  (which used a non-constant multiplication).

Revision 1.35.2.3 / (download) - annotate - [select for diffs], Wed Nov 14 19:16:48 2001 UTC (21 years, 2 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.35.2.2: +4 -1 lines
Diff to previous 1.35.2.2 (colored) to branchpoint 1.35 (colored)

Catch up to -current.

Revision 1.37.2.1 / (download) - annotate - [select for diffs], Mon Nov 12 21:19:02 2001 UTC (21 years, 2 months ago) by thorpej
Branch: thorpej-mips-cache
Changes since 1.37: +4 -1 lines
Diff to previous 1.37 (colored) next main 1.38 (colored)

Sync the thorpej-mips-cache branch with -current.

Revision 1.38 / (download) - annotate - [select for diffs], Mon Nov 12 15:25:39 2001 UTC (21 years, 2 months ago) by lukem
Branch: MAIN
CVS Tags: thorpej-mips-cache-base
Changes since 1.37: +4 -1 lines
Diff to previous 1.37 (colored)

add RCSIDs

Revision 1.35.2.2 / (download) - annotate - [select for diffs], Mon Oct 22 20:41:51 2001 UTC (21 years, 3 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.35.2.1: +2 -1 lines
Diff to previous 1.35.2.1 (colored) to branchpoint 1.35 (colored)

Catch up to -current.

Revision 1.37 / (download) - annotate - [select for diffs], Wed Oct 17 23:33:29 2001 UTC (21 years, 3 months ago) by thorpej
Branch: MAIN
Branch point for: thorpej-mips-cache
Changes since 1.36: +2 -1 lines
Diff to previous 1.36 (colored)

Use a pool cache for namei buffers -- it's faster to allocate from
a pool cache than a pool.

Revision 1.35.6.1 / (download) - annotate - [select for diffs], Mon Oct 1 12:46:59 2001 UTC (21 years, 4 months ago) by fvdl
Branch: thorpej-devvp
Changes since 1.35: +1 -2 lines
Diff to previous 1.35 (colored) next main 1.36 (colored)

Catch up with -current.

Revision 1.35.2.1 / (download) - annotate - [select for diffs], Fri Sep 21 22:36:27 2001 UTC (21 years, 4 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.35: +1 -2 lines
Diff to previous 1.35 (colored)

Catch up to -current.

Revision 1.35.4.1 / (download) - annotate - [select for diffs], Thu Sep 13 01:16:17 2001 UTC (21 years, 4 months ago) by thorpej
Branch: kqueue
Changes since 1.35: +1 -2 lines
Diff to previous 1.35 (colored)

Update the kqueue branch to HEAD.

Revision 1.36 / (download) - annotate - [select for diffs], Sat Sep 8 02:02:04 2001 UTC (21 years, 5 months ago) by christos
Branch: MAIN
CVS Tags: thorpej-devvp-base3, thorpej-devvp-base2, pre-chs-ubcperf, post-chs-ubcperf
Changes since 1.35: +1 -2 lines
Diff to previous 1.35 (colored)

Set the credentials to be used in the NDINIT macro so that syscalls can
hijack them.

Revision 1.32.2.1 / (download) - annotate - [select for diffs], Mon Nov 20 18:09:16 2000 UTC (22 years, 2 months ago) by bouyer
Branch: thorpej_scsipi
Changes since 1.32: +18 -16 lines
Diff to previous 1.32 (colored) next main 1.33 (colored)

Update thorpej_scsipi to -current as of a month ago

Revision 1.35 / (download) - annotate - [select for diffs], Thu Aug 3 20:41:23 2000 UTC (22 years, 6 months ago) by thorpej
Branch: MAIN
CVS Tags: thorpej_scsipi_nbase, thorpej_scsipi_beforemerge, thorpej_scsipi_base, thorpej-devvp-base
Branch point for: thorpej-devvp, nathanw_sa, kqueue
Changes since 1.34: +11 -9 lines
Diff to previous 1.34 (colored)

Convert namei pathname buffer allocation to use the pool allocator.

Revision 1.34 / (download) - annotate - [select for diffs], Sat May 27 00:40:47 2000 UTC (22 years, 8 months ago) by sommerfeld
Branch: MAIN
CVS Tags: netbsd-1-5-base, netbsd-1-5-RELEASE, netbsd-1-5-PATCH002, netbsd-1-5-PATCH001, netbsd-1-5-BETA2, netbsd-1-5-BETA, netbsd-1-5-ALPHA2, minoura-xpg4dl-base, minoura-xpg4dl
Branch point for: netbsd-1-5
Changes since 1.33: +2 -2 lines
Diff to previous 1.33 (colored)

Reduce use of curproc in several places:

 - Change ktrace interface to pass in the current process, rather than
p->p_tracep, since the various ktr* function need curproc anyway.

 - Add curproc as a parameter to mi_switch() since all callers had it
handy anyway.

 - Add a second proc argument for inferior() since callers all had
curproc handy.

Also, miscellaneous cleanups in ktrace:

 - ktrace now always uses file-based, rather than vnode-based I/O
(simplifies, increases type safety); eliminate KTRFLAG_FD & KTRFAC_FD.
Do non-blocking I/O, and yield a finite number of times when receiving
EWOULDBLOCK before giving up.

 - move code duplicated between sys_fktrace and sys_ktrace into ktrace_common.

 - simplify interface to ktrwrite()

Revision 1.33 / (download) - annotate - [select for diffs], Thu Mar 30 09:27:15 2000 UTC (22 years, 10 months ago) by augustss
Branch: MAIN
Changes since 1.32: +7 -7 lines
Diff to previous 1.32 (colored)

Get rid of register declarations.

Revision 1.32 / (download) - annotate - [select for diffs], Tue Aug 3 18:17:24 1999 UTC (23 years, 6 months ago) by wrstuden
Branch: MAIN
CVS Tags: wrstuden-devbsize-base, wrstuden-devbsize-19991221, wrstuden-devbsize, fvdl-softdep-base, fvdl-softdep, comdex-fall-1999-base, comdex-fall-1999, chs-ubc2-newbase
Branch point for: thorpej_scsipi
Changes since 1.31: +11 -4 lines
Diff to previous 1.31 (colored)

Modify how lookup walks up mount points. As suggested by Konrad
Schroder <perseant@hitl.washington.edu>, unlock the mounted on
vnode before we call VFS_ROOT so that we cover the case where the new
root vnode shares a lock with the mounted-on vnode. Note that we have
asserted vfs_busy on the new fs before unlocking, so no other process can
steal the mount out from under us.

Revision 1.28.6.1.2.2 / (download) - annotate - [select for diffs], Mon Aug 2 22:19:15 1999 UTC (23 years, 6 months ago) by thorpej
Branch: chs-ubc2
Changes since 1.28.6.1.2.1: +8 -3 lines
Diff to previous 1.28.6.1.2.1 (colored) to branchpoint 1.28.6.1 (colored) next main 1.29 (colored)

Update from trunk.

Revision 1.31 / (download) - annotate - [select for diffs], Thu Jul 8 01:06:01 1999 UTC (23 years, 7 months ago) by wrstuden
Branch: MAIN
CVS Tags: chs-ubc2-base
Changes since 1.30: +8 -3 lines
Diff to previous 1.30 (colored)

Modify file systems to deal with struct lock in struct vnode. All leaf
fs's other than nfs use genfs_lock() for locking.

Modify lookup routines to set PDIRUNLOCK when they unlock the parrent.

Revision 1.28.6.1.2.1 / (download) - annotate - [select for diffs], Mon Jun 21 01:24:06 1999 UTC (23 years, 7 months ago) by thorpej
Branch: chs-ubc2
Changes since 1.28.6.1: +5 -5 lines
Diff to previous 1.28.6.1 (colored)

Sync w/ -current.

Revision 1.30 / (download) - annotate - [select for diffs], Fri Apr 30 18:43:00 1999 UTC (23 years, 9 months ago) by thorpej
Branch: MAIN
Changes since 1.29: +5 -5 lines
Diff to previous 1.29 (colored)

Break cdir/rdir/cmask info out of struct filedesc, and put it in a new
substructure, `cwdinfo'.  Implement optional sharing of this substructure.

This is required for clone(2).

Revision 1.28.6.1 / (download) - annotate - [select for diffs], Wed Apr 7 19:07:29 1999 UTC (23 years, 10 months ago) by wrstuden
Branch: netbsd-1-4
CVS Tags: netbsd-1-4-RELEASE, netbsd-1-4-PATCH003, netbsd-1-4-PATCH002, netbsd-1-4-PATCH001, kame_14_19990705, kame_14_19990628, kame_141_19991130, kame
Branch point for: chs-ubc2
Changes since 1.28: +2 -2 lines
Diff to previous 1.28 (colored) next main 1.29 (colored)

Pull up revision 1.28 -> 1.29, approved by Perry.

Here's the revised commit message from 1.29:

Fix obscure bug in namei(), which was the cause of PR 7306.

The problem is that if "sl" is a symbolic link, a lookup on "sl/"
will be flagged as the last component. Thus VOP_LOOKUP will lock
the parent directory if LOCKPARENT is set. In order for the symbolic
link to be resolved, this lock needs to be released. namei() would
test for this by checking if ni_pathlen == 1, which it wouldn't as
"/" is left in the name, and namei() would not unlock the parent.
The next call to lookup() to resolve the symbolic link would fail
as the parent was still locked.

Revision 1.29 / (download) - annotate - [select for diffs], Wed Apr 7 05:47:37 1999 UTC (23 years, 10 months ago) by wrstuden
Branch: MAIN
Changes since 1.28: +2 -2 lines
Diff to previous 1.28 (colored)

Fix obscure bug in namei(), which was the cause of PR 7306.

The problem is that if "sl" is a symbolic link, a lookup on "sl/"
will be flagged as the last component. Thus VOP_LOOKUP will lock
the parent directory if LOCKPARENT is set. In order for the symbolic
link to be resolved, this lock needs to be released. namei() would
test for this by checking if ni_pathlen == 1, which it wouldn't as
"/" is left in the name, and namei() would not unlock the parent.
The next call to lookup() to resolve the symbolic link would fail
as the parent was still locked.

Revision 1.28 / (download) - annotate - [select for diffs], Tue Aug 4 04:03:19 1998 UTC (24 years, 6 months ago) by perry
Branch: MAIN
CVS Tags: netbsd-1-4-base, kenh-if-detach-base, kenh-if-detach, chs-ubc-base, chs-ubc
Branch point for: netbsd-1-4
Changes since 1.27: +2 -2 lines
Diff to previous 1.27 (colored)

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)

Revision 1.27 / (download) - annotate - [select for diffs], Thu Jun 25 21:17:17 1998 UTC (24 years, 7 months ago) by thorpej
Branch: MAIN
CVS Tags: eeh-paddr_t-base, eeh-paddr_t
Changes since 1.26: +3 -1 lines
Diff to previous 1.26 (colored)

defopt KTRACE

Revision 1.26 / (download) - annotate - [select for diffs], Sun Mar 1 02:22:35 1998 UTC (24 years, 11 months ago) by fvdl
Branch: MAIN
Changes since 1.25: +28 -38 lines
Diff to previous 1.25 (colored)

Merge with Lite2 + local changes

Revision 1.1.1.3 / (download) - annotate - [select for diffs] (vendor branch), Sun Mar 1 02:13:05 1998 UTC (24 years, 11 months ago) by fvdl
Branch: WFJ-920714, CSRG
CVS Tags: lite-2
Changes since 1.1.1.2: +178 -39 lines
Diff to previous 1.1.1.2 (colored)

Import 4.4BSD-Lite2

Revision 1.1.1.2 / (download) - annotate - [select for diffs] (vendor branch), Sun Mar 1 02:09:54 1998 UTC (24 years, 11 months ago) by fvdl
Branch: WFJ-920714, CSRG
CVS Tags: lite-1, date-03-may-96
Changes since 1.1.1.1: +506 -1 lines
Diff to previous 1.1.1.1 (colored)

Import 4.4BSD-Lite for reference

Revision 1.24.2.1 / (download) - annotate - [select for diffs], Fri Oct 31 07:50:45 1997 UTC (25 years, 3 months ago) by mellon
Branch: netbsd-1-3
CVS Tags: netbsd-1-3-RELEASE, netbsd-1-3-PATCH003-CANDIDATE2, netbsd-1-3-PATCH003-CANDIDATE1, netbsd-1-3-PATCH003-CANDIDATE0, netbsd-1-3-PATCH003, netbsd-1-3-PATCH002, netbsd-1-3-PATCH001, netbsd-1-3-BETA
Changes since 1.24: +7 -5 lines
Diff to previous 1.24 (colored) next main 1.25 (colored)

Pull rev 1.25 up from trunk (enami)

Revision 1.25 / (download) - annotate - [select for diffs], Thu Oct 30 22:47:06 1997 UTC (25 years, 3 months ago) by enami
Branch: MAIN
Changes since 1.24: +7 -5 lines
Diff to previous 1.24 (colored)

Conditionalize the recognition of symbolic link permission by
per fs mount option `symperm'.

Revision 1.23.4.1 / (download) - annotate - [select for diffs], Tue Oct 14 10:26:23 1997 UTC (25 years, 3 months ago) by thorpej
Branch: marc-pcmcia
Changes since 1.23: +5 -1 lines
Diff to previous 1.23 (colored) next main 1.24 (colored)

Update marc-pcmcia branch from trunk.

Revision 1.24 / (download) - annotate - [select for diffs], Sat Oct 11 00:08:08 1997 UTC (25 years, 3 months ago) by enami
Branch: MAIN
CVS Tags: netbsd-1-3-base, marc-pcmcia-base
Branch point for: netbsd-1-3
Changes since 1.23: +5 -1 lines
Diff to previous 1.23 (colored)

Check exec bit of symbolic link when traversing path and do it in vfs layer.
Suggested by der Mouse.  Ok'ed by Jason R. Thorpe.

Revision 1.23 / (download) - annotate - [select for diffs], Thu May 8 14:55:22 1997 UTC (25 years, 9 months ago) by mycroft
Branch: MAIN
CVS Tags: thorpej-signal-base, thorpej-signal, marc-pcmcia-bp, bouyer-scsipi
Branch point for: marc-pcmcia
Changes since 1.22: +138 -124 lines
Diff to previous 1.22 (colored)

Snapshot of namei() cleanup:
1) Eliminate all of the null component name special cases; handle runs of
slashes and leading and trailing slashes completely differently.
2) Return ENOENT when doing a lookup through an empty symlink.
3) Enforce that we're doing a lookup through a directory in in chdir() and
lookup() rather than in foo_lookup().

Not yet finished.

Revision 1.22 / (download) - annotate - [select for diffs], Tue Apr 8 16:11:48 1997 UTC (25 years, 10 months ago) by kleink
Branch: MAIN
Changes since 1.21: +6 -2 lines
Diff to previous 1.21 (colored)

Added a sanity check to the force-directory routine, as the CREATE and
RENAME namei() operations may succeed without returning a vnode.

Revision 1.21 / (download) - annotate - [select for diffs], Tue Apr 8 10:11:55 1997 UTC (25 years, 10 months ago) by kleink
Branch: MAIN
Changes since 1.20: +36 -2 lines
Diff to previous 1.20 (colored)

POSIX.1 changes to namei():

	(1) "" no longer refers to the current working directory;
	    looking this up will now result in ENOENT.

	(2) by stripping off trailing slashes and setting a `forcedir'
	    flag, make code such as {  mkdir("dir", m); rmdir("dir/"); }
	    actually work.

Revision 1.20 / (download) - annotate - [select for diffs], Fri Oct 25 23:14:04 1996 UTC (26 years, 3 months ago) by cgd
Branch: MAIN
CVS Tags: thorpej-setroot, mrg-vm-swap, is-newarp-before-merge, is-newarp-base, is-newarp
Changes since 1.19: +2 -2 lines
Diff to previous 1.19 (colored)

make the namei struct members ni_dirp and ni_next, and the componentname
struct member cn_nameptr 'const', since they should never be used to
modify the path name.  (Only the pathname buffer, cn_pnbuf, should be
modified.)  Propagate the const poisoning to code that uses the namei
and componentname structs.

Revision 1.19 / (download) - annotate - [select for diffs], Sun Oct 13 02:32:52 1996 UTC (26 years, 3 months ago) by christos
Branch: MAIN
Changes since 1.18: +5 -5 lines
Diff to previous 1.18 (colored)

backout previous kprintf change

Revision 1.18 / (download) - annotate - [select for diffs], Thu Oct 10 22:46:40 1996 UTC (26 years, 3 months ago) by christos
Branch: MAIN
Changes since 1.17: +5 -5 lines
Diff to previous 1.17 (colored)

printf -> kprintf, sprintf -> ksprintf

Revision 1.17 / (download) - annotate - [select for diffs], Fri Feb 9 19:00:59 1996 UTC (26 years, 11 months ago) by christos
Branch: MAIN
CVS Tags: netbsd-1-2-base, netbsd-1-2-RELEASE, netbsd-1-2-PATCH001, netbsd-1-2-BETA, netbsd-1-2
Changes since 1.16: +1 -3 lines
Diff to previous 1.16 (colored)

More proto fixes

Revision 1.16 / (download) - annotate - [select for diffs], Sun Feb 4 02:18:25 1996 UTC (27 years ago) by christos
Branch: MAIN
Changes since 1.15: +9 -6 lines
Diff to previous 1.15 (colored)

First pass at prototyping

Revision 1.15 / (download) - annotate - [select for diffs], Wed Mar 8 01:20:50 1995 UTC (27 years, 11 months ago) by cgd
Branch: MAIN
CVS Tags: netbsd-1-1-base, netbsd-1-1-RELEASE, netbsd-1-1-PATCH001, netbsd-1-1
Changes since 1.14: +2 -1 lines
Diff to previous 1.14 (colored)

needs systm.h

Revision 1.14 / (download) - annotate - [select for diffs], Wed Dec 14 19:41:23 1994 UTC (28 years, 1 month ago) by mycroft
Branch: MAIN
Changes since 1.13: +11 -11 lines
Diff to previous 1.13 (colored)

Sync with CSRG.

Revision 1.13 / (download) - annotate - [select for diffs], Wed Jun 29 06:33:57 1994 UTC (28 years, 7 months ago) by cgd
Branch: MAIN
CVS Tags: netbsd-1-0-base, netbsd-1-0-RELEASE, netbsd-1-0-PATCH1, netbsd-1-0-PATCH06, netbsd-1-0-PATCH05, netbsd-1-0-PATCH04, netbsd-1-0-PATCH03, netbsd-1-0-PATCH02, netbsd-1-0-PATCH0, netbsd-1-0
Changes since 1.12: +3 -2 lines
Diff to previous 1.12 (colored)

New RCS ID's, take two.  they're more aesthecially pleasant, and use 'NetBSD'

Revision 1.12 / (download) - annotate - [select for diffs], Wed Jun 8 11:28:55 1994 UTC (28 years, 8 months ago) by mycroft
Branch: MAIN
Changes since 1.11: +276 -95 lines
Diff to previous 1.11 (colored)

Update to 4.4-Lite fs code.

Revision 1.11 / (download) - annotate - [select for diffs], Wed May 18 05:12:44 1994 UTC (28 years, 8 months ago) by cgd
Branch: MAIN
Changes since 1.10: +3 -3 lines
Diff to previous 1.10 (colored)

mostly-machine-indepedent switch, and changes to match.  also, hack init_main

Revision 1.10 / (download) - annotate - [select for diffs], Tue May 17 04:22:02 1994 UTC (28 years, 8 months ago) by cgd
Branch: MAIN
Changes since 1.9: +475 -1 lines
Diff to previous 1.9 (colored)

copyright foo

Revision 1.9 / (download) - annotate - [select for diffs], Wed Jan 5 13:49:52 1994 UTC (29 years, 1 month ago) by cgd
Branch: MAIN
Changes since 1.8: +1 -1 lines
Diff to previous 1.8 (colored)

minor cleanup; extra spaces, patchkit info, etc.

Revision 1.8 / (download) - annotate - [select for diffs], Tue Jan 4 14:10:48 1994 UTC (29 years, 1 month ago) by cgd
Branch: MAIN
Changes since 1.7: +1 -1 lines
Diff to previous 1.7 (colored)

add support for union and loopback mounts, from jsp

Revision 1.7 / (download) - annotate - [select for diffs], Sat Dec 18 04:22:45 1993 UTC (29 years, 1 month ago) by mycroft
Branch: MAIN
Changes since 1.6: +1 -1 lines
Diff to previous 1.6 (colored)

Canonicalize all #includes.

Revision 1.6 / (download) - annotate - [select for diffs], Sat Nov 20 09:40:42 1993 UTC (29 years, 2 months ago) by cgd
Branch: MAIN
Changes since 1.5: +1 -1 lines
Diff to previous 1.5 (colored)

do something better with lookup return values; suggested by BSDI's msdosfs mod

Revision 1.5.2.2 / (download) - annotate - [select for diffs], Sat Nov 20 09:23:25 1993 UTC (29 years, 2 months ago) by cgd
Branch: magnum
Changes since 1.5.2.1: +1 -1 lines
Diff to previous 1.5.2.1 (colored) to branchpoint 1.5 (colored) next main 1.6 (colored)

do something better with lookup return values; suggested by BSDI's msdosfs mod

Revision 1.5.2.1 / (download) - annotate - [select for diffs], Sun Nov 14 21:24:19 1993 UTC (29 years, 2 months ago) by mycroft
Branch: magnum
Changes since 1.5: +1 -1 lines
Diff to previous 1.5 (colored)

Canonicalize all #includes.

Revision 1.5 / (download) - annotate - [select for diffs], Tue Sep 7 15:41:11 1993 UTC (29 years, 5 months ago) by ws
Branch: MAIN
CVS Tags: magnum-base
Branch point for: magnum
Changes since 1.4: +1 -1 lines
Diff to previous 1.4 (colored)

Changes to VFS readdir semantics
NFS changes for better cookie support
ISOFS changes for better Rockridge support and support for generation numbers

Revision 1.4 / (download) - annotate - [select for diffs], Sun Aug 1 19:26:05 1993 UTC (29 years, 6 months ago) by mycroft
Branch: MAIN
Changes since 1.3: +1 -1 lines
Diff to previous 1.3 (colored)

Add RCS identifiers (this time on the correct side of the branch), and
incorporate recent changes in netbsd-0-9 branch.

Revision 1.3.2.1 / (download) - annotate - [select for diffs], Sat Jul 31 12:09:43 1993 UTC (29 years, 6 months ago) by cgd
Branch: netbsd-0-9
CVS Tags: netbsd-0-9-patch-001, netbsd-0-9-RELEASE, netbsd-0-9-BETA, netbsd-0-9-ALPHA2
Changes since 1.3: +1 -1 lines
Diff to previous 1.3 (colored) next main 1.4 (colored)

give names, err, wmesg's, to my "pain" -- i.e. convert sleep() to tsleep()

Revision 1.3 / (download) - annotate - [select for diffs], Thu May 20 02:55:36 1993 UTC (29 years, 8 months ago) by cgd
Branch: MAIN
CVS Tags: netbsd-0-9-base, netbsd-0-9-ALPHA
Branch point for: netbsd-0-9
Changes since 1.2: +1 -1 lines
Diff to previous 1.2 (colored)

add $Id$ strings, and clean up file headers where necessary

Revision 1.2 / (download) - annotate - [select for diffs], Sun Mar 21 18:04:42 1993 UTC (29 years, 10 months ago) by cgd
Branch: MAIN
CVS Tags: patchkit-0-2-2, netbsd-alpha-1, netbsd-0-8
Changes since 1.1: +1 -1 lines
Diff to previous 1.1 (colored)

after 0.2.2 "stable" patches applied

Revision 1.1.1.1 / (download) - annotate - [select for diffs] (vendor branch), Sun Mar 21 09:45:37 1993 UTC (29 years, 10 months ago) by cgd
Branch: WFJ-920714, CSRG
CVS Tags: WFJ-386bsd-01
Changes since 1.1: +1 -1 lines
Diff to previous 1.1 (colored)

initial import of 386bsd-0.1 sources

Revision 1.1 / (download) - annotate - [select for diffs], Sun Mar 21 09:45:37 1993 UTC (29 years, 10 months ago) by cgd
Branch: MAIN

Initial revision

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.




CVSweb <webmaster@jp.NetBSD.org>