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
Current tag: MAIN


Revision 1.212 / (download) - annotate - [select for diffs], Thu Jul 18 09:39:40 2019 UTC (4 months ago) by hannken
Branch: MAIN
CVS Tags: netbsd-9-base, netbsd-9, HEAD
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 (4 months, 1 week 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.210 / (download) - annotate - [select for diffs], Sun Mar 17 10:14:52 2019 UTC (8 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 (8 months, 1 week 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.208 / (download) - annotate - [select for diffs], Sun Jul 9 22:48:44 2017 UTC (2 years, 4 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 (2 years, 5 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.206 / (download) - annotate - [select for diffs], Mon Apr 17 08:32:01 2017 UTC (2 years, 7 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.205 / (download) - annotate - [select for diffs], Fri Apr 22 05:34:58 2016 UTC (3 years, 6 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 (3 years, 7 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.203 / (download) - annotate - [select for diffs], Mon Aug 24 22:50:32 2015 UTC (4 years, 2 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.202 / (download) - annotate - [select for diffs], Tue Apr 21 03:19:03 2015 UTC (4 years, 6 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.201 / (download) - annotate - [select for diffs], Fri Feb 7 15:29:22 2014 UTC (5 years, 9 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.200 / (download) - annotate - [select for diffs], Sun Nov 18 17:41:53 2012 UTC (7 years 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.199 / (download) - annotate - [select for diffs], Mon Nov 5 21:35:28 2012 UTC (7 years 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 (7 years 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 (7 years 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.196 / (download) - annotate - [select for diffs], Sat Oct 13 17:46:50 2012 UTC (7 years, 1 month 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 (7 years, 1 month 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 (7 years, 1 month 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 (7 years, 1 month 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 (8 years, 1 month 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 (8 years, 1 month 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 (8 years, 2 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 (8 years, 3 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 (8 years, 3 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 (8 years, 3 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 (8 years, 3 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 (8 years, 3 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.184 / (download) - annotate - [select for diffs], Mon May 16 15:09:31 2011 UTC (8 years, 6 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.183 / (download) - annotate - [select for diffs], Mon Apr 18 00:47:24 2011 UTC (8 years, 7 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 (8 years, 7 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 (8 years, 7 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 (8 years, 7 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 (8 years, 7 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 (8 years, 7 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 (8 years, 7 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 (8 years, 7 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 (8 years, 7 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 (8 years, 7 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 (8 years, 7 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 (8 years, 7 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 (8 years, 7 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 (8 years, 7 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 (8 years, 7 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 (8 years, 7 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 (8 years, 7 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 (8 years, 7 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 (8 years, 7 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 (8 years, 7 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 (8 years, 7 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 (8 years, 7 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 (8 years, 7 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 (8 years, 7 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 (8 years, 7 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 (8 years, 7 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 (8 years, 7 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 (8 years, 7 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 (8 years, 7 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 (8 years, 7 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 (8 years, 7 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 (8 years, 7 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 (8 years, 7 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 (8 years, 7 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 (8 years, 7 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 (8 years, 7 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 (8 years, 7 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 (8 years, 7 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 (8 years, 7 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 (8 years, 7 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 (8 years, 7 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 (8 years, 7 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 (8 years, 7 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 (8 years, 7 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 (8 years, 7 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 (8 years, 7 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 (8 years, 7 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 (8 years, 7 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 (8 years, 7 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 (8 years, 7 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 (8 years, 7 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 (8 years, 7 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.131 / (download) - annotate - [select for diffs], Tue Jan 4 07:43:42 2011 UTC (8 years, 10 months 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 (8 years, 10 months 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 (8 years, 10 months 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 (8 years, 10 months 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 (8 years, 11 months 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 (8 years, 11 months 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 (8 years, 11 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 (8 years, 11 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 (9 years 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.122 / (download) - annotate - [select for diffs], Thu Jun 24 13:03:11 2010 UTC (9 years, 4 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.121 / (download) - annotate - [select for diffs], Fri Jan 8 11:35:10 2010 UTC (9 years, 10 months 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 (10 years, 1 month 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 (10 years, 1 month 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.118 / (download) - annotate - [select for diffs], Sun Aug 9 07:27:54 2009 UTC (10 years, 3 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 (10 years, 3 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.116 / (download) - annotate - [select for diffs], Mon Jun 29 05:00:14 2009 UTC (10 years, 4 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 (10 years, 4 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.114 / (download) - annotate - [select for diffs], Mon May 4 06:05:19 2009 UTC (10 years, 6 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.113 / (download) - annotate - [select for diffs], Wed Feb 11 00:19:11 2009 UTC (10 years, 9 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.112 / (download) - annotate - [select for diffs], Sat Jan 17 07:02:35 2009 UTC (10 years, 10 months 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.111 / (download) - annotate - [select for diffs], Fri Nov 14 21:57:14 2008 UTC (11 years 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.110 / (download) - annotate - [select for diffs], Wed Aug 20 14:06:35 2008 UTC (11 years, 3 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 (11 years, 3 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 / (download) - annotate - [select for diffs], Tue May 6 18:43:44 2008 UTC (11 years, 6 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 (11 years, 6 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 (11 years, 6 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 (11 years, 6 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.104 / (download) - annotate - [select for diffs], Wed Jan 30 11:47:00 2008 UTC (11 years, 9 months 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.103 / (download) - annotate - [select for diffs], Mon Dec 31 15:32:13 2007 UTC (11 years, 10 months 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.102 / (download) - annotate - [select for diffs], Sat Dec 8 19:29:49 2007 UTC (11 years, 11 months 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.101 / (download) - annotate - [select for diffs], Tue Dec 4 22:09:02 2007 UTC (11 years, 11 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.100 / (download) - annotate - [select for diffs], Mon Nov 26 19:02:07 2007 UTC (11 years, 11 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.99 / (download) - annotate - [select for diffs], Wed Nov 7 00:23:25 2007 UTC (12 years 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.98 / (download) - annotate - [select for diffs], Wed Oct 10 20:42:27 2007 UTC (12 years, 1 month 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.97 / (download) - annotate - [select for diffs], Wed Aug 15 12:07:34 2007 UTC (12 years, 3 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 (12 years, 3 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 (12 years, 3 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 (12 years, 3 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.93 / (download) - annotate - [select for diffs], Mon Jul 9 21:10:57 2007 UTC (12 years, 4 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.92 / (download) - annotate - [select for diffs], Sat May 19 22:11:22 2007 UTC (12 years, 6 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.91 / (download) - annotate - [select for diffs], Thu Apr 26 21:21:44 2007 UTC (12 years, 6 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 (12 years, 6 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 (12 years, 6 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 (12 years, 6 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 (12 years, 6 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 (12 years, 6 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 (12 years, 6 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 / (download) - annotate - [select for diffs], Thu Feb 22 06:34:45 2007 UTC (12 years, 8 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 (12 years, 8 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.82 / (download) - annotate - [select for diffs], Sat Feb 17 22:31:44 2007 UTC (12 years, 9 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.81 / (download) - annotate - [select for diffs], Sun Feb 4 15:03:20 2007 UTC (12 years, 9 months 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.80 / (download) - annotate - [select for diffs], Wed Jan 31 08:29:20 2007 UTC (12 years, 9 months 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.79 / (download) - annotate - [select for diffs], Sun Jan 7 21:33:24 2007 UTC (12 years, 10 months 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 (12 years, 10 months 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.77 / (download) - annotate - [select for diffs], Wed Dec 27 23:21:02 2006 UTC (12 years, 10 months 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 (12 years, 10 months 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.75 / (download) - annotate - [select for diffs], Wed Dec 13 13:36:19 2006 UTC (12 years, 11 months 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 (12 years, 11 months 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.73 / (download) - annotate - [select for diffs], Sat Dec 9 16:11:51 2006 UTC (12 years, 11 months 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.72 / (download) - annotate - [select for diffs], Sat Nov 4 10:14:00 2006 UTC (13 years 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.71 / (download) - annotate - [select for diffs], Sun Jul 23 22:06:12 2006 UTC (13 years, 3 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.70 / (download) - annotate - [select for diffs], Sun May 14 21:15:12 2006 UTC (13 years, 6 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 / (download) - annotate - [select for diffs], Fri Mar 3 16:15:11 2006 UTC (13 years, 8 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 (13 years, 8 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.67 / (download) - annotate - [select for diffs], Sun Feb 12 01:32:06 2006 UTC (13 years, 9 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 (13 years, 9 months 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.65 / (download) - annotate - [select for diffs], Tue Dec 27 17:24:07 2005 UTC (13 years, 10 months 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 (13 years, 11 months ago) by christos
Branch: MAIN
Changes since 1.63: +16 -15 lines
Diff to previous 1.63 (colored)

merge ktrace-lwp.

Revision 1.63 / (download) - annotate - [select for diffs], Wed Jul 6 18:53:00 2005 UTC (14 years, 4 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 (14 years, 4 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 (14 years, 4 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 (14 years, 5 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 (14 years, 5 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 (14 years, 6 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.57 / (download) - annotate - [select for diffs], Tue Mar 8 17:29:29 2005 UTC (14 years, 8 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.56 / (download) - annotate - [select for diffs], Sat Feb 26 21:34:56 2005 UTC (14 years, 8 months ago) by perry
Branch: MAIN
Changes since 1.55: +4 -4 lines
Diff to previous 1.55 (colored)

nuke trailing whitespace

Revision 1.55 / (download) - annotate - [select for diffs], Fri Sep 17 14:11:25 2004 UTC (15 years, 2 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.54 / (download) - annotate - [select for diffs], Mon Dec 8 14:23:33 2003 UTC (15 years, 11 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 (15 years, 11 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 (15 years, 11 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 (16 years, 2 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 (16 years, 2 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 (16 years, 3 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 / (download) - annotate - [select for diffs], Sun Jun 29 22:31:33 2003 UTC (16 years, 4 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 (16 years, 4 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 (16 years, 4 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 (16 years, 7 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 (16 years, 9 months 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 (16 years, 10 months 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.42 / (download) - annotate - [select for diffs], Tue Oct 22 03:35:10 2002 UTC (17 years, 1 month 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.41 / (download) - annotate - [select for diffs], Fri Aug 2 04:49:35 2002 UTC (17 years, 3 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.40 / (download) - annotate - [select for diffs], Fri Jun 21 02:19:12 2002 UTC (17 years, 5 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.39 / (download) - annotate - [select for diffs], Sat Dec 8 04:09:59 2001 UTC (17 years, 11 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.38 / (download) - annotate - [select for diffs], Mon Nov 12 15:25:39 2001 UTC (18 years 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.37 / (download) - annotate - [select for diffs], Wed Oct 17 23:33:29 2001 UTC (18 years, 1 month 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.36 / (download) - annotate - [select for diffs], Sat Sep 8 02:02:04 2001 UTC (18 years, 2 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.35 / (download) - annotate - [select for diffs], Thu Aug 3 20:41:23 2000 UTC (19 years, 3 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 (19 years, 5 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 (19 years, 7 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 (20 years, 3 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.31 / (download) - annotate - [select for diffs], Thu Jul 8 01:06:01 1999 UTC (20 years, 4 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.30 / (download) - annotate - [select for diffs], Fri Apr 30 18:43:00 1999 UTC (20 years, 6 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.29 / (download) - annotate - [select for diffs], Wed Apr 7 05:47:37 1999 UTC (20 years, 7 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 (21 years, 3 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 (21 years, 4 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 (21 years, 8 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.25 / (download) - annotate - [select for diffs], Thu Oct 30 22:47:06 1997 UTC (22 years 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.24 / (download) - annotate - [select for diffs], Sat Oct 11 00:08:08 1997 UTC (22 years, 1 month 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 (22 years, 6 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 (22 years, 7 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 (22 years, 7 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 (23 years 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 (23 years, 1 month 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 (23 years, 1 month 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 (23 years, 9 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 (23 years, 9 months 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 (24 years, 8 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 (24 years, 11 months 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 (25 years, 4 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 (25 years, 5 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 (25 years, 6 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 (25 years, 6 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 (25 years, 10 months 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 (25 years, 10 months 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 (25 years, 11 months 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 (26 years 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 / (download) - annotate - [select for diffs], Tue Sep 7 15:41:11 1993 UTC (26 years, 2 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 (26 years, 3 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 / (download) - annotate - [select for diffs], Thu May 20 02:55:36 1993 UTC (26 years, 6 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 (26 years, 8 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 / (download) - annotate - [select for diffs], Sun Mar 21 09:45:37 1993 UTC (26 years, 8 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>