Home | History | Annotate | only in /src/sys/coda
History log of /src/sys/coda
RevisionDateAuthorComments
 1.7 08-Apr-2007  gdt Remove cruft. Update to current reality.
 1.6 26-Dec-2002  jdolecek branches: 1.6.18; 1.6.56; 1.6.60; 1.6.62;
insert newlines to the MAKEDEV section, so that it's more clear
what part is MAKEDEV coda and what text
 1.5 25-Dec-2002  jdolecek update to post gehenna-devsw world
 1.4 13-Mar-2000  soren branches: 1.4.6;
Fix doubled 'the's in comments.
 1.3 18-Oct-1999  rvb branches: 1.3.2;
Update 00READ with porting instructions
 1.2 08-Sep-1998  rvb branches: 1.2.12;
Pass2 complete
 1.1 29-Aug-1998  rvb branches: 1.1.1;
Initial revision
 1.1.1.1 29-Aug-1998  rvb Very Preliminary Coda
 1.2.12.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.3.2.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
 1.4.6.1 29-Dec-2002  thorpej Sync with HEAD.
 1.6.62.1 11-Jul-2007  mjf Sync with head.
 1.6.60.2 09-Jun-2007  ad Sync with head.
 1.6.60.1 10-Apr-2007  ad Sync with head.
 1.6.56.1 15-Apr-2007  yamt sync with head.
 1.6.18.1 03-Sep-2007  yamt sync with head.
 1.4 04-Aug-2012  christos mention current status
 1.3 08-Apr-2007  gdt branches: 1.3.70;
Remove cruft. Update to current reality.
 1.2 08-Sep-1998  rvb branches: 1.2.62; 1.2.100; 1.2.104; 1.2.106;
Pass2 complete
 1.1 29-Aug-1998  rvb branches: 1.1.1;
Initial revision
 1.1.1.1 29-Aug-1998  rvb Very Preliminary Coda
 1.2.106.1 11-Jul-2007  mjf Sync with head.
 1.2.104.1 10-Apr-2007  ad Sync with head.
 1.2.100.1 15-Apr-2007  yamt sync with head.
 1.2.62.1 03-Sep-2007  yamt sync with head.
 1.3.70.1 30-Oct-2012  yamt sync with head
 1.4 08-Apr-2007  gdt Remove cruft. Update to current reality.
 1.3 04-Apr-2006  gdt branches: 1.3.14; 1.3.18; 1.3.20;
Update list of todo items, and note that old items are from 1998 and
thus likely no longer correct.
 1.2 08-Sep-1998  rvb branches: 1.2.62; 1.2.76; 1.2.78; 1.2.80; 1.2.82; 1.2.84;
Pass2 complete
 1.1 29-Aug-1998  rvb branches: 1.1.1;
Initial revision
 1.1.1.1 29-Aug-1998  rvb Very Preliminary Coda
 1.2.84.1 24-May-2006  tron Merge 2006-05-24 NetBSD-current into the "peter-altq" branch.
 1.2.82.1 19-Apr-2006  elad sync with head.
 1.2.80.1 11-Apr-2006  yamt sync with head
 1.2.78.1 22-Apr-2006  simonb Sync with head.
 1.2.76.1 09-Sep-2006  rpaulo sync with head
 1.2.62.2 03-Sep-2007  yamt sync with head.
 1.2.62.1 21-Jun-2006  yamt sync with head.
 1.3.20.1 11-Jul-2007  mjf Sync with head.
 1.3.18.1 10-Apr-2007  ad Sync with head.
 1.3.14.1 15-Apr-2007  yamt sync with head.
 1.21 17-May-2024  thorpej <sys/mallocvar.h> -> <sys/malloc.h>
 1.20 13-Dec-2014  hannken Change coda from hashlist to vcache.
- Replace all hash list crawlers with vfs_vnode_iterator.
 1.19 13-Dec-2014  hannken Remove unused definitions (C_WANTED, C_LOCKED).
 1.18 04-May-2012  christos branches: 1.18.2; 1.18.16;
remove variable names from prototypes.
 1.17 21-Mar-2008  plunky branches: 1.17.38; 1.17.42;
convert more insque/remque style queuing to use a queue(3) TAILQ,
this necessitates using a flag to indicate vc_open instead of abusing
the queue pointer but apart from that there is no functional
difference.
 1.16 04-Mar-2007  christos branches: 1.16.36;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.15 11-Dec-2005  christos branches: 1.15.26;
merge ktrace-lwp.
 1.14 26-Feb-2005  perry branches: 1.14.4;
nuke trailing whitespace
 1.13 27-Aug-2003  drochner branches: 1.13.8; 1.13.10;
update for the protocol used by coda>=6,
patches supplied by the coda-6.0.2 distribution,
with small changes to support the old protocol optionally
(options CODA_COMPAT_5)
 1.12 25-Aug-2003  drochner fix a deadlock during mount:
The client manager (venus) blocks in sys_mount() before entering its
event loop answering requests from the kernel device (cfs). sys_mount()
calls VFS_STATFS() internally which caused an upcall through cfs,
which was never answered.
Now don't consider the fs fully mounted before the VFS_START() was
called at the vey end of sys_mount(). So VFS_STATFS() will return
an error which is ignored.
 1.11 02-Feb-2003  christos branches: 1.11.2;
protect <sys/mallocvar.h> ifdef _KERNEL
 1.10 01-Feb-2003  thorpej 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.
 1.9 02-Nov-2002  perry /*CONTCOND*/ while (0)'ed macros
 1.8 24-Nov-2001  perry add a VTOC macro that doesn't cast, and fix a spurious lvalue cast with it.
 1.7 17-Oct-1999  cgd branches: 1.7.12; 1.7.14;
nuke RCS "Log" tags. They cause problems for third parties importing
our sources, and for NetBSD release engineering folks. (They've
been against the NetBSD coding style forever, but they crept in anyway.)
 1.6 08-Jul-1999  wrstuden branches: 1.6.2;
Bump osrelease to 1.4E. Add layerfs files, remove null_subr.c.

Update coda to new struct lock in struct vnode.

make fdescfs, kernfs, portalfs, and procfs actually lock their vnodes.
It's not that hard.

Make unionfs set v_vnlock = NULL so any overlayed fs will call its
VOP_LOCK.
 1.5 11-Nov-1998  rvb branches: 1.5.6;
Lookup now passes up an extra flag. But old veni will
be ok; new veni will check /dev/cfs0 to make sure that a new
kernel is running.
Also, a bug in vc_nb_close iff CODA_SIGNAL's were seen has been
fixed.
 1.4 15-Sep-1998  rvb Final piece of rename cfs->coda
 1.3 12-Sep-1998  rvb Change cfs/CFS in symbols, strings and constants to coda/CODA
to avoid fs conflicts.
 1.2 08-Sep-1998  rvb Pass2 complete
 1.1 29-Aug-1998  rvb branches: 1.1.1;
Initial revision
 1.1.1.1 29-Aug-1998  rvb Very Preliminary Coda
 1.5.6.1 02-Aug-1999  thorpej Update from trunk.
 1.6.2.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.7.14.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.7.12.2 11-Nov-2002  nathanw Catch up to -current
 1.7.12.1 08-Jan-2002  nathanw Catch up to -current.
 1.11.2.4 04-Mar-2005  skrll Sync with HEAD.

Hi Perry!
 1.11.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.11.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.11.2.1 03-Aug-2004  skrll Sync with HEAD
 1.13.10.1 19-Mar-2005  yamt sync with head. xen and whitespace. xen part is not finished.
 1.13.8.1 29-Apr-2005  kent sync with -current
 1.14.4.2 24-Mar-2008  yamt sync with head.
 1.14.4.1 03-Sep-2007  yamt sync with head.
 1.15.26.1 12-Mar-2007  rmind Sync with HEAD.
 1.16.36.1 03-Apr-2008  mjf Sync with HEAD.
 1.17.42.1 02-Jun-2012  mrg sync to latest -current.
 1.17.38.1 23-May-2012  yamt sync with head.
 1.18.16.1 06-Apr-2015  skrll Sync with HEAD
 1.18.2.1 03-Dec-2017  jdolecek update from HEAD
 1.21 14-Nov-2020  hannken Rewrite coda_readdir() to directly process the container file.

Passing this operation down to the file system holding the container
cannot work for anything but UFS and UFS doesn't allow reading
directory from a plain file since ~2015.

Fixes PR kern/55775 Coda client, its in-kernel part, opens wrong files ...
 1.20 19-Apr-2018  christos branches: 1.20.6; 1.20.14;
s/static inline/static __inline/g for consistency.
 1.19 06-Sep-2015  dholland branches: 1.19.10; 1.19.16;
More on PR 41200: headers that declare ioctls should include sys/ioccom.h.
This covers (I think) all the MI headers outside of external/ (and dist/).
 1.18 13-Dec-2014  hannken Move the definition of NVCODA and CODA_COMPAT_5 to coda.h,
remove them from coda_vfsops.c and coda_psdev.c.
 1.17 07-Aug-2010  christos branches: 1.17.18; 1.17.36;
Fix incorrect comments about the buffer size being 2K; it is really 8K now.
From Robert Watson.
 1.16 20-Jul-2010  christos Correct incomplete size checks for the coda ioctls. From Dan Rosenberg.
 1.15 28-Sep-2009  blymn branches: 1.15.2; 1.15.4;
Make file_id unsigned so it does not get sign extended when promoted
to a 64bit ino_t.
 1.14 04-Mar-2007  christos branches: 1.14.40; 1.14.52; 1.14.58; 1.14.60;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.13 02-Mar-2006  gdt branches: 1.13.18; 1.13.20; 1.13.28;
Change type of 'inode' member of struct coda_open_out to ino_t. This
holds a host system inode denoting a container file, not a coda inode
type. Tested with CVS coda on i386. Reviewed by christos@.
 1.12 24-Dec-2005  perry branches: 1.12.4; 1.12.6;
__inline__ -> inline
 1.11 11-Dec-2005  christos merge ktrace-lwp.
 1.10 28-Aug-2005  christos coda inodes are still 32 bits. Don't use ino_t in coda_open_out.
 1.9 26-Feb-2005  perry branches: 1.9.4;
nuke trailing whitespace
 1.8 27-Aug-2003  drochner branches: 1.8.8; 1.8.10;
update for the protocol used by coda>=6,
patches supplied by the coda-6.0.2 distribution,
with small changes to support the old protocol optionally
(options CODA_COMPAT_5)
 1.7 27-Mar-2002  phil branches: 1.7.10;
Add the statfs upcall so df now reports cache size and usage.
 1.6 11-Nov-1998  rvb branches: 1.6.22; 1.6.24;
Lookup now passes up an extra flag. But old veni will
be ok; new veni will check /dev/cfs0 to make sure that a new
kernel is running.
Also, a bug in vc_nb_close iff CODA_SIGNAL's were seen has been
fixed.
 1.5 28-Oct-1998  rvb Venus must be passed O_CREAT flag on VOP_OPEN iff this is
a creat so that we can will allow a mode 444 file to be
written into. Sync with the latest coda.h and deal with
collateral damage.
 1.4 15-Sep-1998  rvb Final piece of rename cfs->coda
 1.3 12-Sep-1998  rvb Change cfs/CFS in symbols, strings and constants to coda/CODA
to avoid fs conflicts.
 1.2 08-Sep-1998  rvb Pass2 complete
 1.1 29-Aug-1998  rvb branches: 1.1.1;
Initial revision
 1.1.1.1 29-Aug-1998  rvb Very Preliminary Coda
 1.6.24.1 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.6.22.1 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.7.10.5 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.7.10.4 04-Mar-2005  skrll Sync with HEAD.

Hi Perry!
 1.7.10.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.7.10.2 18-Sep-2004  skrll Sync with HEAD.
 1.7.10.1 03-Aug-2004  skrll Sync with HEAD
 1.8.10.1 19-Mar-2005  yamt sync with head. xen and whitespace. xen part is not finished.
 1.8.8.1 29-Apr-2005  kent sync with -current
 1.9.4.2 03-Sep-2007  yamt sync with head.
 1.9.4.1 21-Jun-2006  yamt sync with head.
 1.12.6.1 22-Apr-2006  simonb Sync with head.
 1.12.4.1 09-Sep-2006  rpaulo sync with head
 1.13.28.1 04-Aug-2010  bouyer Pull up following revision(s) (requested by christos in ticket #1400):
sys/coda/coda_venus.c: revision 1.28
sys/coda/coda_vnops.c: revision 1.76
sys/coda/coda.h: revision 1.16
Correct incomplete size checks for the coda ioctls. From Dan Rosenberg.
 1.13.20.1 12-Mar-2007  rmind Sync with HEAD.
 1.13.18.1 04-Aug-2010  bouyer Pull up following revision(s) (requested by christos in ticket #1400):
sys/coda/coda_venus.c: revision 1.28
sys/coda/coda_vnops.c: revision 1.76
sys/coda/coda.h: revision 1.16
Correct incomplete size checks for the coda ioctls. From Dan Rosenberg.
 1.14.60.1 20-May-2011  matt bring matt-nb5-mips64 up to date with netbsd-5-1-RELEASE (except compat).
 1.14.58.1 25-Aug-2010  snj Pull up following revision(s) (requested by christos in ticket #1431):
sys/coda/coda.h: revision 1.16
sys/coda/coda_venus.c: revision 1.28
sys/coda/coda_vnops.c: revision 1.76
Correct incomplete size checks for the coda ioctls. From Dan Rosenberg.
 1.14.52.2 25-Jan-2012  riz Pull up following revision(s) (requested by gdt in ticket #1716):
sys/coda/coda.h: revision 1.15
Make file_id unsigned so it does not get sign extended when promoted
to a 64bit ino_t.
 1.14.52.1 25-Aug-2010  snj Pull up following revision(s) (requested by christos in ticket #1431):
sys/coda/coda.h: revision 1.16
sys/coda/coda_venus.c: revision 1.28
sys/coda/coda_vnops.c: revision 1.76
Correct incomplete size checks for the coda ioctls. From Dan Rosenberg.
 1.14.40.2 11-Aug-2010  yamt sync with head.
 1.14.40.1 11-Mar-2010  yamt sync with head
 1.15.4.1 05-Mar-2011  rmind sync with head
 1.15.2.1 17-Aug-2010  uebayasi Sync with HEAD.
 1.17.36.2 22-Sep-2015  skrll Sync with HEAD
 1.17.36.1 06-Apr-2015  skrll Sync with HEAD
 1.17.18.1 03-Dec-2017  jdolecek update from HEAD
 1.19.16.1 22-Apr-2018  pgoyette Sync with HEAD
 1.19.10.1 14-Nov-2020  martin Pull up following revision(s) (requested by hannken in ticket #1622):

sys/coda/coda_vnops.c: revision 1.114 (patch)
sys/coda/coda.h: revision 1.21 (patch)

Rewrite coda_readdir() to directly process the container file.

Passing this operation down to the file system holding the container
cannot work for anything but UFS and UFS doesn't allow reading
directory from a plain file since ~2015.

Fixes PR kern/55775 Coda client, its in-kernel part, opens wrong files ...
 1.20.14.1 14-Dec-2020  thorpej Sync w/ HEAD.
 1.20.6.1 14-Nov-2020  martin Pull up following revision(s) (requested by hannken in ticket #1131):

sys/coda/coda_vnops.c: revision 1.114 (patch)
sys/coda/coda.h: revision 1.21 (patch)

Rewrite coda_readdir() to directly process the container file.

Passing this operation down to the file system holding the container
cannot work for anything but UFS and UFS doesn't allow reading
directory from a plain file since ~2015.

Fixes PR kern/55775 Coda client, its in-kernel part, opens wrong files ...
 1.2 08-Sep-1998  rvb Pass2 complete
 1.1 29-Aug-1998  rvb branches: 1.1.1;
Initial revision
 1.1.1.1 29-Aug-1998  rvb Very Preliminary Coda
 1.8 06-Sep-2015  dholland More on PR 41200: headers that declare ioctls should include sys/ioccom.h.
This covers (I think) all the MI headers outside of external/ (and dist/).
 1.7 11-Dec-2005  christos branches: 1.7.120; 1.7.140;
merge ktrace-lwp.
 1.6 26-Feb-2005  perry nuke trailing whitespace
 1.5 17-Oct-1999  cgd branches: 1.5.34; 1.5.42; 1.5.44;
nuke RCS "Log" tags. They cause problems for third parties importing
our sources, and for NetBSD release engineering folks. (They've
been against the NetBSD coding style forever, but they crept in anyway.)
 1.4 15-Sep-1998  rvb branches: 1.4.12;
Final piece of rename cfs->coda
 1.3 12-Sep-1998  rvb Change cfs/CFS in symbols, strings and constants to coda/CODA
to avoid fs conflicts.
 1.2 08-Sep-1998  rvb Pass2 complete
 1.1 29-Aug-1998  rvb branches: 1.1.1;
Initial revision
 1.1.1.1 29-Aug-1998  rvb Very Preliminary Coda
 1.4.12.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.5.44.1 19-Mar-2005  yamt sync with head. xen and whitespace. xen part is not finished.
 1.5.42.1 29-Apr-2005  kent sync with -current
 1.5.34.1 04-Mar-2005  skrll Sync with HEAD.

Hi Perry!
 1.7.140.1 22-Sep-2015  skrll Sync with HEAD
 1.7.120.1 03-Dec-2017  jdolecek update from HEAD
 1.7 21-Mar-2008  plunky convert more insque/remque style queuing to use a queue(3) TAILQ,
this necessitates using a flag to indicate vc_open instead of abusing
the queue pointer but apart from that there is no functional
difference.
 1.6 11-Dec-2005  christos branches: 1.6.70;
merge ktrace-lwp.
 1.5 26-Feb-2005  perry branches: 1.5.4;
nuke trailing whitespace
 1.4 02-Nov-2002  perry branches: 1.4.6; 1.4.14; 1.4.16;
/*CONTCOND*/ while (0)'ed macros
 1.3 15-Sep-1998  rvb branches: 1.3.24;
Final piece of rename cfs->coda
 1.2 08-Sep-1998  rvb Pass2 complete
 1.1 29-Aug-1998  rvb branches: 1.1.1;
Initial revision
 1.1.1.1 29-Aug-1998  rvb Very Preliminary Coda
 1.3.24.1 11-Nov-2002  nathanw Catch up to -current
 1.4.16.1 19-Mar-2005  yamt sync with head. xen and whitespace. xen part is not finished.
 1.4.14.1 29-Apr-2005  kent sync with -current
 1.4.6.1 04-Mar-2005  skrll Sync with HEAD.

Hi Perry!
 1.5.4.1 24-Mar-2008  yamt sync with head.
 1.6.70.1 03-Apr-2008  mjf Sync with HEAD.
 1.30 17-May-2024  thorpej Remove unnecessary include of <sys/malloc.h>.
 1.29 09-Feb-2024  andvar fix spelling mistakes, mainly in comments and log messages.
 1.28 20-May-2022  andvar s/auxillary/auxiliary/ in comments.
 1.27 13-Apr-2020  ad Replace most uses of vp->v_usecount with a call to vrefcnt(vp), a function
that hides the details and does atomic_load_relaxed(). Signature matches
FreeBSD.
 1.26 18-Oct-2014  snj branches: 1.26.20; 1.26.30;
src is too big these days to tolerate superfluous apostrophes. It's
"its", people!
 1.25 02-Aug-2012  christos branches: 1.25.2;
- move debugging functions to vcoda so modules with -DDEBUG link
- fix writing to coda files. this is probably not the right way to do
this, but it satisfies the locking protocol:
1. Sometimes coda_open() is called with an unlocked vnode which
does not satisfy the locking protocol. Lock it for now. We
need to find out why this happens
2. VFS_VGET sometimes returns the container vnode unlocked. What
is the locking protocol for VFS_VGET? We also lock it here.
 1.24 18-Apr-2009  tsutsui branches: 1.24.12;
Remove extra whitespace added by a stupid tool.
XXX: more in src/sys/arch
 1.23 18-Mar-2009  cegger bcopy -> memcpy
 1.22 22-Nov-2007  plunky branches: 1.22.18; 1.22.26; 1.22.32;
convert usage of insque/remque to queue(3) macros
 1.21 10-Oct-2007  ad branches: 1.21.4;
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.
 1.20 16-Nov-2006  christos branches: 1.20.8; 1.20.22; 1.20.24; 1.20.26;
__unused removal on arguments; approved by core.
 1.19 12-Oct-2006  christos - sprinkle __unused on function decls.
- fix a couple of unused bugs
- no more -Wno-unused for i386
 1.18 14-May-2006  elad branches: 1.18.8; 1.18.10;
integrate kauth.
 1.17 11-Dec-2005  christos branches: 1.17.4; 1.17.6; 1.17.8; 1.17.10; 1.17.12;
merge ktrace-lwp.
 1.16 30-Aug-2005  xtraeme * Remove __P()
* Use ANSI function declarations
 1.15 29-May-2005  christos branches: 1.15.2;
- sprinkle const
- avoid shadowed variables.
 1.14 26-Feb-2005  perry nuke trailing whitespace
 1.13 27-Aug-2003  drochner branches: 1.13.8; 1.13.10;
update for the protocol used by coda>=6,
patches supplied by the coda-6.0.2 distribution,
with small changes to support the old protocol optionally
(options CODA_COMPAT_5)
 1.12 29-Mar-2003  wiz branches: 1.12.2;
Consistently spell occurrence with two rs.
 1.11 12-Nov-2001  lukem add RCSIDs
 1.10 18-Jul-2001  thorpej bzero -> memset
 1.9 17-Oct-1999  cgd branches: 1.9.12; 1.9.14;
nuke RCS "Log" tags. They cause problems for third parties importing
our sources, and for NetBSD release engineering folks. (They've
been against the NetBSD coding style forever, but they crept in anyway.)
 1.8 28-Oct-1998  rvb branches: 1.8.12;
Venus must be passed O_CREAT flag on VOP_OPEN iff this is
a creat so that we can will allow a mode 444 file to be
written into. Sync with the latest coda.h and deal with
collateral damage.
 1.7 28-Sep-1998  rvb I want to distinguish from DEBUG printouts and CODA_VERBOSE printouts.
The latter are normal informational messages that are sometimes
interesting to view.
 1.6 26-Sep-1998  tv DIAGNOSTIC -> DEBUG for all non-panic messages. DIAGNOSTIC is only for
sanity checks and should not turn on any messages not already printed
without it.
 1.5 25-Sep-1998  rvb Conditionalize "stray" printouts under DIAGNOSTIC and DEBUG.
Make files compile if DEBUG is on (from Alan Barrett). Finally,
make coda an lkm.
 1.4 15-Sep-1998  rvb Final piece of rename cfs->coda
 1.3 12-Sep-1998  rvb Change cfs/CFS in symbols, strings and constants to coda/CODA
to avoid fs conflicts.
 1.2 08-Sep-1998  rvb Pass2 complete
 1.1 29-Aug-1998  rvb branches: 1.1.1;
Initial revision
 1.1.1.1 29-Aug-1998  rvb Very Preliminary Coda
 1.8.12.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.9.14.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.9.14.1 03-Aug-2001  lukem update to -current
 1.9.12.2 14-Nov-2001  nathanw Catch up to -current.
 1.9.12.1 24-Aug-2001  nathanw Catch up with -current.
 1.12.2.5 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.12.2.4 04-Mar-2005  skrll Sync with HEAD.

Hi Perry!
 1.12.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.12.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.12.2.1 03-Aug-2004  skrll Sync with HEAD
 1.13.10.1 19-Mar-2005  yamt sync with head. xen and whitespace. xen part is not finished.
 1.13.8.1 29-Apr-2005  kent sync with -current
 1.15.2.4 07-Dec-2007  yamt sync with head
 1.15.2.3 27-Oct-2007  yamt sync with head.
 1.15.2.2 30-Dec-2006  yamt sync with head.
 1.15.2.1 21-Jun-2006  yamt sync with head.
 1.17.12.1 24-May-2006  tron Merge 2006-05-24 NetBSD-current into the "peter-altq" branch.
 1.17.10.2 06-May-2006  christos - Move kauth_cred_t declaration to <sys/types.h>
- Cleanup struct ucred; forward declarations that are unused.
- Don't include <sys/kauth.h> in any header, but include it in the c files
that need it.

Approved by core.
 1.17.10.1 08-Mar-2006  elad Adapt to kernel authorization KPI.
 1.17.8.1 24-May-2006  yamt sync with head.
 1.17.6.1 01-Jun-2006  kardel Sync with head.
 1.17.4.1 09-Sep-2006  rpaulo sync with head
 1.18.10.2 10-Dec-2006  yamt sync with head.
 1.18.10.1 22-Oct-2006  yamt sync with head
 1.18.8.1 18-Nov-2006  ad Sync with head.
 1.20.26.1 14-Oct-2007  yamt sync with head.
 1.20.24.2 09-Jan-2008  matt sync with HEAD
 1.20.24.1 06-Nov-2007  matt sync with HEAD
 1.20.22.2 27-Nov-2007  joerg Sync with HEAD. amd64 Xen support needs testing.
 1.20.22.1 26-Oct-2007  joerg Sync with HEAD.

Follow the merge of pmap.c on i386 and amd64 and move
pmap_init_tmp_pgtbl into arch/x86/x86/pmap.c. Modify the ACPI wakeup
code to restore CR4 before jumping back into kernel space as the large
page option might cover that.
 1.20.8.1 17-Jun-2007  ad - Increase the number of thread priorities from 128 to 256. How the space
is set up is to be revisited.
- Implement soft interrupts as kernel threads. A generic implementation
is provided, with hooks for fast-path MD code that can run the interrupt
threads over the top of other threads executing in the kernel.
- Split vnode::v_flag into three fields, depending on how the flag is
locked (by the interlock, by the vnode lock, by the file system).
- Miscellaneous locking fixes and improvements.
 1.21.4.1 08-Dec-2007  mjf Sync with HEAD.
 1.22.32.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.22.26.1 28-Apr-2009  skrll Sync with HEAD.
 1.22.18.1 04-May-2009  yamt sync with head.
 1.24.12.1 30-Oct-2012  yamt sync with head
 1.25.2.1 03-Dec-2017  jdolecek update from HEAD
 1.26.30.1 20-Apr-2020  bouyer Sync with HEAD
 1.26.20.1 21-Apr-2020  martin Sync with HEAD
 1.12 18-Mar-2009  cegger bcmp -> memcmp
 1.11 22-Nov-2007  plunky branches: 1.11.18; 1.11.26; 1.11.32;
convert usage of insque/remque to queue(3) macros
 1.10 14-May-2006  elad branches: 1.10.32; 1.10.34; 1.10.40;
integrate kauth.
 1.9 11-Dec-2005  christos branches: 1.9.4; 1.9.6; 1.9.8; 1.9.10; 1.9.12;
merge ktrace-lwp.
 1.8 26-Feb-2005  perry branches: 1.8.4;
nuke trailing whitespace
 1.7 27-Aug-2003  drochner branches: 1.7.8; 1.7.10;
update for the protocol used by coda>=6,
patches supplied by the coda-6.0.2 distribution,
with small changes to support the old protocol optionally
(options CODA_COMPAT_5)
 1.6 17-Oct-1999  cgd branches: 1.6.34;
nuke RCS "Log" tags. They cause problems for third parties importing
our sources, and for NetBSD release engineering folks. (They've
been against the NetBSD coding style forever, but they crept in anyway.)
 1.5 18-Nov-1998  ross branches: 1.5.10;
Various trivial LP64 tweaks to squelch some compiler warnings.
 1.4 15-Sep-1998  rvb Final piece of rename cfs->coda
 1.3 12-Sep-1998  rvb Change cfs/CFS in symbols, strings and constants to coda/CODA
to avoid fs conflicts.
 1.2 08-Sep-1998  rvb Pass2 complete
 1.1 29-Aug-1998  rvb branches: 1.1.1;
Initial revision
 1.1.1.1 29-Aug-1998  rvb Very Preliminary Coda
 1.5.10.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.6.34.4 04-Mar-2005  skrll Sync with HEAD.

Hi Perry!
 1.6.34.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.6.34.2 18-Sep-2004  skrll Sync with HEAD.
 1.6.34.1 03-Aug-2004  skrll Sync with HEAD
 1.7.10.1 19-Mar-2005  yamt sync with head. xen and whitespace. xen part is not finished.
 1.7.8.1 29-Apr-2005  kent sync with -current
 1.8.4.2 07-Dec-2007  yamt sync with head
 1.8.4.1 21-Jun-2006  yamt sync with head.
 1.9.12.1 24-May-2006  tron Merge 2006-05-24 NetBSD-current into the "peter-altq" branch.
 1.9.10.2 06-May-2006  christos - Move kauth_cred_t declaration to <sys/types.h>
- Cleanup struct ucred; forward declarations that are unused.
- Don't include <sys/kauth.h> in any header, but include it in the c files
that need it.

Approved by core.
 1.9.10.1 08-Mar-2006  elad Adapt to kernel authorization KPI.
 1.9.8.1 24-May-2006  yamt sync with head.
 1.9.6.1 01-Jun-2006  kardel Sync with head.
 1.9.4.1 09-Sep-2006  rpaulo sync with head
 1.10.40.1 08-Dec-2007  mjf Sync with HEAD.
 1.10.34.1 09-Jan-2008  matt sync with HEAD
 1.10.32.1 27-Nov-2007  joerg Sync with HEAD. amd64 Xen support needs testing.
 1.11.32.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.11.26.1 28-Apr-2009  skrll Sync with HEAD.
 1.11.18.1 04-May-2009  yamt sync with head.
 1.2 08-Sep-1998  rvb Pass2 complete
 1.1 29-Aug-1998  rvb branches: 1.1.1;
Initial revision
 1.1.1.1 29-Aug-1998  rvb Very Preliminary Coda
 1.7 24-Jul-2021  andvar s/structres/structures + s/whenver/whenever
 1.6 11-Dec-2005  christos branches: 1.6.180;
merge ktrace-lwp.
 1.5 26-Feb-2005  perry nuke trailing whitespace
 1.4 15-Sep-1998  rvb branches: 1.4.46; 1.4.54; 1.4.56;
Final piece of rename cfs->coda
 1.3 12-Sep-1998  rvb Change cfs/CFS in symbols, strings and constants to coda/CODA
to avoid fs conflicts.
 1.2 08-Sep-1998  rvb Pass2 complete
 1.1 29-Aug-1998  rvb branches: 1.1.1;
Initial revision
 1.1.1.1 29-Aug-1998  rvb Very Preliminary Coda
 1.4.56.1 19-Mar-2005  yamt sync with head. xen and whitespace. xen part is not finished.
 1.4.54.1 29-Apr-2005  kent sync with -current
 1.4.46.1 04-Mar-2005  skrll Sync with HEAD.

Hi Perry!
 1.6.180.1 01-Aug-2021  thorpej Sync with HEAD.
 1.9 06-Sep-2015  dholland More on PR 41200: headers that declare ioctls should include sys/ioccom.h.
This covers (I think) all the MI headers outside of external/ (and dist/).
 1.8 07-Aug-2010  christos branches: 1.8.18; 1.8.36;
Fix incorrect comments about the buffer size being 2K; it is really 8K now.
From Robert Watson.
 1.7 11-Dec-2005  christos branches: 1.7.74; 1.7.96; 1.7.98;
merge ktrace-lwp.
 1.6 26-Feb-2005  perry nuke trailing whitespace
 1.5 17-Oct-1999  cgd branches: 1.5.34; 1.5.42; 1.5.44;
nuke RCS "Log" tags. They cause problems for third parties importing
our sources, and for NetBSD release engineering folks. (They've
been against the NetBSD coding style forever, but they crept in anyway.)
 1.4 15-Sep-1998  rvb branches: 1.4.12;
Final piece of rename cfs->coda
 1.3 12-Sep-1998  rvb Change cfs/CFS in symbols, strings and constants to coda/CODA
to avoid fs conflicts.
 1.2 08-Sep-1998  rvb Pass2 complete
 1.1 29-Aug-1998  rvb branches: 1.1.1;
Initial revision
 1.1.1.1 29-Aug-1998  rvb Very Preliminary Coda
 1.4.12.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.5.44.1 19-Mar-2005  yamt sync with head. xen and whitespace. xen part is not finished.
 1.5.42.1 29-Apr-2005  kent sync with -current
 1.5.34.1 04-Mar-2005  skrll Sync with HEAD.

Hi Perry!
 1.7.98.1 05-Mar-2011  rmind sync with head
 1.7.96.1 17-Aug-2010  uebayasi Sync with HEAD.
 1.7.74.1 11-Aug-2010  yamt sync with head.
 1.8.36.1 22-Sep-2015  skrll Sync with HEAD
 1.8.18.1 03-Dec-2017  jdolecek update from HEAD
 1.65 17-May-2024  thorpej Remove unnecessary include of <sys/malloc.h>.
 1.64 13-Feb-2024  andvar s/enqueing/enqueuing/ in debug messages (took a bait from recent Nick's commit)
s/occaision/occasion/ in comment.
 1.63 03-Aug-2023  rin coda_call(): Appease GCC 12.3.0 -Wmisleading-indentation
No binary changes.
 1.62 03-May-2022  andvar fix various typos, mainly s/trasfering/transferring/ and s/theese/these/.
 1.61 28-Mar-2022  riastradh driver(9): devsw_detach never fails. Make it return void.

Prune a whole lotta dead branches as a result of this. (Some logic
calling this is also wrong for other reasons; devsw_detach is final
-- you should never have any reason to decide to roll it back. To be
cleaned up in subsequent commits...)

XXX kernel ABI change to devsw_detach signature requires bump
 1.60 26-Sep-2021  thorpej Change the kqueue filterops::f_isfd field to filterops::f_flags, and
define a flag FILTEROP_ISFD that has the meaning of the prior f_isfd.
Field and flag name aligned with OpenBSD.

This does not constitute a functional or ABI change, as the field location
and size, and the value placed in that field, are the same as the previous
code, but we're bumping __NetBSD_Version__ so 3rd-party module source code
can adapt, as needed.

NetBSD 9.99.89
 1.59 19-Dec-2020  thorpej Use sel{record,remove}_knote().
 1.58 25-Oct-2017  maya branches: 1.58.16;
Use C99 initializer for filterops

Mostly done with spatch with touchups for indentation

@@
expression a;
identifier b,c,d;
identifier p;
@@
const struct filterops p =
- { a, b, c, d
+ {
+ .f_isfd = a,
+ .f_attach = b,
+ .f_detach = c,
+ .f_event = d,
};
 1.57 07-Jul-2016  msaitoh branches: 1.57.8;
KNF. Remove extra spaces. No functional change.
 1.56 20-Aug-2015  christos include "ioconf.h" to get the 'void <driver>attach(int count);' prototype.
 1.55 06-May-2015  hannken Remove miscfs/syncfs and

- move the syncer into kern/vfs_subr.c.

- change the syncer to process the mountlist and VFS_SYNC as appropriate.

- use an API for mount points similiar to the API for vnodes:
- vfs_syncer_add_to_worklist(struct mount *mp) to add
- vfs_syncer_remove_from_worklist(struct mount *mp) to remove a mount.

No objections on tech-kern@
 1.54 13-Dec-2014  hannken Move the definition of NVCODA and CODA_COMPAT_5 to coda.h,
remove them from coda_vfsops.c and coda_psdev.c.
 1.53 25-Jul-2014  dholland branches: 1.53.4;
Add d_discard to all struct cdevsw instances I could find.

All have been set to "nodiscard"; some should get a real implementation.
 1.52 16-Mar-2014  dholland branches: 1.52.2;
Change (mostly mechanically) every cdevsw/bdevsw I can find to use
designated initializers.

I have not built every extant kernel so I have probably broken at
least one build; however I've also found and fixed some wrong
cdevsw/bdevsw entries so even if so I think we come out ahead.
 1.51 18-Oct-2013  riz C requires a statement after a label, and a declaration is not a
statement, so create a block using {}. From christos.
 1.50 17-Oct-2013  christos move module code inside module ifdef
 1.49 04-Aug-2012  christos branches: 1.49.2; 1.49.4;
Don't increment the mount reference count here. Otherwise we are left with
refcount of one when we unmount, and vfs_destroy does not... Who is expected
to decrement this anyway?!?!
 1.48 26-Apr-2012  christos re-arrange things so that vcoda does not depend on coda.
 1.47 11-Jan-2009  christos branches: 1.47.14; 1.47.18;
merge christos-time_t
 1.46 30-Dec-2008  pooka #ifdef _LKM -> #ifndef _KERNEL_OPT
 1.45 06-May-2008  ad branches: 1.45.2; 1.45.8; 1.45.12;
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.
 1.44 29-Apr-2008  ad 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.
 1.43 24-Apr-2008  ad branches: 1.43.2;
Merge proc::p_mutex and proc::p_smutex into a single adaptive mutex, since
we no longer need to guard against access from hardware interrupt handlers.

Additionally, if cloning a process with CLONE_SIGHAND, arrange to have the
child process share the parent's lock so that signal state may be kept in
sync. Partially addresses PR kern/37437.
 1.42 21-Mar-2008  plunky branches: 1.42.2;
when queueing a message back to Venus, prioritise signals by inserting
them at the head of the queue.

The original code had a comment saying to do this but the INSQUE did
not have any way to do that so it didn't actually
 1.41 21-Mar-2008  plunky convert more insque/remque style queuing to use a queue(3) TAILQ,
this necessitates using a flag to indicate vc_open instead of abusing
the queue pointer but apart from that there is no functional
difference.
 1.40 01-Mar-2008  plunky remove some unnecessary casting
 1.39 01-Mar-2008  rmind Welcome to 4.99.55:

- Add a lot of missing selinit() and seldestroy() calls.

- Merge selwakeup() and selnotify() calls into a single selnotify().

- Add an additional 'events' argument to selnotify() call. It will
indicate which event (POLL_IN, POLL_OUT, etc) happen. If unknown,
zero may be used.

Note: please pass appropriate value of 'events' where possible.
Proposed on: <tech-kern>
 1.38 30-Jan-2008  ad branches: 1.38.2; 1.38.6;
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.
 1.37 05-Dec-2007  pooka Do not "return 1" from kqfilter for errors. That value is passed
directly to the userland caller and results in a mysterious EPERM.
Instead, return EINVAL or something else sensible depending on the
case.
 1.36 04-Mar-2007  christos branches: 1.36.14; 1.36.16; 1.36.22; 1.36.24;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.35 09-Feb-2007  ad branches: 1.35.2;
Merge newlock2 to head.
 1.34 16-Nov-2006  christos __unused removal on arguments; approved by core.
 1.33 12-Oct-2006  christos - sprinkle __unused on function decls.
- fix a couple of unused bugs
- no more -Wno-unused for i386
 1.32 29-Aug-2006  christos branches: 1.32.2; 1.32.4;
Fix incomplete initializer
 1.31 11-Dec-2005  christos branches: 1.31.4; 1.31.8;
merge ktrace-lwp.
 1.30 30-Aug-2005  xtraeme oops, fix previous.
 1.29 30-Aug-2005  xtraeme * Remove __P()
* Use ANSI function declarations
 1.28 29-May-2005  christos branches: 1.28.2;
- sprinkle const
- avoid shadowed variables.
 1.27 26-Feb-2005  perry nuke trailing whitespace
 1.26 29-Jun-2003  fvdl branches: 1.26.2; 1.26.10; 1.26.12;
Back out the lwp/ktrace changes. They contained a lot of colateral damage,
and need to be examined and discussed more.
 1.25 28-Jun-2003  darrenr 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
 1.24 24-Jan-2003  jdolecek fix typo in comment, and add (perhaps redundant) note that this depends
on file-system CODA
 1.23 06-Jan-2003  wiz interrupt with two rs.
 1.22 26-Nov-2002  christos s/si_/sel_/g
 1.21 23-Oct-2002  jdolecek merge kqueue branch into -current

kqueue provides a stateful and efficient event notification framework
currently supported events include socket, file, directory, fifo,
pipe, tty and device changes, and monitoring of processes and signals

kqueue is supported by all writable filesystems in NetBSD tree
(with exception of Coda) and all device drivers supporting poll(2)

based on work done by Jonathan Lemon for FreeBSD
initial NetBSD port done by Luke Mewburn and Jason Thorpe
 1.20 06-Sep-2002  gehenna Merge the gehenna-devsw branch into the trunk.

This merge changes the device switch tables from static array to
dynamically generated by config(8).

- All device switches is defined as a constant structure in device drivers.

- The new grammer ``device-major'' is introduced to ``files''.

device-major <prefix> char <num> [block <num>] [<rules>]

- All device major numbers must be listed up in port dependent majors.<arch>
by using this grammer.

- Added the new naming convention.
The name of the device switch must be <prefix>_[bc]devsw for auto-generation
of device switch tables.

- The backward compatibility of loading block/character device
switch by LKM framework is broken. This is necessary to convert
from block/character device major to device name in runtime and vice versa.

- The restriction to assign device major by LKM is completely removed.
We don't need to reserve LKM entries for dynamic loading of device switch.

- In compile time, device major numbers list is packed into the kernel and
the LKM framework will refer it to assign device major number dynamically.
 1.19 23-Nov-2001  perry branches: 1.19.4; 1.19.8;
__FUNCTION__ -> __func__
 1.18 12-Nov-2001  lukem add RCSIDs
 1.17 18-Jul-2001  thorpej branches: 1.17.2;
bzero -> memset
 1.16 16-Apr-2001  thorpej branches: 1.16.2;
When unmounting a file system, acquire the syncer_lock before
vfs_busy'ing just before the dounmount() call. This is to avoid
sleeping with the mountlist_slock held -- but we must acquire
syncer_lock before vfs_busy because the syncer itself uses
syncer_lock -> vfs_busy locking order.
 1.15 27-Dec-2000  jdolecek branches: 1.15.2;
update commented out code to recent changes of signal structures
 1.14 22-Dec-2000  jdolecek split off thread specific stuff from struct sigacts to struct sigctx, leaving
only signal handler array sharable between threads
move other random signal stuff from struct proc to struct sigctx

This addresses kern/10981 by Matthew Orgass.
 1.13 30-Mar-2000  augustss Kill register declarations.
 1.12 17-Oct-1999  cgd branches: 1.12.2;
nuke RCS "Log" tags. They cause problems for third parties importing
our sources, and for NetBSD release engineering folks. (They've
been against the NetBSD coding style forever, but they crept in anyway.)
 1.11 18-Sep-1999  matt branches: 1.11.2;
Make this compile on alpha again.
 1.10 29-Apr-1999  rvb Typo/braino?
 1.9 11-Nov-1998  rvb branches: 1.9.4;
Lookup now passes up an extra flag. But old veni will
be ok; new veni will check /dev/cfs0 to make sure that a new
kernel is running.
Also, a bug in vc_nb_close iff CODA_SIGNAL's were seen has been
fixed.
 1.8 09-Nov-1998  rvb Change the way unmounting happens to guarantee that the
client programs are allowed to finish up (coda_call is
forced to complete) and release their locks. Thus there
is a reasonable chance that the vflush implicit in the
unmount will not get hung on held locks.
 1.7 28-Sep-1998  rvb I want to distinguish from DEBUG printouts and CODA_VERBOSE printouts.
The latter are normal informational messages that are sometimes
interesting to view.
 1.6 26-Sep-1998  tv DIAGNOSTIC -> DEBUG for all non-panic messages. DIAGNOSTIC is only for
sanity checks and should not turn on any messages not already printed
without it.
 1.5 25-Sep-1998  rvb Conditionalize "stray" printouts under DIAGNOSTIC and DEBUG.
Make files compile if DEBUG is on (from Alan Barrett). Finally,
make coda an lkm.
 1.4 15-Sep-1998  rvb Final piece of rename cfs->coda
 1.3 12-Sep-1998  rvb Change cfs/CFS in symbols, strings and constants to coda/CODA
to avoid fs conflicts.
 1.2 08-Sep-1998  rvb Pass2 complete
 1.1 29-Aug-1998  rvb branches: 1.1.1;
Initial revision
 1.1.1.1 29-Aug-1998  rvb Very Preliminary Coda
 1.9.4.1 29-Apr-1999  rvb branches: 1.9.4.1.2;
pullup 1.9->1.10 (rvb)
 1.9.4.1.2.1 21-Jun-1999  thorpej Sync w/ -current.
 1.11.2.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.12.2.3 21-Apr-2001  bouyer Sync with HEAD
 1.12.2.2 05-Jan-2001  bouyer Sync with HEAD
 1.12.2.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
 1.15.2.10 07-Jan-2003  thorpej Sync with HEAD.
 1.15.2.9 11-Dec-2002  thorpej Sync with HEAD.
 1.15.2.8 11-Nov-2002  nathanw Catch up to -current
 1.15.2.7 17-Sep-2002  nathanw Catch up to -current.
 1.15.2.6 24-Jun-2002  nathanw Curproc->curlwp renaming.

Change uses of "curproc->l_proc" back to "curproc", which is more like the
original use. Bare uses of "curproc" are now "curlwp".

"curproc" is now #defined in proc.h as ((curlwp) ? (curlwp)->l_proc) : NULL)
so that it is always safe to reference curproc (*de*referencing curproc
is another story, but that's always been true).
 1.15.2.5 08-Jan-2002  nathanw Catch up to -current.
 1.15.2.4 14-Nov-2001  nathanw Catch up to -current.
 1.15.2.3 24-Aug-2001  nathanw Catch up with -current.
 1.15.2.2 21-Jun-2001  nathanw Catch up to -current.
 1.15.2.1 05-Mar-2001  nathanw Initial commit of scheduler activations and lightweight process support.
 1.16.2.5 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.16.2.4 02-Oct-2002  jdolecek fix mistake in filt_*() - mistakely used kn_data rather than kn_hook
drop (void *) casts for kn_hook which are not needed anymore
 1.16.2.3 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.16.2.2 08-Sep-2001  thorpej Add kqueue support.
 1.16.2.1 03-Aug-2001  lukem update to -current
 1.17.2.3 01-Oct-2001  fvdl Catch up with -current.
 1.17.2.2 26-Sep-2001  fvdl * add a VCLONED vnode flag that indicates a vnode representing a cloned
device.
* rename REVOKEALL to REVOKEALIAS, and add a REVOKECLONE flag, to pass
to VOP_REVOKE
* the revoke system call will revoke all aliases, as before, but not the
clones
* vdevgone is called when detaching a device, so make it use REVOKECLONE
to get rid of all clones as well
* clean up all uses of VOP_OPEN wrt. locking.
* add a few VOPS to spec_vnops that need to do something when it's a
clone vnode (access and getattr)
* add a copy of the vnode vattr structure of the original 'master' vnode
to the specinfo of a cloned vnode. could possibly redirect getattr to
the 'master' vnode, but this has issues with revoke
* add a vdev_reassignvp function that disassociates a vnode from its
original device, and reassociates it with the specified dev_t. to be
used by cloning devices only, in case a new minor is allocated.
* change all direct references in drivers to v_devcookie and v_rdev
to vdev_privdata(vp) and vdev_rdev(vp). for diagnostic purposes
when debugging race conditions that still exist wrt. locking and
revoking vnodes.
* make the locking state of a vnode consistent when passed to
d_open and d_close (unlocked). locked would be better, but has
some deadlock issues
 1.17.2.1 07-Sep-2001  thorpej Commit my "devvp" changes to the thorpej-devvp branch. This
replaces the use of dev_t in most places with a struct vnode *.

This will form the basic infrastructure for real cloning device
support (besides being architecurally cleaner -- it'll be good
to get away from using numbers to represent objects).
 1.19.8.1 16-May-2002  gehenna Add the character device switch.
 1.19.4.1 11-Mar-2002  thorpej Make syncer_lock an adaptive mutex and rename it to syncer_mutex.
 1.26.12.1 19-Mar-2005  yamt sync with head. xen and whitespace. xen part is not finished.
 1.26.10.1 29-Apr-2005  kent sync with -current
 1.26.2.5 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.26.2.4 04-Mar-2005  skrll Sync with HEAD.

Hi Perry!
 1.26.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.26.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.26.2.1 02-Jul-2003  darrenr Apply the aborted ktrace-lwp changes to a specific branch. This is just for
others to review, I'm concerned that patch fuziness may have resulted in some
errant code being generated but I'll look at that later by comparing the diff
from the base to the branch with the file I attempt to apply to it. This will,
at the very least, put the changes in a better context for others to review
them and attempt to tinker with removing passing of 'struct lwp' through
the kernel.
 1.28.2.8 24-Mar-2008  yamt sync with head.
 1.28.2.7 17-Mar-2008  yamt sync with head.
 1.28.2.6 04-Feb-2008  yamt sync with head.
 1.28.2.5 07-Dec-2007  yamt sync with head
 1.28.2.4 03-Sep-2007  yamt sync with head.
 1.28.2.3 26-Feb-2007  yamt sync with head.
 1.28.2.2 30-Dec-2006  yamt sync with head.
 1.28.2.1 21-Jun-2006  yamt sync with head.
 1.31.8.1 03-Sep-2006  yamt sync with head.
 1.31.4.1 09-Sep-2006  rpaulo sync with head
 1.32.4.2 10-Dec-2006  yamt sync with head.
 1.32.4.1 22-Oct-2006  yamt sync with head
 1.32.2.5 30-Jan-2007  ad Remove support for SA. Ok core@.
 1.32.2.4 29-Dec-2006  ad Checkpoint work in progress.
 1.32.2.3 18-Nov-2006  ad Sync with head.
 1.32.2.2 17-Nov-2006  ad Checkpoint work in progress.
 1.32.2.1 20-Oct-2006  ad syncer_lock -> syncer_mutex
 1.35.2.1 12-Mar-2007  rmind Sync with HEAD.
 1.36.24.1 08-Dec-2007  ad Sync with head.
 1.36.22.2 18-Feb-2008  mjf Sync with HEAD.
 1.36.22.1 08-Dec-2007  mjf Sync with HEAD.
 1.36.16.2 23-Mar-2008  matt sync with HEAD
 1.36.16.1 09-Jan-2008  matt sync with HEAD
 1.36.14.1 09-Dec-2007  jmcneill Sync with HEAD.
 1.38.6.3 17-Jan-2009  mjf Sync with HEAD.
 1.38.6.2 02-Jun-2008  mjf Sync with HEAD.
 1.38.6.1 03-Apr-2008  mjf Sync with HEAD.
 1.38.2.1 24-Mar-2008  keiichi sync with head.
 1.42.2.1 18-May-2008  yamt sync with head.
 1.43.2.2 04-May-2009  yamt sync with head.
 1.43.2.1 16-May-2008  yamt sync with head.
 1.45.12.3 30-Dec-2008  christos sync with head.
 1.45.12.2 09-Nov-2008  christos account for major and minor being unsigned long long
 1.45.12.1 06-May-2008  christos file coda_psdev.c was added on branch christos-time_t on 2008-11-09 01:58:50 +0000
 1.45.8.1 19-Jan-2009  skrll Sync with HEAD.
 1.45.2.2 14-May-2008  wrstuden Per discussion with ad at n dot o, revert signal mask handling
changes.

The l_sigstk changes are most likely totally un-needed as SA will
never use a signal stack - we send an upcall (or will as other
diffs are brought in).

The l_sigmask changes were too controvertial. In all honesty, I
think it's probably best to revert them. The main reason they were
there is the fact that in an SA process, we don't mask signals per
kernel thread, we mask them per user thread. In the kernel, we want
them all to get turned into upcalls. Thus the normal state of
l_sigmask in an SA process is for it to always be empty.

While we are in the process of delivering a signal, we want to
temporarily mask a signal (so we don't recursively exhaust our
upcall stacks). However signal delivery is rare (important, but
rare), and delivering back-to-back signals is even rarer. So rather
than cause every user of a signal mask to be prepared for this very
rare case, we will just add a second check later in the signal
delivery code. Said change is not in this diff.

This also un-compensates all of our compatability code for dealing
with SA. SA is a NetBSD-specific thing, so there's no need for
Irix, Linux, Solaris, SVR4 and so on to cope with it.

As previously, everything other than kern_sa.c compiles in i386
GENERIC as of this checkin. I will switch to ALL soon for compile
testing.
 1.45.2.1 10-May-2008  wrstuden Initial checkin of re-adding SA. Everything except kern_sa.c
compiles in GENERIC for i386. This is still a work-in-progress, but
this checkin covers most of the mechanical work (changing signalling
to be able to accomidate SA's process-wide signalling and re-adding
includes of sys/sa.h and savar.h). Subsequent changes will be much
more interesting.

Also, kern_sa.c has received partial cleanup. There's still more
to do, though.
 1.47.18.1 29-Apr-2012  mrg sync to latest -current.
 1.47.14.3 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.47.14.2 30-Oct-2012  yamt sync with head
 1.47.14.1 23-May-2012  yamt sync with head.
 1.49.4.1 18-May-2014  rmind sync with head
 1.49.2.2 03-Dec-2017  jdolecek update from HEAD
 1.49.2.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.52.2.1 10-Aug-2014  tls Rebase.
 1.53.4.4 09-Jul-2016  skrll Sync with HEAD
 1.53.4.3 22-Sep-2015  skrll Sync with HEAD
 1.53.4.2 06-Jun-2015  skrll Sync with HEAD
 1.53.4.1 06-Apr-2015  skrll Sync with HEAD
 1.57.8.2 29-Apr-2017  pgoyette Revise previous. Rather than explicitly including <sys/localcount.h>
in all the places where {b,c}devsw is initialized, just include it
from <sys/conf.h>. This avoids an include-sequence dependancy.
 1.57.8.1 29-Apr-2017  pgoyette Add DEVSW_MODULE_INIT to existing device-driver modules, so that they
willl have a localcount defined and thus be permitted to load. Without
a localcount, loading the module will return EINVAL.

XXX the dtrace and drm stuff might need to be fed back upstream?
 1.58.16.1 03-Jan-2021  thorpej Sync w/ HEAD.
 1.2 06-Sep-2002  gehenna Merge the gehenna-devsw branch into the trunk.

This merge changes the device switch tables from static array to
dynamically generated by config(8).

- All device switches is defined as a constant structure in device drivers.

- The new grammer ``device-major'' is introduced to ``files''.

device-major <prefix> char <num> [block <num>] [<rules>]

- All device major numbers must be listed up in port dependent majors.<arch>
by using this grammer.

- Added the new naming convention.
The name of the device switch must be <prefix>_[bc]devsw for auto-generation
of device switch tables.

- The backward compatibility of loading block/character device
switch by LKM framework is broken. This is necessary to convert
from block/character device major to device name in runtime and vice versa.

- The restriction to assign device major by LKM is completely removed.
We don't need to reserve LKM entries for dynamic loading of device switch.

- In compile time, device major numbers list is packed into the kernel and
the LKM framework will refer it to assign device major number dynamically.
 1.1 25-Sep-1998  rvb branches: 1.1.24; 1.1.26; 1.1.28; 1.1.38;
Conditionalize "stray" printouts under DIAGNOSTIC and DEBUG.
Make files compile if DEBUG is on (from Alan Barrett). Finally,
make coda an lkm.
 1.1.38.1 16-May-2002  gehenna Remove unused file.
 1.1.28.1 07-Sep-2001  thorpej Commit my "devvp" changes to the thorpej-devvp branch. This
replaces the use of dev_t in most places with a struct vnode *.

This will form the basic infrastructure for real cloning device
support (besides being architecurally cleaner -- it'll be good
to get away from using numbers to represent objects).
 1.1.26.2 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.1.26.1 08-Sep-2001  thorpej Add kqueue support.
 1.1.24.1 17-Sep-2002  nathanw Catch up to -current.
 1.33 17-May-2024  thorpej Remove unnecessary include of <sys/malloc.h>.
 1.32 13-Apr-2020  ad Replace most uses of vp->v_usecount with a call to vrefcnt(vp), a function
that hides the details and does atomic_load_relaxed(). Signature matches
FreeBSD.
 1.31 06-Jan-2015  hannken branches: 1.31.18; 1.31.28;
Add missing vrele() and vfs_vnode_iterator_destroy() to coda_cacheprint().
 1.30 13-Dec-2014  hannken Change coda from hashlist to vcache.
- Replace all hash list crawlers with vfs_vnode_iterator.
 1.29 13-Dec-2014  hannken Move the definition of NVCODA and CODA_COMPAT_5 to coda.h,
remove them from coda_vfsops.c and coda_psdev.c.
 1.28 13-Dec-2014  hannken Attach the control object vnode to the coda mount and release it
on unmount. Initialize special files with NODEV.
 1.27 02-Aug-2012  christos branches: 1.27.2; 1.27.16;
- move debugging functions to vcoda so modules with -DDEBUG link
- fix writing to coda files. this is probably not the right way to do
this, but it satisfies the locking protocol:
1. Sometimes coda_open() is called with an unlocked vnode which
does not satisfy the locking protocol. Lock it for now. We
need to find out why this happens
2. VFS_VGET sometimes returns the container vnode unlocked. What
is the locking protocol for VFS_VGET? We also lock it here.
 1.26 26-Apr-2012  christos re-arrange things so that vcoda does not depend on coda.
 1.25 31-Aug-2011  plunky branches: 1.25.2; 1.25.6;
NULL does not need a cast
 1.24 10-Oct-2007  ad 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.
 1.23 04-Mar-2007  christos branches: 1.23.2; 1.23.14; 1.23.16; 1.23.18;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.22 16-Nov-2006  christos branches: 1.22.4;
__unused removal on arguments; approved by core.
 1.21 20-Oct-2006  reinoud Replace the LIST structure mp->mnt_vnodelist to a TAILQ structure since all
vnodes were synced and processed backwards. This meant that the last
accessed node was processed first and the earlierst last.

An extra benefit is the removal of the ugly hack from the Berkly days on
LFS.

In the proces, i've also replaced the various variations hand written loops
by the TAILQ_FOREACH() macro's.
 1.20 12-Oct-2006  christos - sprinkle __unused on function decls.
- fix a couple of unused bugs
- no more -Wno-unused for i386
 1.19 11-Dec-2005  christos branches: 1.19.20; 1.19.22;
merge ktrace-lwp.
 1.18 30-Aug-2005  xtraeme * Remove __P()
* Use ANSI function declarations
 1.17 26-Feb-2005  perry branches: 1.17.4;
nuke trailing whitespace
 1.16 28-Aug-2003  mrg branches: 1.16.8; 1.16.10;
don't include opt_coda_compat.h unless _KERNEL_OPT. also, only include it
once...
 1.15 27-Aug-2003  drochner update for the protocol used by coda>=6,
patches supplied by the coda-6.0.2 distribution,
with small changes to support the old protocol optionally
(options CODA_COMPAT_5)
 1.14 26-Dec-2002  jdolecek branches: 1.14.2;
do not need <vcoda.h>/NVCODA here
 1.13 12-Nov-2001  lukem add RCSIDs
 1.12 18-Jul-2001  thorpej bzero -> memset
 1.11 30-Apr-2001  lukem branches: 1.11.2;
delint newline in string
 1.10 27-Nov-2000  chs branches: 1.10.2;
Initial integration of the Unified Buffer Cache project.
 1.9 30-Mar-2000  augustss Kill register declarations.
 1.8 17-Oct-1999  cgd branches: 1.8.2;
nuke RCS "Log" tags. They cause problems for third parties importing
our sources, and for NetBSD release engineering folks. (They've
been against the NetBSD coding style forever, but they crept in anyway.)
 1.7 01-Oct-1999  soren branches: 1.7.2;
Account for widened v_usecount in struct vnode.
 1.6 28-Oct-1998  rvb branches: 1.6.6;
Venus must be passed O_CREAT flag on VOP_OPEN iff this is
a creat so that we can will allow a mode 444 file to be
written into. Sync with the latest coda.h and deal with
collateral damage.
 1.5 25-Sep-1998  rvb Conditionalize "stray" printouts under DIAGNOSTIC and DEBUG.
Make files compile if DEBUG is on (from Alan Barrett). Finally,
make coda an lkm.
 1.4 15-Sep-1998  rvb Final piece of rename cfs->coda
 1.3 12-Sep-1998  rvb Change cfs/CFS in symbols, strings and constants to coda/CODA
to avoid fs conflicts.
 1.2 08-Sep-1998  rvb Pass2 complete
 1.1 29-Aug-1998  rvb branches: 1.1.1;
Initial revision
 1.1.1.1 29-Aug-1998  rvb Very Preliminary Coda
 1.6.6.1 10-Oct-1999  cgd pull up rev 1.7 from trunk (requested by mycroft):
Fix potential overflow of v_usecount and v_writecount (and panics
resulting from this) by widening them to `long'. Mostly affects
systems where maxvnodes>=32768.
 1.7.2.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.8.2.2 08-Dec-2000  bouyer Sync with HEAD.
 1.8.2.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
 1.10.2.4 29-Dec-2002  thorpej Sync with HEAD.
 1.10.2.3 14-Nov-2001  nathanw Catch up to -current.
 1.10.2.2 24-Aug-2001  nathanw Catch up with -current.
 1.10.2.1 21-Jun-2001  nathanw Catch up to -current.
 1.11.2.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.11.2.1 03-Aug-2001  lukem update to -current
 1.14.2.5 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.14.2.4 04-Mar-2005  skrll Sync with HEAD.

Hi Perry!
 1.14.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.14.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.14.2.1 03-Aug-2004  skrll Sync with HEAD
 1.16.10.1 19-Mar-2005  yamt sync with head. xen and whitespace. xen part is not finished.
 1.16.8.1 29-Apr-2005  kent sync with -current
 1.17.4.4 27-Oct-2007  yamt sync with head.
 1.17.4.3 03-Sep-2007  yamt sync with head.
 1.17.4.2 30-Dec-2006  yamt sync with head.
 1.17.4.1 21-Jun-2006  yamt sync with head.
 1.19.22.2 10-Dec-2006  yamt sync with head.
 1.19.22.1 22-Oct-2006  yamt sync with head
 1.19.20.1 18-Nov-2006  ad Sync with head.
 1.22.4.1 12-Mar-2007  rmind Sync with HEAD.
 1.23.18.1 14-Oct-2007  yamt sync with head.
 1.23.16.1 06-Nov-2007  matt sync with HEAD
 1.23.14.1 26-Oct-2007  joerg Sync with HEAD.

Follow the merge of pmap.c on i386 and amd64 and move
pmap_init_tmp_pgtbl into arch/x86/x86/pmap.c. Modify the ACPI wakeup
code to restore CR4 before jumping back into kernel space as the large
page option might cover that.
 1.23.2.1 17-Jun-2007  ad - Increase the number of thread priorities from 128 to 256. How the space
is set up is to be revisited.
- Implement soft interrupts as kernel threads. A generic implementation
is provided, with hooks for fast-path MD code that can run the interrupt
threads over the top of other threads executing in the kernel.
- Split vnode::v_flag into three fields, depending on how the flag is
locked (by the interlock, by the vnode lock, by the file system).
- Miscellaneous locking fixes and improvements.
 1.25.6.1 29-Apr-2012  mrg sync to latest -current.
 1.25.2.2 30-Oct-2012  yamt sync with head
 1.25.2.1 23-May-2012  yamt sync with head.
 1.27.16.1 06-Apr-2015  skrll Sync with HEAD
 1.27.2.1 03-Dec-2017  jdolecek update from HEAD
 1.31.28.1 20-Apr-2020  bouyer Sync with HEAD
 1.31.18.1 21-Apr-2020  martin Sync with HEAD
 1.9 02-Aug-2012  christos - move debugging functions to vcoda so modules with -DDEBUG link
- fix writing to coda files. this is probably not the right way to do
this, but it satisfies the locking protocol:
1. Sometimes coda_open() is called with an unlocked vnode which
does not satisfy the locking protocol. Lock it for now. We
need to find out why this happens
2. VFS_VGET sometimes returns the container vnode unlocked. What
is the locking protocol for VFS_VGET? We also lock it here.
 1.8 11-Dec-2005  christos branches: 1.8.110;
merge ktrace-lwp.
 1.7 26-Feb-2005  perry nuke trailing whitespace
 1.6 27-Aug-2003  drochner branches: 1.6.8; 1.6.10;
update for the protocol used by coda>=6,
patches supplied by the coda-6.0.2 distribution,
with small changes to support the old protocol optionally
(options CODA_COMPAT_5)
 1.5 25-Sep-1998  rvb branches: 1.5.46;
Conditionalize "stray" printouts under DIAGNOSTIC and DEBUG.
Make files compile if DEBUG is on (from Alan Barrett). Finally,
make coda an lkm.
 1.4 15-Sep-1998  rvb Final piece of rename cfs->coda
 1.3 12-Sep-1998  rvb Change cfs/CFS in symbols, strings and constants to coda/CODA
to avoid fs conflicts.
 1.2 08-Sep-1998  rvb Pass2 complete
 1.1 29-Aug-1998  rvb branches: 1.1.1;
Initial revision
 1.1.1.1 29-Aug-1998  rvb Very Preliminary Coda
 1.5.46.4 04-Mar-2005  skrll Sync with HEAD.

Hi Perry!
 1.5.46.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.5.46.2 18-Sep-2004  skrll Sync with HEAD.
 1.5.46.1 03-Aug-2004  skrll Sync with HEAD
 1.6.10.1 19-Mar-2005  yamt sync with head. xen and whitespace. xen part is not finished.
 1.6.8.1 29-Apr-2005  kent sync with -current
 1.8.110.1 30-Oct-2012  yamt sync with head
 1.31 17-May-2024  thorpej Remove unnecessary include of <sys/malloc.h>.
 1.30 17-Oct-2013  christos remove unused code from macro
 1.29 26-Apr-2012  christos branches: 1.29.2; 1.29.4;
re-arrange things so that vcoda does not depend on coda.
 1.28 20-Jul-2010  christos branches: 1.28.8; 1.28.12;
Correct incomplete size checks for the coda ioctls. From Dan Rosenberg.
 1.27 18-Apr-2009  tsutsui branches: 1.27.2; 1.27.4;
Remove extra whitespace added by a stupid tool.
XXX: more in src/sys/arch
 1.26 18-Mar-2009  cegger bcopy -> memcpy
 1.25 04-Mar-2007  christos branches: 1.25.40; 1.25.50; 1.25.52; 1.25.56; 1.25.58; 1.25.60;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.24 14-May-2006  elad branches: 1.24.12; 1.24.14; 1.24.22;
integrate kauth.
 1.23 12-Apr-2006  christos Coverity CID 2319: Plug memory leak.
 1.22 05-Apr-2006  he Unbreak the build of this file on our 64-bit ports
by casting to or via intptr_t.
 1.21 04-Apr-2006  gdt Check symlink count and pointer returned from userspace before
dereferencing it. (I added this during search for the problem fixed by
the earlier readlink buffer allocation fix, and the checks have not
triggered. Still, it's wrong of the kernel to use pointers from user
space without validation.)
 1.20 15-Mar-2006  gdt branches: 1.20.2;
Add comments explaining how the 3 size variables for venus calls are
used.

Remove defect in size allocation for coda_readlink to avoid having
venus write outside malloced space by including pathname space before
allocation.

Add asserts that cred structure is non-NULL and non-FSCRED.

Check lwp against NULL before dereferencing it.

Assert that output pointer is non-NULL on a few venus returns. This "can't
happen" but has been seen in crash dumps.

With these changes, the following work on a 345 MB coda volume.
(Before, a single invocation of tar or pax on this volume would
crash.)

$ for i in $(seq 1 10); do find . -type f -print0 |xargs -0 md5 > MD5.$i & done

Two copies of

$ for i in $(seq 1 10); do pax -w /coda/[redacted] >/dev/null & done


(lwp NULL check semi-reviewed by wrstuden@)
 1.19 11-Dec-2005  christos branches: 1.19.4; 1.19.6; 1.19.8; 1.19.10;
merge ktrace-lwp.
 1.18 26-Feb-2005  perry branches: 1.18.4;
nuke trailing whitespace
 1.17 28-Aug-2003  mrg branches: 1.17.8; 1.17.10;
don't include opt_coda_compat.h unless _KERNEL_OPT. also, only include it
once...
 1.16 27-Aug-2003  drochner update for the protocol used by coda>=6,
patches supplied by the coda-6.0.2 distribution,
with small changes to support the old protocol optionally
(options CODA_COMPAT_5)
 1.15 29-Jun-2003  fvdl branches: 1.15.2;
Back out the lwp/ktrace changes. They contained a lot of colateral damage,
and need to be examined and discussed more.
 1.14 28-Jun-2003  darrenr 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
 1.13 02-Nov-2002  perry /*CONTCOND*/ while (0)'ed macros
 1.12 27-Mar-2002  phil Add the statfs upcall so df now reports cache size and usage.
 1.11 12-Nov-2001  lukem add RCSIDs
 1.10 20-Aug-2001  wiz "wierd" is weird.
 1.9 05-Aug-2001  jdolecek bound check the vi.in_size in venus_ioctl()
 1.8 18-Jul-2001  thorpej bzero -> memset
 1.7 18-Nov-1998  ross branches: 1.7.20; 1.7.22; 1.7.24;
Various trivial LP64 tweaks to squelch some compiler warnings.
 1.6 11-Nov-1998  rvb Lookup now passes up an extra flag. But old veni will
be ok; new veni will check /dev/cfs0 to make sure that a new
kernel is running.
Also, a bug in vc_nb_close iff CODA_SIGNAL's were seen has been
fixed.
 1.5 28-Oct-1998  rvb Venus must be passed O_CREAT flag on VOP_OPEN iff this is
a creat so that we can will allow a mode 444 file to be
written into. Sync with the latest coda.h and deal with
collateral damage.
 1.4 15-Sep-1998  rvb Final piece of rename cfs->coda
 1.3 12-Sep-1998  rvb Change cfs/CFS in symbols, strings and constants to coda/CODA
to avoid fs conflicts.
 1.2 08-Sep-1998  rvb Pass2 complete
 1.1 29-Aug-1998  rvb branches: 1.1.1;
Initial revision
 1.1.1.1 29-Aug-1998  rvb Very Preliminary Coda
 1.7.24.4 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.7.24.3 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.7.24.2 25-Aug-2001  thorpej Merge Aug 24 -current into the kqueue branch.
 1.7.24.1 03-Aug-2001  lukem update to -current
 1.7.22.4 11-Nov-2002  nathanw Catch up to -current
 1.7.22.3 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.7.22.2 14-Nov-2001  nathanw Catch up to -current.
 1.7.22.1 24-Aug-2001  nathanw Catch up with -current.
 1.7.20.1 16-Aug-2001  tv Pullup [jdolecek]:

sys/coda/coda_venus.c 1.9

Bounds check vi.in_size in venus_ioctl().
 1.15.2.6 04-Mar-2005  skrll Sync with HEAD.

Hi Perry!
 1.15.2.5 21-Sep-2004  skrll Fix the sync with head I botched.
 1.15.2.4 18-Sep-2004  skrll Sync with HEAD.
 1.15.2.3 24-Aug-2004  skrll 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.
 1.15.2.2 03-Aug-2004  skrll Sync with HEAD
 1.15.2.1 02-Jul-2003  darrenr Apply the aborted ktrace-lwp changes to a specific branch. This is just for
others to review, I'm concerned that patch fuziness may have resulted in some
errant code being generated but I'll look at that later by comparing the diff
from the base to the branch with the file I attempt to apply to it. This will,
at the very least, put the changes in a better context for others to review
them and attempt to tinker with removing passing of 'struct lwp' through
the kernel.
 1.17.10.1 19-Mar-2005  yamt sync with head. xen and whitespace. xen part is not finished.
 1.17.8.1 29-Apr-2005  kent sync with -current
 1.18.4.2 03-Sep-2007  yamt sync with head.
 1.18.4.1 21-Jun-2006  yamt sync with head.
 1.19.10.3 06-May-2006  christos - Move kauth_cred_t declaration to <sys/types.h>
- Cleanup struct ucred; forward declarations that are unused.
- Don't include <sys/kauth.h> in any header, but include it in the c files
that need it.

Approved by core.
 1.19.10.2 19-Apr-2006  elad sync with head.
 1.19.10.1 08-Mar-2006  elad Adapt to kernel authorization KPI.
 1.19.8.3 24-May-2006  yamt sync with head.
 1.19.8.2 11-Apr-2006  yamt sync with head
 1.19.8.1 01-Apr-2006  yamt sync with head.
 1.19.6.2 01-Jun-2006  kardel Sync with head.
 1.19.6.1 22-Apr-2006  simonb Sync with head.
 1.19.4.1 09-Sep-2006  rpaulo sync with head
 1.20.2.1 24-May-2006  tron Merge 2006-05-24 NetBSD-current into the "peter-altq" branch.
 1.24.22.1 04-Aug-2010  bouyer Pull up following revision(s) (requested by christos in ticket #1400):
sys/coda/coda_venus.c: revision 1.28
sys/coda/coda_vnops.c: revision 1.76
sys/coda/coda.h: revision 1.16
Correct incomplete size checks for the coda ioctls. From Dan Rosenberg.
 1.24.14.1 12-Mar-2007  rmind Sync with HEAD.
 1.24.12.1 04-Aug-2010  bouyer Pull up following revision(s) (requested by christos in ticket #1400):
sys/coda/coda_venus.c: revision 1.28
sys/coda/coda_vnops.c: revision 1.76
sys/coda/coda.h: revision 1.16
Correct incomplete size checks for the coda ioctls. From Dan Rosenberg.
 1.25.60.1 20-May-2011  matt bring matt-nb5-mips64 up to date with netbsd-5-1-RELEASE (except compat).
 1.25.58.1 25-Aug-2010  snj Pull up following revision(s) (requested by christos in ticket #1431):
sys/coda/coda.h: revision 1.16
sys/coda/coda_venus.c: revision 1.28
sys/coda/coda_vnops.c: revision 1.76
Correct incomplete size checks for the coda ioctls. From Dan Rosenberg.
 1.25.56.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.25.52.1 25-Aug-2010  snj Pull up following revision(s) (requested by christos in ticket #1431):
sys/coda/coda.h: revision 1.16
sys/coda/coda_venus.c: revision 1.28
sys/coda/coda_vnops.c: revision 1.76
Correct incomplete size checks for the coda ioctls. From Dan Rosenberg.
 1.25.50.1 28-Apr-2009  skrll Sync with HEAD.
 1.25.40.2 11-Aug-2010  yamt sync with head.
 1.25.40.1 04-May-2009  yamt sync with head.
 1.27.4.1 05-Mar-2011  rmind sync with head
 1.27.2.1 17-Aug-2010  uebayasi Sync with HEAD.
 1.28.12.1 29-Apr-2012  mrg sync to latest -current.
 1.28.8.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.28.8.1 23-May-2012  yamt sync with head.
 1.29.4.1 18-May-2014  rmind sync with head
 1.29.2.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.11 04-Mar-2007  christos Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.10 14-May-2006  elad branches: 1.10.14;
integrate kauth.
 1.9 11-Dec-2005  christos branches: 1.9.4; 1.9.6; 1.9.8; 1.9.10; 1.9.12;
merge ktrace-lwp.
 1.8 26-Feb-2005  perry branches: 1.8.4;
nuke trailing whitespace
 1.7 27-Aug-2003  drochner branches: 1.7.8; 1.7.10;
update for the protocol used by coda>=6,
patches supplied by the coda-6.0.2 distribution,
with small changes to support the old protocol optionally
(options CODA_COMPAT_5)
 1.6 29-Jun-2003  fvdl branches: 1.6.2;
Back out the lwp/ktrace changes. They contained a lot of colateral damage,
and need to be examined and discussed more.
 1.5 28-Jun-2003  darrenr 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
 1.4 27-Mar-2002  phil Add the statfs upcall so df now reports cache size and usage.
 1.3 15-Sep-1998  rvb branches: 1.3.24; 1.3.26;
Final piece of rename cfs->coda
 1.2 08-Sep-1998  rvb Pass2 complete
 1.1 29-Aug-1998  rvb branches: 1.1.1;
Initial revision
 1.1.1.1 29-Aug-1998  rvb Very Preliminary Coda
 1.3.26.1 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.3.24.1 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.6.2.6 04-Mar-2005  skrll Sync with HEAD.

Hi Perry!
 1.6.2.5 21-Sep-2004  skrll Fix the sync with head I botched.
 1.6.2.4 18-Sep-2004  skrll Sync with HEAD.
 1.6.2.3 24-Aug-2004  skrll 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.
 1.6.2.2 03-Aug-2004  skrll Sync with HEAD
 1.6.2.1 02-Jul-2003  darrenr Apply the aborted ktrace-lwp changes to a specific branch. This is just for
others to review, I'm concerned that patch fuziness may have resulted in some
errant code being generated but I'll look at that later by comparing the diff
from the base to the branch with the file I attempt to apply to it. This will,
at the very least, put the changes in a better context for others to review
them and attempt to tinker with removing passing of 'struct lwp' through
the kernel.
 1.7.10.1 19-Mar-2005  yamt sync with head. xen and whitespace. xen part is not finished.
 1.7.8.1 29-Apr-2005  kent sync with -current
 1.8.4.2 03-Sep-2007  yamt sync with head.
 1.8.4.1 21-Jun-2006  yamt sync with head.
 1.9.12.1 24-May-2006  tron Merge 2006-05-24 NetBSD-current into the "peter-altq" branch.
 1.9.10.1 08-Mar-2006  elad Adapt to kernel authorization KPI.
 1.9.8.1 24-May-2006  yamt sync with head.
 1.9.6.1 01-Jun-2006  kardel Sync with head.
 1.9.4.1 09-Sep-2006  rpaulo sync with head
 1.10.14.1 12-Mar-2007  rmind Sync with HEAD.
 1.92 28-May-2025  andvar fix few typos in comments.
 1.91 17-May-2024  thorpej branches: 1.91.2;
Remove unnecessary include of <sys/malloc.h>.
 1.90 28-Mar-2022  riastradh specfs: Let spec_node_lookup_by_dev wait for reclaim to finish.

vdevgone relies on this to ensure that if there is a concurrent
revoke in progress, it will wait for that revoke to finish -- that
way, it can guarantee all I/O operations have completed and the
device is closed.
 1.89 20-Nov-2020  hannken When validating the mount device string make sure its length
is below *data_len and below PATH_MAX.

Reported-by: syzbot+2d3af801141509cc858c@syzkaller.appspotmail.com
 1.88 14-Nov-2020  hannken Respect "lktype" in all paths in coda_root().
 1.87 17-Jan-2020  ad branches: 1.87.6;
VFS_VGET(), VFS_ROOT(), VFS_FHTOVP(): give them a "int lktype" argument, to
allow us to get shared locks (or no lock) on the returned vnode. Matches
FreeBSD.
 1.86 04-Apr-2017  hannken branches: 1.86.4; 1.86.14; 1.86.20;
Use spec_node_lookup_by_dev() and spec_node_getmountedfs() to
retrieve a mount by device.
 1.85 17-Feb-2017  hannken Add generic genfs_suspendctl() and use it for all file systems.
Layered file systems need work.
 1.84 13-Dec-2014  hannken branches: 1.84.2; 1.84.4;
Change coda from hashlist to vcache.
- Replace all hash list crawlers with vfs_vnode_iterator.
 1.83 13-Dec-2014  hannken Move the definition of NVCODA and CODA_COMPAT_5 to coda.h,
remove them from coda_vfsops.c and coda_psdev.c.
 1.82 13-Dec-2014  hannken Attach the control object vnode to the coda mount and release it
on unmount. Initialize special files with NODEV.
 1.81 16-Apr-2014  maxv branches: 1.81.4;
An (un)privileged user can easily make the kernel dereference a NULL
pointer.

The kernel allows 'data' to be NULL; it's the fs's responsibility to
ensure that it isn't NULL (if the fs actually needs data).

ok christos@
 1.80 23-Mar-2014  hannken branches: 1.80.2;
Change all vfsops to use C99 designated initializers.

No functional changes intended.
 1.79 25-Feb-2014  pooka Ensure that the top level sysctl nodes (kern, vfs, net, ...) exist before
the sysctl link sets are processed, and remove redundancy.

Shaves >13kB off of an amd64 GENERIC, not to mention >1k duplicate
lines of code.
 1.78 27-Nov-2013  christos Change the queue.3 *_END(&head) macros to NULL. Since we don't have CIRCLEQ
anymore, all the macros expand to NULL anyway, so this improves readability.
Requested by rmind@
 1.77 23-Nov-2013  christos tuck in code inside the mutex
 1.76 23-Nov-2013  christos replace open-coded scan with macro; fix locking
 1.75 23-Nov-2013  riz Since mountlist is now a TAILQ, convert some missed usages
so things build again.
 1.74 02-Aug-2012  christos branches: 1.74.2; 1.74.4;
- move debugging functions to vcoda so modules with -DDEBUG link
- fix writing to coda files. this is probably not the right way to do
this, but it satisfies the locking protocol:
1. Sometimes coda_open() is called with an unlocked vnode which
does not satisfy the locking protocol. Lock it for now. We
need to find out why this happens
2. VFS_VGET sometimes returns the container vnode unlocked. What
is the locking protocol for VFS_VGET? We also lock it here.
 1.73 04-May-2012  christos depend on "vcoda" since it has symbols we need.
 1.72 26-Apr-2012  christos remove multiple definitions.
 1.71 26-Apr-2012  christos re-arrange things so that vcoda does not depend on coda.
 1.70 27-Sep-2011  christos branches: 1.70.2; 1.70.6; 1.70.8; 1.70.12; 1.70.14;
use CODA_MAXNAMLEN instead of bogus MAXNAMLEN
 1.69 29-Jun-2009  dholland Convert 67 namei call sites to use namei_simple, in these functions:

check_console, veriexecclose, veriexec_delete, veriexec_file_add,
emul_find_root, coff_load_shlib (sh3 version), coff_load_shlib,
compat_20_sys_statfs, compat_20_netbsd32_statfs,
ELFNAME2(netbsd32,probe_noteless), darwin_sys_statfs,
ibcs2_sys_statfs, ibcs2_sys_statvfs, linux_sys_uselib,
osf1_sys_statfs, sunos_sys_statfs, sunos32_sys_statfs,
ultrix_sys_statfs, do_sys_mount, fss_create_files (3 of 4),
adosfs_mount, cd9660_mount, coda_ioctl, coda_mount, ext2fs_mount,
ffs_mount, filecore_mount, hfs_mount, lfs_mount, msdosfs_mount,
ntfs_mount, sysvbfs_mount, udf_mount, union_mount, sys_chflags,
sys_lchflags, sys_chmod, sys_lchmod, sys_chown, sys_lchown,
sys___posix_chown, sys___posix_lchown, sys_link, do_sys_pstatvfs,
sys_quotactl, sys_revoke, sys_truncate, do_sys_utimes, sys_extattrctl,
sys_extattr_set_file, sys_extattr_set_link, sys_extattr_get_file,
sys_extattr_get_link, sys_extattr_delete_file,
sys_extattr_delete_link, sys_extattr_list_file, sys_extattr_list_link,
sys_setxattr, sys_lsetxattr, sys_getxattr, sys_lgetxattr,
sys_listxattr, sys_llistxattr, sys_removexattr, sys_lremovexattr

All have been scrutinized (several times, in fact) and compile-tested,
but not all have been explicitly tested in action.

XXX: While I haven't (intentionally) changed the use or nonuse of
XXX: TRYEMULROOT in any of these places, I'm not convinced all the
XXX: uses are correct; an audit might be desirable.
 1.68 11-Jan-2009  christos branches: 1.68.2;
merge christos-time_t
 1.67 30-Dec-2008  pooka #ifdef _LKM -> #ifndef _KERNEL_OPT
 1.66 10-May-2008  rumble branches: 1.66.6; 1.66.8; 1.66.10; 1.66.18; 1.66.22;
Convert file systems to dynamically attach with the new module interface.
Make VFS hooks dynamic while we're here and say farewell to VFS_ATTACH and
VFS_HOOKS_ATTACH linksets.

As a consequence, most of the file systems can now be loaded as new style
modules.

Quick sanity check by ad@.
 1.65 29-Apr-2008  ad branches: 1.65.2;
PR kern/38057 ffs makes assuptions about devvp file system
PR kern/33406 softdeps get stuck in endless loop

Introduce VFS_FSYNC() and call it when syncing a block device, if it
has a mounted file system.
 1.64 28-Jan-2008  dholland branches: 1.64.6; 1.64.8; 1.64.10;
Fix some race conditions in rename.
Introduce a per-FS rename lock and new vfsops to manipulate it.
Get this lock while renaming. Also add another relookup() in do_sys_rename,
which is a hack to kludge around some of the worst deficiencies of
ufs_rename.
reviewed-by: pooka (and an earlier rev by ad)
posted on tech-kern with no objections.
 1.63 15-Jan-2008  ad Use vp->v_rdev, don't look at the union.
 1.62 08-Dec-2007  pooka branches: 1.62.4;
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.
 1.61 01-Dec-2007  dsl branches: 1.61.2;
Ensure the mount data is a 0-terminated string - otherwise namei() might
process garbage (or unmapped addresses).
 1.60 26-Nov-2007  pooka 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
 1.59 10-Oct-2007  ad branches: 1.59.4;
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.
 1.58 31-Jul-2007  pooka branches: 1.58.2; 1.58.4; 1.58.6; 1.58.8;
* nuke the nameidata parameter from VFS_MOUNT(). Nobody on tech-kern
knew what it was supposed to be used for and wrstuden gave a go-ahead
* while rototilling, convert file systems which went easily to
use VFS_PROTOS() instead of manually prototyping the methods
 1.57 26-Jul-2007  pooka Use eopnotsupp() instead of vfs_stdsuspendctl() and retire the latter.
 1.56 17-Jul-2007  pooka branches: 1.56.2;
Make set_statvfs_info() take a parameter for the vfs name instead
of always retrieving it from mp->mnt_op->vfs_name

christos ok
 1.55 12-Jul-2007  dsl Update coda for VFS_MOUNT() change
 1.54 19-Jan-2007  hannken branches: 1.54.6;
New file system suspension API to replace vn_start_write and vn_finished_write.
The suspension helpers are now put into file system specific operations.
This means every file system not supporting these helpers cannot be suspended
and therefore snapshots are no longer possible.

Implemented for file systems of type ffs.

The new API is enabled on a kernel option NEWVNGATE. This option is
not enabled by default in any kernel config.

Presented and discussed on tech-kern with much input from
Bill Studenmund <wrstuden@netbsd.org> and YAMAMOTO Takashi <yamt@netbsd.org>.

Welcome to 4.99.9 (new vfs op vfs_suspendctl).
 1.53 09-Dec-2006  chs 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().
 1.52 16-Nov-2006  christos branches: 1.52.2;
__unused removal on arguments; approved by core.
 1.51 12-Oct-2006  christos - sprinkle __unused on function decls.
- fix a couple of unused bugs
- no more -Wno-unused for i386
 1.50 29-Aug-2006  christos branches: 1.50.2; 1.50.4;
fix incomplete initializer
 1.49 21-Jul-2006  ad - Use the LWP cached credentials where sane.
- Minor cosmetic changes.
 1.48 14-May-2006  elad integrate kauth.
 1.47 11-Dec-2005  christos branches: 1.47.4; 1.47.6; 1.47.8; 1.47.10; 1.47.12;
merge ktrace-lwp.
 1.46 23-Sep-2005  jmmv Apply the NFS exports list rototill patch:

- Remove all NFS related stuff from file system specific code.
- Drop the vfs_checkexp hook and generalize it in the new nfs_check_export
function, thus removing redundancy from all file systems.
- Move all NFS export-related stuff from kern/vfs_subr.c to the new
file sys/nfs/nfs_export.c. The former was becoming large and its code
is always compiled, regardless of the build options. Using the latter,
the code is only compiled in when NFSSERVER is enabled. While doing this,
also make some functions in nfs_subs.c conditional to NFSSERVER.
- Add a new command in nfssvc(2), called NFSSVC_SETEXPORTSLIST, that takes a
path and a set of export entries. At the moment it can only clear the
exports list or append entries, one by one, but it is done in a way that
allows setting the whole set of entries atomically in the future (see the
comment in mountd_set_exports_list or in doc/TODO).
- Change mountd(8) to use the nfssvc(2) system call instead of mount(2) so
that it becomes file system agnostic. In fact, all this whole thing was
done to remove a 'XXX' block from this utility!
- Change the mount*, newfs and fsck* userland utilities to not deal with NFS
exports initialization; done internally by the kernel when initializing
the NFS support for each file system.
- Implement an interface for VFS (called VFS hooks) so that several kernel
subsystems can run arbitrary code upon receipt of specific VFS events.
At the moment, this only provides support for unmount and is used to
destroy NFS exports lists from the file systems being unmounted, though it
has room for extension.

Thanks go to yamt@, chs@, thorpej@, wrstuden@ and others for their comments
and advice in the development of this patch.
 1.45 30-Aug-2005  xtraeme * Remove __P()
* Use ANSI function declarations
 1.44 02-Jul-2005  blymn branches: 1.44.2;
Add attach call so coda gets added to list of vfs supported by the kernel.
 1.43 29-May-2005  christos - sprinkle const
- avoid shadowed variables.
 1.42 26-Feb-2005  perry nuke trailing whitespace
 1.41 02-Jan-2005  thorpej branches: 1.41.2; 1.41.4;
Add the system call and VFS infrastructure for file system extended
attributes.

From FreeBSD.
 1.40 15-Oct-2004  skrll Revert previous. set_statvfs_info needs the struct proc * arg.

Problem noted by Tom Ivar Helbekkmo on current-users
 1.39 17-Sep-2004  skrll 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
 1.38 25-May-2004  hannken Add ffs internal snapshots. Written by Marshall Kirk McKusick for FreeBSD.

- Not enabled by default. Needs kernel option FFS_SNAPSHOT.
- Change parameters of ffs_blkfree.
- Let the copy-on-write functions return an error so spec_strategy
may fail if the copy-on-write fails.
- Change genfs_*lock*() to use vp->v_vnlock instead of &vp->v_lock.
- Add flag B_METAONLY to VOP_BALLOC to return indirect block buffer.
- Add a function ffs_checkfreefile needed for snapshot creation.
- Add special handling of snapshot files:
Snapshots may not be opened for writing and the attributes are read-only.
Use the mtime as the time this snapshot was taken.
Deny mtime updates for snapshot files.
- Add function transferlockers to transfer any waiting processes from
one lock to another.
- Add vfsop VFS_SNAPSHOT to take a snapshot and make it accessible through
a vnode.
- Add snapshot support to ls, fsck_ffs and dump.

Welcome to 2.0F.

Approved by: Jason R. Thorpe <thorpej@netbsd.org>
 1.37 25-May-2004  atatat Sysctl descriptions under vfs subtree
 1.36 27-Apr-2004  jrf First pass for some caddr_t removal and changes to get rid of it where we
no longer use and/or need it

- removed casts from unionfs, deadfs and fdesc
(there are more to hunt down still)
- changed vfs_quotactl args argumet from caddr_t to void *
- changed vfs_quotactl structures/callers to reflect the api change

Compiled fine and ran for about a day. Approved/reviewed by
christos@netbsd.org and gimpy@netbsd.org.
 1.35 21-Apr-2004  christos add sys/dirent.h
 1.34 21-Apr-2004  christos Replace the statfs() family of system calls with statvfs().
Retain binary compatibility.
 1.33 24-Mar-2004  atatat branches: 1.33.2;
Tango on sysctl_createv() and flags. The flags have all been renamed,
and sysctl_createv() now uses more arguments.
 1.32 09-Mar-2004  atatat Fix spelling of "orphan" and placement of */
 1.31 04-Dec-2003  atatat Dynamic sysctl.

Gone are the old kern_sysctl(), cpu_sysctl(), hw_sysctl(),
vfs_sysctl(), etc, routines, along with sysctl_int() et al. Now all
nodes are registered with the tree, and nodes can be added (or
removed) easily, and I/O to and from the tree is handled generically.

Since the nodes are registered with the tree, the mapping from name to
number (and back again) can now be discovered, instead of having to be
hard coded. Adding new nodes to the tree is likewise much simpler --
the new infrastructure handles almost all the work for simple types,
and just about anything else can be done with a small helper function.

All existing nodes are where they were before (numerically speaking),
so all existing consumers of sysctl information should notice no
difference.

PS - I'm sorry, but there's a distinct lack of documentation at the
moment. I'm working on sysctl(3/8/9) right now, and I promise to
watch out for buses.
 1.30 30-Oct-2003  simonb Remove some assigned-to but otherwise unused variables.
 1.29 27-Aug-2003  drochner update for the protocol used by coda>=6,
patches supplied by the coda-6.0.2 distribution,
with small changes to support the old protocol optionally
(options CODA_COMPAT_5)
 1.28 25-Aug-2003  drochner fix a deadlock during mount:
The client manager (venus) blocks in sys_mount() before entering its
event loop answering requests from the kernel device (cfs). sys_mount()
calls VFS_STATFS() internally which caused an upcall through cfs,
which was never answered.
Now don't consider the fs fully mounted before the VFS_START() was
called at the vey end of sys_mount(). So VFS_STATFS() will return
an error which is ignored.
 1.27 25-Aug-2003  drochner nuke an over-zealous memset() which broke statfs() et al. completely
 1.26 29-Jun-2003  fvdl branches: 1.26.2;
Back out the lwp/ktrace changes. They contained a lot of colateral damage,
and need to be examined and discussed more.
 1.25 29-Jun-2003  thorpej 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.
 1.24 29-Jun-2003  thorpej Adjust for ktrace/lwp changes.
 1.23 28-Jun-2003  darrenr 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
 1.22 16-Apr-2003  christos PR/1796: John Kohl: statfs misbehaves under chrooted environments.

- Under chroot it displays only the visible filesystems with appropriate paths.
- The statfs f_mntonname gets adjusted to contain the real path from root.
- While was there, fixed a bug in ext2fs, locking problems with vfs_getfsstat(),
and factored out some of the vfsop statfs() code to copy_statfs_info(). This
fixes the problem where some filesystems forgot to set fsid.
- Made coda look more like a normal fs.
 1.21 01-Feb-2003  thorpej 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.
 1.20 26-Dec-2002  jdolecek coda_nc_initialized is not used here, remove local extern defition
 1.19 21-Sep-2002  christos branches: 1.19.2;
MNT_GETARGS support
 1.18 06-Sep-2002  gehenna Merge the gehenna-devsw branch into the trunk.

This merge changes the device switch tables from static array to
dynamically generated by config(8).

- All device switches is defined as a constant structure in device drivers.

- The new grammer ``device-major'' is introduced to ``files''.

device-major <prefix> char <num> [block <num>] [<rules>]

- All device major numbers must be listed up in port dependent majors.<arch>
by using this grammer.

- Added the new naming convention.
The name of the device switch must be <prefix>_[bc]devsw for auto-generation
of device switch tables.

- The backward compatibility of loading block/character device
switch by LKM framework is broken. This is necessary to convert
from block/character device major to device name in runtime and vice versa.

- The restriction to assign device major by LKM is completely removed.
We don't need to reserve LKM entries for dynamic loading of device switch.

- In compile time, device major numbers list is packed into the kernel and
the LKM framework will refer it to assign device major number dynamically.
 1.17 30-Jul-2002  soren Die, qaddr_t, die! - mnt_data in struct mount is already effectively
a void *, so stop pretending otherwise.
 1.16 27-Mar-2002  phil branches: 1.16.2;
Add the statfs upcall so df now reports cache size and usage.
 1.15 23-Nov-2001  perry __FUNCTION__ -> __func__
 1.14 12-Nov-2001  lukem add RCSIDs
 1.13 15-Sep-2001  chs add a new VFS op, vfs_reinit, which is called when desiredvnodes is
adjusted via sysctl. file systems that have hash tables which are
sized based on the value of this variable now resize those hash tables
using the new value. the max number of FFS softdeps is also recalculated.

convert various file systems to use the <sys/queue.h> macros for
their hash tables.
 1.12 18-Jul-2001  thorpej branches: 1.12.2;
bzero -> memset
 1.11 22-Jan-2001  jdolecek branches: 1.11.2; 1.11.4;
make filesystem vnodeop, specop, fifoop and vnodeopv_* arrays const
 1.10 30-Mar-2000  augustss Kill register declarations.
 1.9 16-Mar-2000  jdolecek Add new VFS op routine - vfs_done and call it on filesystem detach
in vfs_detach(). vfs_done may free global filesystem's resources,
typically those allocated in respective filesystem's init function.
Needed so those filesystems which went in via LKM have a chance to
clean after themselves before unloading. This fixes random panics
when LKM for filesystem using pools was loaded and unloaded several
times.

For each leaf filesystem, add appropriate vfs_done routine.
 1.8 17-Oct-1999  cgd branches: 1.8.2;
nuke RCS "Log" tags. They cause problems for third parties importing
our sources, and for NetBSD release engineering folks. (They've
been against the NetBSD coding style forever, but they crept in anyway.)
 1.7 26-Feb-1999  wrstuden branches: 1.7.8;
Modify vfsops to seperate vfs_fhtovp() into two routines. vfs_fhtovp() now
only handles the file handle to vnode conversion, and a new call,
vfs_checkexp(), performs the export verification.
 1.6 10-Dec-1998  rvb Commit a couple of old fixes
 1.5 25-Sep-1998  rvb Conditionalize "stray" printouts under DIAGNOSTIC and DEBUG.
Make files compile if DEBUG is on (from Alan Barrett). Finally,
make coda an lkm.
 1.4 15-Sep-1998  rvb Final piece of rename cfs->coda
 1.3 12-Sep-1998  rvb Change cfs/CFS in symbols, strings and constants to coda/CODA
to avoid fs conflicts.
 1.2 08-Sep-1998  rvb Pass2 complete
 1.1 29-Aug-1998  rvb branches: 1.1.1;
Initial revision
 1.1.1.1 29-Aug-1998  rvb Very Preliminary Coda
 1.7.8.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.8.2.2 11-Feb-2001  bouyer Sync with HEAD.
 1.8.2.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
 1.11.4.5 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.11.4.4 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.11.4.3 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.11.4.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.11.4.1 03-Aug-2001  lukem update to -current
 1.11.2.11 29-Dec-2002  thorpej Sync with HEAD.
 1.11.2.10 18-Oct-2002  nathanw Catch up to -current.
 1.11.2.9 17-Sep-2002  nathanw Catch up to -current.
 1.11.2.8 01-Aug-2002  nathanw Catch up to -current.
 1.11.2.7 24-Jun-2002  nathanw Curproc->curlwp renaming.

Change uses of "curproc->l_proc" back to "curproc", which is more like the
original use. Bare uses of "curproc" are now "curlwp".

"curproc" is now #defined in proc.h as ((curlwp) ? (curlwp)->l_proc) : NULL)
so that it is always safe to reference curproc (*de*referencing curproc
is another story, but that's always been true).
 1.11.2.6 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.11.2.5 08-Jan-2002  nathanw Catch up to -current.
 1.11.2.4 14-Nov-2001  nathanw Catch up to -current.
 1.11.2.3 21-Sep-2001  nathanw Catch up to -current.
 1.11.2.2 24-Aug-2001  nathanw Catch up with -current.
 1.11.2.1 05-Mar-2001  nathanw Initial commit of scheduler activations and lightweight process support.
 1.12.2.2 01-Oct-2001  fvdl Catch up with -current.
 1.12.2.1 07-Sep-2001  thorpej Commit my "devvp" changes to the thorpej-devvp branch. This
replaces the use of dev_t in most places with a struct vnode *.

This will form the basic infrastructure for real cloning device
support (besides being architecurally cleaner -- it'll be good
to get away from using numbers to represent objects).
 1.16.2.2 29-Aug-2002  gehenna catch up with -current.
 1.16.2.1 16-May-2002  gehenna Replace the direct-access to devsw table with calling devsw API.
 1.19.2.1 18-Dec-2002  gmcgarry Merge pcred and ucred, and poolify. TBD: check backward compatibility
and factor-out some higher-level functionality.
 1.26.2.11 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.26.2.10 04-Mar-2005  skrll Sync with HEAD.

Hi Perry!
 1.26.2.9 17-Jan-2005  skrll Sync with HEAD.
 1.26.2.8 24-Oct-2004  skrll Reduce diff to HEAD
 1.26.2.7 19-Oct-2004  skrll Sync with HEAD
 1.26.2.6 21-Sep-2004  skrll Fix the sync with head I botched.
 1.26.2.5 18-Sep-2004  skrll Sync with HEAD.
 1.26.2.4 24-Aug-2004  skrll 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.
 1.26.2.3 03-Aug-2004  skrll Sync with HEAD
 1.26.2.2 19-Aug-2003  skrll LWPify
 1.26.2.1 02-Jul-2003  darrenr Apply the aborted ktrace-lwp changes to a specific branch. This is just for
others to review, I'm concerned that patch fuziness may have resulted in some
errant code being generated but I'll look at that later by comparing the diff
from the base to the branch with the file I attempt to apply to it. This will,
at the very least, put the changes in a better context for others to review
them and attempt to tinker with removing passing of 'struct lwp' through
the kernel.
 1.33.2.1 29-May-2004  tron Pull up revision 1.37 (requested by atatat in ticket #393):
Sysctl descriptions under vfs subtree
 1.41.4.1 19-Mar-2005  yamt sync with head. xen and whitespace. xen part is not finished.
 1.41.2.1 29-Apr-2005  kent sync with -current
 1.44.2.8 04-Feb-2008  yamt sync with head.
 1.44.2.7 21-Jan-2008  yamt sync with head
 1.44.2.6 07-Dec-2007  yamt sync with head
 1.44.2.5 27-Oct-2007  yamt sync with head.
 1.44.2.4 03-Sep-2007  yamt sync with head.
 1.44.2.3 26-Feb-2007  yamt sync with head.
 1.44.2.2 30-Dec-2006  yamt sync with head.
 1.44.2.1 21-Jun-2006  yamt sync with head.
 1.47.12.1 24-May-2006  tron Merge 2006-05-24 NetBSD-current into the "peter-altq" branch.
 1.47.10.2 06-May-2006  christos - Move kauth_cred_t declaration to <sys/types.h>
- Cleanup struct ucred; forward declarations that are unused.
- Don't include <sys/kauth.h> in any header, but include it in the c files
that need it.

Approved by core.
 1.47.10.1 08-Mar-2006  elad Adapt to kernel authorization KPI.
 1.47.8.3 03-Sep-2006  yamt sync with head.
 1.47.8.2 11-Aug-2006  yamt sync with head
 1.47.8.1 24-May-2006  yamt sync with head.
 1.47.6.1 01-Jun-2006  kardel Sync with head.
 1.47.4.1 09-Sep-2006  rpaulo sync with head
 1.50.4.2 10-Dec-2006  yamt sync with head.
 1.50.4.1 22-Oct-2006  yamt sync with head
 1.50.2.3 01-Feb-2007  ad Sync with head.
 1.50.2.2 12-Jan-2007  ad Sync with head.
 1.50.2.1 18-Nov-2006  ad Sync with head.
 1.52.2.1 17-Feb-2007  tron Apply patch (requested by chs in ticket #422):
- Fix various deadlock problems with nullfs and unionfs.
- Speed up path lookups by upto 25%.
 1.54.6.3 20-Aug-2007  ad Sync with HEAD.
 1.54.6.2 15-Jul-2007  ad Sync with head.
 1.54.6.1 17-Jun-2007  ad - Increase the number of thread priorities from 128 to 256. How the space
is set up is to be revisited.
- Implement soft interrupts as kernel threads. A generic implementation
is provided, with hooks for fast-path MD code that can run the interrupt
threads over the top of other threads executing in the kernel.
- Split vnode::v_flag into three fields, depending on how the flag is
locked (by the interlock, by the vnode lock, by the file system).
- Miscellaneous locking fixes and improvements.
 1.56.2.1 15-Aug-2007  skrll Sync with HEAD.
 1.58.8.2 31-Jul-2007  pooka * nuke the nameidata parameter from VFS_MOUNT(). Nobody on tech-kern
knew what it was supposed to be used for and wrstuden gave a go-ahead
* while rototilling, convert file systems which went easily to
use VFS_PROTOS() instead of manually prototyping the methods
 1.58.8.1 31-Jul-2007  pooka file coda_vfsops.c was added on branch matt-mips64 on 2007-07-31 21:14:20 +0000
 1.58.6.1 14-Oct-2007  yamt sync with head.
 1.58.4.3 23-Mar-2008  matt sync with HEAD
 1.58.4.2 09-Jan-2008  matt sync with HEAD
 1.58.4.1 06-Nov-2007  matt sync with HEAD
 1.58.2.4 09-Dec-2007  jmcneill Sync with HEAD.
 1.58.2.3 03-Dec-2007  joerg Sync with HEAD.
 1.58.2.2 27-Nov-2007  joerg Sync with HEAD. amd64 Xen support needs testing.
 1.58.2.1 26-Oct-2007  joerg Sync with HEAD.

Follow the merge of pmap.c on i386 and amd64 and move
pmap_init_tmp_pgtbl into arch/x86/x86/pmap.c. Modify the ACPI wakeup
code to restore CR4 before jumping back into kernel space as the large
page option might cover that.
 1.59.4.3 18-Feb-2008  mjf Sync with HEAD.
 1.59.4.2 27-Dec-2007  mjf Sync with HEAD.
 1.59.4.1 08-Dec-2007  mjf Sync with HEAD.
 1.61.2.1 26-Dec-2007  ad Sync with head.
 1.62.4.1 19-Jan-2008  bouyer Sync with HEAD
 1.64.10.3 18-Jul-2009  yamt sync with head.
 1.64.10.2 04-May-2009  yamt sync with head.
 1.64.10.1 16-May-2008  yamt sync with head.
 1.64.8.1 18-May-2008  yamt sync with head.
 1.64.6.2 17-Jan-2009  mjf Sync with HEAD.
 1.64.6.1 02-Jun-2008  mjf Sync with HEAD.
 1.65.2.1 23-Jun-2008  wrstuden Sync w/ -current. 34 merge conflicts to follow.
 1.66.22.1 28-Apr-2014  sborrill Pull up the following revisions(s) (requested by maxv in ticket #1901):
sys/kern/vfs_syscalls.c: revision 1.478, 1.480 via patch
sys/coda/coda_vfsops.c: revision 1.81
sys/fs/adosfs/advfsops.c: revision 1.70
sys/fs/cd9660/cd9660_vfsops.c: revision 1.84
sys/fs/efs/efs_vfsops.c: revision 1.25
sys/fs/filecorefs/filecore_vfsops.c: revision 1.76
sys/fs/hfs/hfs_vfsops.c: revision 1.31
sys/fs/msdosfs/msdosfs_vfsops.c: revision 1.107
sys/fs/ntfs/ntfs_vfsops.c: revision 1.94
sys/fs/ptyfs/ptyfs_vfsops.c: revision 1.50 via patch
sys/fs/puffs/puffs_vfsops.c: revision 1.110 via patch
sys/fs/smbfs/smbfs_vfsops.c: revision 1.100
sys/fs/sysvbfs/sysvbfs_vfsops.c: revision 1.43
sys/fs/tmpfs/tmpfs_vfsops.c: revision 1.59 via patch
sys/fs/udf/udf_vfsops.c: revision 1.67
sys/fs/union/union_vfsops.c: revision 1.72
sys/fs/unionfs/unionfs_vfsops.c: revision 1.13
sys/kern/vfs_syscalls.c: revision 1.479
sys/miscfs/nullfs/null_vfsops.c: revision 1.88 via patch
sys/miscfs/overlay/overlay_vfsops.c: revision 1.61
sys/miscfs/procfs/procfs_vfsops.c: revision 1.91
sys/miscfs/umapfs/umap_vfsops.c: revision 1.92
sys/nfs/nfs_vfsops.c: revision 1.227
sys/ufs/ext2fs/ext2fs_vfsops.c: revision 1.180
sys/ufs/ffs/ffs_vfsops.c: revision 1.297
sys/ufs/lfs/lfs_vfsops.c: revision 1.321
sys/ufs/mfs/mfs_vfsops.c: revision 1.107

Due to missing checks in the mount syscall, and a wrong assumption on the
file systems side, the kernel could allocate an unbounded or zero-sized
memory buffer, and could dereference a NULL pointer when particular
arguments are given by a user.
 1.66.18.1 28-Apr-2014  sborrill Pull up the following revisions(s) (requested by maxv in ticket #1901):
sys/kern/vfs_syscalls.c: revision 1.478, 1.480 via patch
sys/coda/coda_vfsops.c: revision 1.81
sys/fs/adosfs/advfsops.c: revision 1.70
sys/fs/cd9660/cd9660_vfsops.c: revision 1.84
sys/fs/efs/efs_vfsops.c: revision 1.25
sys/fs/filecorefs/filecore_vfsops.c: revision 1.76
sys/fs/hfs/hfs_vfsops.c: revision 1.31
sys/fs/msdosfs/msdosfs_vfsops.c: revision 1.107
sys/fs/ntfs/ntfs_vfsops.c: revision 1.94
sys/fs/ptyfs/ptyfs_vfsops.c: revision 1.50 via patch
sys/fs/puffs/puffs_vfsops.c: revision 1.110 via patch
sys/fs/smbfs/smbfs_vfsops.c: revision 1.100
sys/fs/sysvbfs/sysvbfs_vfsops.c: revision 1.43
sys/fs/tmpfs/tmpfs_vfsops.c: revision 1.59 via patch
sys/fs/udf/udf_vfsops.c: revision 1.67
sys/fs/union/union_vfsops.c: revision 1.72
sys/fs/unionfs/unionfs_vfsops.c: revision 1.13
sys/kern/vfs_syscalls.c: revision 1.479
sys/miscfs/nullfs/null_vfsops.c: revision 1.88 via patch
sys/miscfs/overlay/overlay_vfsops.c: revision 1.61
sys/miscfs/procfs/procfs_vfsops.c: revision 1.91
sys/miscfs/umapfs/umap_vfsops.c: revision 1.92
sys/nfs/nfs_vfsops.c: revision 1.227
sys/ufs/ext2fs/ext2fs_vfsops.c: revision 1.180
sys/ufs/ffs/ffs_vfsops.c: revision 1.297
sys/ufs/lfs/lfs_vfsops.c: revision 1.321
sys/ufs/mfs/mfs_vfsops.c: revision 1.107

Due to missing checks in the mount syscall, and a wrong assumption on the
file systems side, the kernel could allocate an unbounded or zero-sized
memory buffer, and could dereference a NULL pointer when particular
arguments are given by a user.
 1.66.10.3 30-Dec-2008  christos sync with head.
 1.66.10.2 09-Nov-2008  christos account for major and minor being unsigned long long
 1.66.10.1 10-May-2008  christos file coda_vfsops.c was added on branch christos-time_t on 2008-11-09 01:58:50 +0000
 1.66.8.1 25-Apr-2014  sborrill Pull up the following revisions(s) (requested by maxv in ticket #1901):
sys/kern/vfs_syscalls.c: revision 1.478, 1.480 via patch
sys/coda/coda_vfsops.c: revision 1.81
sys/fs/adosfs/advfsops.c: revision 1.70
sys/fs/cd9660/cd9660_vfsops.c: revision 1.84
sys/fs/efs/efs_vfsops.c: revision 1.25
sys/fs/filecorefs/filecore_vfsops.c: revision 1.76
sys/fs/hfs/hfs_vfsops.c: revision 1.31
sys/fs/msdosfs/msdosfs_vfsops.c: revision 1.107
sys/fs/ntfs/ntfs_vfsops.c: revision 1.94
sys/fs/ptyfs/ptyfs_vfsops.c: revision 1.50 via patch
sys/fs/puffs/puffs_vfsops.c: revision 1.110 via patch
sys/fs/smbfs/smbfs_vfsops.c: revision 1.100
sys/fs/sysvbfs/sysvbfs_vfsops.c: revision 1.43
sys/fs/tmpfs/tmpfs_vfsops.c: revision 1.59 via patch
sys/fs/udf/udf_vfsops.c: revision 1.67
sys/fs/union/union_vfsops.c: revision 1.72
sys/fs/unionfs/unionfs_vfsops.c: revision 1.13
sys/kern/vfs_syscalls.c: revision 1.479
sys/miscfs/nullfs/null_vfsops.c: revision 1.88 via patch
sys/miscfs/overlay/overlay_vfsops.c: revision 1.61
sys/miscfs/procfs/procfs_vfsops.c: revision 1.91
sys/miscfs/umapfs/umap_vfsops.c: revision 1.92
sys/nfs/nfs_vfsops.c: revision 1.227
sys/ufs/ext2fs/ext2fs_vfsops.c: revision 1.180
sys/ufs/ffs/ffs_vfsops.c: revision 1.297
sys/ufs/lfs/lfs_vfsops.c: revision 1.321
sys/ufs/mfs/mfs_vfsops.c: revision 1.107

Due to missing checks in the mount syscall, and a wrong assumption on the
file systems side, the kernel could allocate an unbounded or zero-sized
memory buffer, and could dereference a NULL pointer when particular
arguments are given by a user.
 1.66.6.1 19-Jan-2009  skrll Sync with HEAD.
 1.68.2.1 23-Jul-2009  jym Sync with HEAD.
 1.70.14.1 21-Apr-2014  bouyer Pull up following revision(s) (requested by maxv in ticket #1050):
sys/ufs/chfs/chfs_vfsops.c: revision 1.11
sys/fs/unionfs/unionfs_vfsops.c: revision 1.13
sys/fs/nilfs/nilfs_vfsops.c: revision 1.16
sys/ufs/mfs/mfs_vfsops.c: revision 1.107
sys/fs/sysvbfs/sysvbfs_vfsops.c: revision 1.43
sys/ufs/ffs/ffs_vfsops.c: revision 1.297
sys/kern/vfs_syscalls.c: revision 1.478
sys/kern/vfs_syscalls.c: revision 1.479
sys/fs/puffs/puffs_vfsops.c: revision 1.110
sys/fs/cd9660/cd9660_vfsops.c: revision 1.84
sys/nfs/nfs_vfsops.c: revision 1.227
sys/fs/v7fs/v7fs_vfsops.c: revision 1.10
sys/ufs/ext2fs/ext2fs_vfsops.c: revision 1.180
sys/miscfs/umapfs/umap_vfsops.c: revision 1.92
sys/fs/filecorefs/filecore_vfsops.c: revision 1.76
sys/miscfs/nullfs/null_vfsops.c: revision 1.88
sys/fs/ptyfs/ptyfs_vfsops.c: revision 1.50
sys/coda/coda_vfsops.c: revision 1.81
sys/ufs/lfs/lfs_vfsops.c: revision 1.321
sys/fs/tmpfs/tmpfs_vfsops.c: revision 1.59
sys/fs/hfs/hfs_vfsops.c: revision 1.31
sys/miscfs/overlay/overlay_vfsops.c: revision 1.61
sys/fs/union/union_vfsops.c: revision 1.72
sys/fs/ntfs/ntfs_vfsops.c: revision 1.94
sys/kern/vfs_syscalls.c: revision 1.480
sys/fs/efs/efs_vfsops.c: revision 1.25
sys/kern/vfs_syscalls.c: revision 1.482
sys/fs/msdosfs/msdosfs_vfsops.c: revision 1.107
external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vfsops.c: revision 1.12
sys/miscfs/procfs/procfs_vfsops.c: revision 1.91
sys/fs/smbfs/smbfs_vfsops.c: revision 1.100
sys/fs/adosfs/advfsops.c: revision 1.70
sys/fs/udf/udf_vfsops.c: revision 1.67
Limit check for 'data_len'. Otherwise a (un)privileged user can easily
panic the system by passing a huge size.
ok christos@
An (un)privileged user can easily make the kernel dereference a NULL
pointer.
The kernel allows 'data' to be NULL; it's the fs's responsibility to
ensure that it isn't NULL (if the fs actually needs data).
ok christos@
Some fs's - like kernfs - set their vfs_min_mount_data to zero. Add a check
to prevent an (un)privileged user from requesting a zero-sized allocation
(and thus a panic).
This thing is totally buggy: 'data_len' is modified by the fs, so calling
kmem_free with it while its value has changed since the kmem_alloc is far
from being a good idea.
If the kernel figures out that something mismatches, it will panic
(typically with kernfs).
 1.70.12.1 21-Apr-2014  bouyer Pull up following revision(s) (requested by maxv in ticket #1050):
sys/ufs/chfs/chfs_vfsops.c: revision 1.11
sys/fs/unionfs/unionfs_vfsops.c: revision 1.13
sys/fs/nilfs/nilfs_vfsops.c: revision 1.16
sys/ufs/mfs/mfs_vfsops.c: revision 1.107
sys/fs/sysvbfs/sysvbfs_vfsops.c: revision 1.43
sys/ufs/ffs/ffs_vfsops.c: revision 1.297
sys/kern/vfs_syscalls.c: revision 1.478
sys/kern/vfs_syscalls.c: revision 1.479
sys/fs/puffs/puffs_vfsops.c: revision 1.110
sys/fs/cd9660/cd9660_vfsops.c: revision 1.84
sys/nfs/nfs_vfsops.c: revision 1.227
sys/fs/v7fs/v7fs_vfsops.c: revision 1.10
sys/ufs/ext2fs/ext2fs_vfsops.c: revision 1.180
sys/miscfs/umapfs/umap_vfsops.c: revision 1.92
sys/fs/filecorefs/filecore_vfsops.c: revision 1.76
sys/miscfs/nullfs/null_vfsops.c: revision 1.88
sys/fs/ptyfs/ptyfs_vfsops.c: revision 1.50
sys/coda/coda_vfsops.c: revision 1.81
sys/ufs/lfs/lfs_vfsops.c: revision 1.321
sys/fs/tmpfs/tmpfs_vfsops.c: revision 1.59
sys/fs/hfs/hfs_vfsops.c: revision 1.31
sys/miscfs/overlay/overlay_vfsops.c: revision 1.61
sys/fs/union/union_vfsops.c: revision 1.72
sys/fs/ntfs/ntfs_vfsops.c: revision 1.94
sys/kern/vfs_syscalls.c: revision 1.480
sys/fs/efs/efs_vfsops.c: revision 1.25
sys/kern/vfs_syscalls.c: revision 1.482
sys/fs/msdosfs/msdosfs_vfsops.c: revision 1.107
external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vfsops.c: revision 1.12
sys/miscfs/procfs/procfs_vfsops.c: revision 1.91
sys/fs/smbfs/smbfs_vfsops.c: revision 1.100
sys/fs/adosfs/advfsops.c: revision 1.70
sys/fs/udf/udf_vfsops.c: revision 1.67
Limit check for 'data_len'. Otherwise a (un)privileged user can easily
panic the system by passing a huge size.
ok christos@
An (un)privileged user can easily make the kernel dereference a NULL
pointer.
The kernel allows 'data' to be NULL; it's the fs's responsibility to
ensure that it isn't NULL (if the fs actually needs data).
ok christos@
Some fs's - like kernfs - set their vfs_min_mount_data to zero. Add a check
to prevent an (un)privileged user from requesting a zero-sized allocation
(and thus a panic).
This thing is totally buggy: 'data_len' is modified by the fs, so calling
kmem_free with it while its value has changed since the kmem_alloc is far
from being a good idea.
If the kernel figures out that something mismatches, it will panic
(typically with kernfs).
 1.70.8.1 21-Apr-2014  bouyer Pull up following revision(s) (requested by maxv in ticket #1050):
sys/ufs/chfs/chfs_vfsops.c: revision 1.11
sys/fs/unionfs/unionfs_vfsops.c: revision 1.13
sys/fs/nilfs/nilfs_vfsops.c: revision 1.16
sys/ufs/mfs/mfs_vfsops.c: revision 1.107
sys/fs/sysvbfs/sysvbfs_vfsops.c: revision 1.43
sys/ufs/ffs/ffs_vfsops.c: revision 1.297
sys/kern/vfs_syscalls.c: revision 1.478
sys/kern/vfs_syscalls.c: revision 1.479
sys/fs/puffs/puffs_vfsops.c: revision 1.110
sys/fs/cd9660/cd9660_vfsops.c: revision 1.84
sys/nfs/nfs_vfsops.c: revision 1.227
sys/fs/v7fs/v7fs_vfsops.c: revision 1.10
sys/ufs/ext2fs/ext2fs_vfsops.c: revision 1.180
sys/miscfs/umapfs/umap_vfsops.c: revision 1.92
sys/fs/filecorefs/filecore_vfsops.c: revision 1.76
sys/miscfs/nullfs/null_vfsops.c: revision 1.88
sys/fs/ptyfs/ptyfs_vfsops.c: revision 1.50
sys/coda/coda_vfsops.c: revision 1.81
sys/ufs/lfs/lfs_vfsops.c: revision 1.321
sys/fs/tmpfs/tmpfs_vfsops.c: revision 1.59
sys/fs/hfs/hfs_vfsops.c: revision 1.31
sys/miscfs/overlay/overlay_vfsops.c: revision 1.61
sys/fs/union/union_vfsops.c: revision 1.72
sys/fs/ntfs/ntfs_vfsops.c: revision 1.94
sys/kern/vfs_syscalls.c: revision 1.480
sys/fs/efs/efs_vfsops.c: revision 1.25
sys/kern/vfs_syscalls.c: revision 1.482
sys/fs/msdosfs/msdosfs_vfsops.c: revision 1.107
external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vfsops.c: revision 1.12
sys/miscfs/procfs/procfs_vfsops.c: revision 1.91
sys/fs/smbfs/smbfs_vfsops.c: revision 1.100
sys/fs/adosfs/advfsops.c: revision 1.70
sys/fs/udf/udf_vfsops.c: revision 1.67
Limit check for 'data_len'. Otherwise a (un)privileged user can easily
panic the system by passing a huge size.
ok christos@
An (un)privileged user can easily make the kernel dereference a NULL
pointer.
The kernel allows 'data' to be NULL; it's the fs's responsibility to
ensure that it isn't NULL (if the fs actually needs data).
ok christos@
Some fs's - like kernfs - set their vfs_min_mount_data to zero. Add a check
to prevent an (un)privileged user from requesting a zero-sized allocation
(and thus a panic).
This thing is totally buggy: 'data_len' is modified by the fs, so calling
kmem_free with it while its value has changed since the kmem_alloc is far
from being a good idea.
If the kernel figures out that something mismatches, it will panic
(typically with kernfs).
 1.70.6.2 02-Jun-2012  mrg sync to latest -current.
 1.70.6.1 29-Apr-2012  mrg sync to latest -current.
 1.70.2.3 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.70.2.2 30-Oct-2012  yamt sync with head
 1.70.2.1 23-May-2012  yamt sync with head.
 1.74.4.1 18-May-2014  rmind sync with head
 1.74.2.2 03-Dec-2017  jdolecek update from HEAD
 1.74.2.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.80.2.1 10-Aug-2014  tls Rebase.
 1.81.4.2 28-Aug-2017  skrll Sync with HEAD
 1.81.4.1 06-Apr-2015  skrll Sync with HEAD
 1.84.4.1 21-Apr-2017  bouyer Sync with HEAD
 1.84.2.3 26-Apr-2017  pgoyette Sync with HEAD
 1.84.2.2 20-Mar-2017  pgoyette Sync with HEAD
 1.84.2.1 20-Jul-2016  pgoyette Adapt machine-independant code to the new {b,c}devsw reference-counting
(using localcount(9)). All callers of {b,c}devsw_lookup() now call
{b,c}devsw_lookup_acquire() which retains a reference on the 'struct
{b,c}devsw'. This reference must be released by the caller once it is
finished with the structure's content (or other data that would disappear
if the 'struct {b,c}devsw' were to disappear).
 1.86.20.1 17-Jan-2020  ad Sync with head.
 1.86.14.1 08-Apr-2020  martin Merge changes from current as of 20200406
 1.86.4.1 27-Apr-2017  pgoyette Restore all work from the former pgoyette-localcount branch (which is
now abandoned doe to cvs merge botch).

The branch now builds, and installs via anita. There are still some
problems (cgd is non-functional and all atf tests time-out) but they
will get resolved soon.
 1.87.6.1 14-Dec-2020  thorpej Sync w/ HEAD.
 1.91.2.1 02-Aug-2025  perseant Sync with HEAD
 1.21 17-Jan-2020  ad VFS_VGET(), VFS_ROOT(), VFS_FHTOVP(): give them a "int lktype" argument, to
allow us to get shared locks (or no lock) on the returned vnode. Matches
FreeBSD.
 1.20 08-Jun-2017  chs branches: 1.20.6; 1.20.12;
add a forward declaration of struct mbuf.
needed due to some other change I made for ZFS.
 1.19 13-Dec-2014  hannken Change coda from hashlist to vcache.
- Replace all hash list crawlers with vfs_vnode_iterator.
 1.18 26-Nov-2007  pooka branches: 1.18.62; 1.18.82;
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
 1.17 31-Jul-2007  pooka branches: 1.17.2; 1.17.4; 1.17.10; 1.17.12;
* nuke the nameidata parameter from VFS_MOUNT(). Nobody on tech-kern
knew what it was supposed to be used for and wrstuden gave a go-ahead
* while rototilling, convert file systems which went easily to
use VFS_PROTOS() instead of manually prototyping the methods
 1.16 12-Jul-2007  dsl branches: 1.16.2;
Update coda for VFS_MOUNT() change
 1.15 14-May-2006  elad branches: 1.15.18;
integrate kauth.
 1.14 11-Dec-2005  christos branches: 1.14.4; 1.14.6; 1.14.8; 1.14.10; 1.14.12;
merge ktrace-lwp.
 1.13 26-Feb-2005  perry branches: 1.13.4;
nuke trailing whitespace
 1.12 20-May-2004  atatat branches: 1.12.4; 1.12.6;
Tweak sysctl setup functions (the macros, actually) for use in lkms,
and tweak lkminit_*.c (where applicable) to call them, and to call
sysctl_teardown() when being unloaded.

This consists of (1) making setup functions not be static when being
compiled as lkms (change to sys/sysctl.h), (2) making prototypes
visible for the various setup functions in header files (changes to
various header files), and (3) making simple "load" and "unload"
functions in the actual lkminit stuff.

linux_sysctl.c also needs its root exposed (ie, made not static) for
this (when built as an lkm).
 1.11 27-Apr-2004  jrf First pass for some caddr_t removal and changes to get rid of it where we
no longer use and/or need it

- removed casts from unionfs, deadfs and fdesc
(there are more to hunt down still)
- changed vfs_quotactl args argumet from caddr_t to void *
- changed vfs_quotactl structures/callers to reflect the api change

Compiled fine and ran for about a day. Approved/reviewed by
christos@netbsd.org and gimpy@netbsd.org.
 1.10 21-Apr-2004  christos Replace the statfs() family of system calls with statvfs().
Retain binary compatibility.
 1.9 27-Aug-2003  drochner branches: 1.9.2;
update for the protocol used by coda>=6,
patches supplied by the coda-6.0.2 distribution,
with small changes to support the old protocol optionally
(options CODA_COMPAT_5)
 1.8 29-Jun-2003  fvdl branches: 1.8.2;
Back out the lwp/ktrace changes. They contained a lot of colateral damage,
and need to be examined and discussed more.
 1.7 29-Jun-2003  thorpej 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.
 1.6 28-Jun-2003  darrenr 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
 1.5 16-Mar-2000  jdolecek Add new VFS op routine - vfs_done and call it on filesystem detach
in vfs_detach(). vfs_done may free global filesystem's resources,
typically those allocated in respective filesystem's init function.
Needed so those filesystems which went in via LKM have a chance to
clean after themselves before unloading. This fixes random panics
when LKM for filesystem using pools was loaded and unloaded several
times.

For each leaf filesystem, add appropriate vfs_done routine.
 1.4 15-Sep-1998  rvb branches: 1.4.12;
Final piece of rename cfs->coda
 1.3 12-Sep-1998  rvb Change cfs/CFS in symbols, strings and constants to coda/CODA
to avoid fs conflicts.
 1.2 08-Sep-1998  rvb Pass2 complete
 1.1 29-Aug-1998  rvb branches: 1.1.1;
Initial revision
 1.1.1.1 29-Aug-1998  rvb Very Preliminary Coda
 1.4.12.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
 1.8.2.6 04-Mar-2005  skrll Sync with HEAD.

Hi Perry!
 1.8.2.5 21-Sep-2004  skrll Fix the sync with head I botched.
 1.8.2.4 18-Sep-2004  skrll Sync with HEAD.
 1.8.2.3 24-Aug-2004  skrll 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.
 1.8.2.2 03-Aug-2004  skrll Sync with HEAD
 1.8.2.1 02-Jul-2003  darrenr Apply the aborted ktrace-lwp changes to a specific branch. This is just for
others to review, I'm concerned that patch fuziness may have resulted in some
errant code being generated but I'll look at that later by comparing the diff
from the base to the branch with the file I attempt to apply to it. This will,
at the very least, put the changes in a better context for others to review
them and attempt to tinker with removing passing of 'struct lwp' through
the kernel.
 1.9.2.1 23-May-2004  tron Pull up revision 1.12 (requested by atatat in ticket #374):
Tweak sysctl setup functions (the macros, actually) for use in lkms,
and tweak lkminit_*.c (where applicable) to call them, and to call
sysctl_teardown() when being unloaded.
This consists of (1) making setup functions not be static when being
compiled as lkms (change to sys/sysctl.h), (2) making prototypes
visible for the various setup functions in header files (changes to
various header files), and (3) making simple "load" and "unload"
functions in the actual lkminit stuff.
linux_sysctl.c also needs its root exposed (ie, made not static) for
this (when built as an lkm).
 1.12.6.1 19-Mar-2005  yamt sync with head. xen and whitespace. xen part is not finished.
 1.12.4.1 29-Apr-2005  kent sync with -current
 1.13.4.3 07-Dec-2007  yamt sync with head
 1.13.4.2 03-Sep-2007  yamt sync with head.
 1.13.4.1 21-Jun-2006  yamt sync with head.
 1.14.12.1 24-May-2006  tron Merge 2006-05-24 NetBSD-current into the "peter-altq" branch.
 1.14.10.1 08-Mar-2006  elad Adapt to kernel authorization KPI.
 1.14.8.1 24-May-2006  yamt sync with head.
 1.14.6.1 01-Jun-2006  kardel Sync with head.
 1.14.4.1 09-Sep-2006  rpaulo sync with head
 1.15.18.2 20-Aug-2007  ad Sync with HEAD.
 1.15.18.1 15-Jul-2007  ad Sync with head.
 1.16.2.1 15-Aug-2007  skrll Sync with HEAD.
 1.17.12.2 31-Jul-2007  pooka * nuke the nameidata parameter from VFS_MOUNT(). Nobody on tech-kern
knew what it was supposed to be used for and wrstuden gave a go-ahead
* while rototilling, convert file systems which went easily to
use VFS_PROTOS() instead of manually prototyping the methods
 1.17.12.1 31-Jul-2007  pooka file coda_vfsops.h was added on branch matt-mips64 on 2007-07-31 21:14:20 +0000
 1.17.10.1 08-Dec-2007  mjf Sync with HEAD.
 1.17.4.1 09-Jan-2008  matt sync with HEAD
 1.17.2.1 27-Nov-2007  joerg Sync with HEAD. amd64 Xen support needs testing.
 1.18.82.2 28-Aug-2017  skrll Sync with HEAD
 1.18.82.1 06-Apr-2015  skrll Sync with HEAD
 1.18.62.1 03-Dec-2017  jdolecek update from HEAD
 1.20.12.1 17-Jan-2020  ad Sync with head.
 1.20.6.1 08-Apr-2020  martin Merge changes from current as of 20200406
 1.119 14-May-2024  andvar fix recently committed typos by msaitoh in few more places, as well as few more.
mainly s/contigous/contiguous/ and s/miliseconds/milliseconds/ in comments.
 1.118 27-Mar-2022  christos add a kauth vnode check for creating links
 1.117 05-Dec-2021  msaitoh s/sybolic/symbolic/ in comment.
 1.116 20-Oct-2021  thorpej Overhaul of the EVFILT_VNODE kevent(2) filter:

- Centralize vnode kevent handling in the VOP_*() wrappers, rather than
forcing each individual file system to deal with it (except VOP_RENAME(),
because VOP_RENAME() is a mess and we currently have 2 different ways
of handling it; at least it's reasonably well-centralized in the "new"
way).
- Add support for NOTE_OPEN, NOTE_CLOSE, NOTE_CLOSE_WRITE, and NOTE_READ,
compatible with the same events in FreeBSD.
- Track which kevent notifications clients are interested in receiving
to avoid doing work for events no one cares about (avoiding, e.g.
taking locks and traversing the klist to send a NOTE_WRITE when
someone is merely watching for a file to be deleted, for example).

In support of the above:

- Add support in vnode_if.sh for specifying PRE- and POST-op handlers,
to be invoked before and after vop_pre() and vop_post(), respectively.
Basic idea from FreeBSD, but implemented differently.
- Add support in vnode_if.sh for specifying CONTEXT fields in the
vop_*_args structures. These context fields are used to convey information
between the file system VOP function and the VOP wrapper, but do not
occupy an argument slot in the VOP_*() call itself. These context fields
are initialized and subsequently interpreted by PRE- and POST-op handlers.
- Version VOP_REMOVE(), uses the a context field for the file system to report
back the resulting link count of the target vnode. Return this in tmpfs,
udf, nfs, chfs, ext2fs, lfs, and ufs.

NetBSD 9.99.92.
 1.115 29-Jun-2021  dholland - Add a new vnode op: VOP_PARSEPATH.
- Move namei_getcomponent to genfs_vnops.c and call it genfs_parsepath.
- Add a parsepath entry to every vnode ops table.

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

Note that the call doesn't take the whole struct componentname, only
the string. The other bits of struct componentname should not be
needed and there's no reason to cause potential complications by
exposing them.
 1.114 14-Nov-2020  hannken branches: 1.114.4;
Rewrite coda_readdir() to directly process the container file.

Passing this operation down to the file system holding the container
cannot work for anything but UFS and UFS doesn't allow reading
directory from a plain file since ~2015.

Fixes PR kern/55775 Coda client, its in-kernel part, opens wrong files ...
 1.113 14-Nov-2020  hannken Add coda_pathconf() always returning EINVAL.
 1.112 16-May-2020  christos branches: 1.112.2;
Add ACL support for FFS. From FreeBSD.
 1.111 13-Apr-2020  ad Replace most uses of vp->v_usecount with a call to vrefcnt(vp), a function
that hides the details and does atomic_load_relaxed(). Signature matches
FreeBSD.
 1.110 24-Feb-2020  ad branches: 1.110.4;
v_interlock -> vmobjloc
 1.109 23-Feb-2020  ad UVM locking changes, proposed on tech-kern:

- Change the lock on uvm_object, vm_amap and vm_anon to be a RW lock.
- Break v_interlock and vmobjlock apart. v_interlock remains a mutex.
- Do partial PV list locking in the x86 pmap. Others to follow later.
 1.108 17-Jan-2020  ad VFS_VGET(), VFS_ROOT(), VFS_FHTOVP(): give them a "int lktype" argument, to
allow us to get shared locks (or no lock) on the returned vnode. Matches
FreeBSD.
 1.107 20-Nov-2018  christos branches: 1.107.4; 1.107.6;
Fix locking for readdir code (Brett Lymn)
 1.106 26-May-2017  riastradh branches: 1.106.2; 1.106.8; 1.106.10;
Make VOP_RECLAIM do the last unlock of the vnode.

VOP_RECLAIM naturally has exclusive access to the vnode, so having it
locked on entry is not strictly necessary -- but it means if there
are any final operations that must be done on the vnode, such as
ffs_update, requiring exclusive access to it, we can now kassert that
the vnode is locked in those operations.

We can't just have the caller release the last lock because some file
systems don't use genfs_lock, and require the vnode to remain valid
for VOP_UNLOCK to work, notably unionfs.
 1.105 26-Apr-2017  riastradh Change VOP_REMOVE and VOP_RMDIR to preserve lock/ref on dvp.

No change to vp -- the plan is to replace the node by the
componentname in the vop parameters, and let all directory vops do
lookups internally.

Proposed on tech-kern with no objections:
https://mail-index.netbsd.org/tech-kern/2017/04/17/msg021825.html
 1.104 11-Apr-2017  riastradh Make VOP_INACTIVE preserve vnode lock on return.

Discussed on tech-kern:
https://mail-index.netbsd.org/tech-kern/2017/04/01/msg021751.html

Ride 7.99.68, a bumpy bus of incremental vfs improvements!
 1.103 20-Aug-2016  hannken branches: 1.103.2;
Remove now obsolete operation vcache_remove().

Welcome to 7.99.36
 1.102 20-Apr-2015  riastradh branches: 1.102.2;
Make VOP_LINK return directory still locked and referenced.

Ride 7.99.10 bump.
 1.101 13-Dec-2014  hannken Change coda from hashlist to vcache.
- Replace all hash list crawlers with vfs_vnode_iterator.
 1.100 13-Dec-2014  hannken Remove cnodes from coda_reclaim(), not from coda_inactive().
 1.99 13-Dec-2014  hannken Attach the control object vnode to the coda mount and release it
on unmount. Initialize special files with NODEV.
 1.98 18-Oct-2014  snj branches: 1.98.2;
src is too big these days to tolerate superfluous apostrophes. It's
"its", people!
 1.97 25-Jul-2014  dholland Add VOP_FALLOCATE and VOP_FDISCARD to every vnode ops table I can
find.

The filesystem ones all call genfs_eopnotsupp - right now I am only
implementing the plumbing and we can implement fallocate and/or
fdiscard for files later.

The device ones call spec_fallocate (which is also genfs_eopnotsupp)
and spec_fdiscard, which dispatches to the device-level op.

The fifo ones all call vn_fifo_bypass, which also ends up being
EOPNOTSUPP.
 1.96 20-Mar-2014  skrll branches: 1.96.2;
Mechanically replace simplelock with kmutex_t.
 1.95 27-Feb-2014  hannken The current implementation of vn_lock() is racy. Modification of
the vnode operations vector for active vnodes is unsafe because it
is not known whether deadfs or the original file system will be
called.

- Pass down LK_RETRY to the lock operation (hint for deadfs only).

- Change deadfs lock operation to return ENOENT if LK_RETRY is unset.

- Change all other lock operations to check for dead vnode once
the vnode is locked and unlock and return ENOENT in this case.

With these changes in place vnode lock operations will never succeed
after vclean() has marked the vnode as VI_XLOCK and before vclean()
has changed the operations vector.

Adresses PR kern/37706 (Forced unmount of file systems is unsafe)

Discussed on tech-kern.

Welcome to 6.99.33
 1.94 07-Feb-2014  hannken 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
 1.93 23-Jan-2014  hannken Change vnode operations create, mknod, mkdir and symlink to return
the resulting vnode *vpp unlocked.

Discussed on tech-kern@

Welcome to 6.99.30
 1.92 17-Jan-2014  hannken Change vnode operations create, mknod, mkdir and symlink to keep the
directory node dvp locked on return.

Discussed on tech-kern@

Welcome to 6.99.29
 1.91 17-Oct-2013  christos remove unused code.
 1.90 02-Aug-2012  christos branches: 1.90.2; 1.90.4;
- move debugging functions to vcoda so modules with -DDEBUG link
- fix writing to coda files. this is probably not the right way to do
this, but it satisfies the locking protocol:
1. Sometimes coda_open() is called with an unlocked vnode which
does not satisfy the locking protocol. Lock it for now. We
need to find out why this happens
2. VFS_VGET sometimes returns the container vnode unlocked. What
is the locking protocol for VFS_VGET? We also lock it here.
 1.89 28-Jul-2012  matt -fno-common fallout.
 1.88 04-May-2012  christos comment out debugging printfs
 1.87 04-May-2012  christos fix locking in getpages when running executables.
 1.86 03-May-2012  christos move the assert after the locked case.
 1.85 02-May-2012  christos Instead of sharing the coda vnode lock with the ffs vnode lock, share the
ffs vnode lock with coda.
 1.84 28-Apr-2012  christos cosmetic only: __func__, vnode_t
 1.83 28-Apr-2012  christos Fixes from get/putpages from rmind.
In grab vnode, share the lock of the coda vnode with the underlying vnode,
so that the locking protocol works.
 1.82 26-Apr-2012  christos re-arrange things so that vcoda does not depend on coda.
 1.81 13-Sep-2011  gdt branches: 1.81.2; 1.81.6;
Reduce verbosity of semi-debug coda_inactive printf.

Rather than print if the usecount is > 0, only print if it is greater
than 1. It seems 1 is normal.
 1.80 12-Jun-2011  rmind Welcome to 5.99.53! Merge rmind-uvmplock branch:

- Reorganize locking in UVM and provide extra serialisation for pmap(9).
New lock order: [vmpage-owner-lock] -> pmap-lock.

- Simplify locking in some pmap(9) modules by removing P->V locking.

- Use lock object on vmobjlock (and thus vnode_t::v_interlock) to share
the locks amongst UVM objects where necessary (tmpfs, layerfs, unionfs).

- Rewrite and optimise x86 TLB shootdown code, make it simpler and cleaner.
Add TLBSTATS option for x86 to collect statistics about TLB shootdowns.

- Unify /dev/mem et al in MI code and provide required locking (removes
kernel-lock on some ports). Also, avoid cache-aliasing issues.

Thanks to Andrew Doran and Joerg Sonnenberger, as their initial patches
formed the core changes of this branch.
 1.79 19-May-2011  rmind branches: 1.79.2;
Remove cache_purge(9) calls from reclamation routines in the file systems,
as vclean(9) performs it for us since Lite2 merge.
 1.78 30-Nov-2010  dholland branches: 1.78.2;
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.
 1.77 30-Nov-2010  dholland 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.
 1.76 20-Jul-2010  christos Correct incomplete size checks for the coda ioctls. From Dan Rosenberg.
 1.75 01-Jul-2010  hannken Remove vlockmgr(). Generic vnode lock operations now use a rwlock located
in the vnode. All LK_* flags move from sys/lock.h to sys/vnode.h. Calls
to vlockmgr() in file systems get replaced with VOP_LOCK() or VOP_UNLOCK().

Welcome to 5.99.34.

Discussed on tech-kern.
 1.74 24-Jun-2010  hannken 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.
 1.73 24-Jun-2010  hannken coda_lock(): LK_INTERLOCK flag no longer possible.
 1.72 24-Jun-2010  hannken Clean up vnode lock operations:

- VOP_LOCK(vp, flags): Limit the set of allowed flags to LK_EXCLUSIVE,
LK_SHARED and LK_NOWAIT. LK_INTERLOCK is no longer allowed as it
makes no sense here.

- VOP_ISLOCKED(vp): Remove the for some time unused return value
LK_EXCLOTHER. Mark this operation as "diagnostic only".
Making a lock decision based on this operation is no longer allowed.

Discussed on tech-kern.
 1.71 23-Nov-2009  rmind branches: 1.71.2; 1.71.4;
Remove some unecessary includes sys/user.h header.
 1.70 29-Jun-2009  dholland Convert 67 namei call sites to use namei_simple, in these functions:

check_console, veriexecclose, veriexec_delete, veriexec_file_add,
emul_find_root, coff_load_shlib (sh3 version), coff_load_shlib,
compat_20_sys_statfs, compat_20_netbsd32_statfs,
ELFNAME2(netbsd32,probe_noteless), darwin_sys_statfs,
ibcs2_sys_statfs, ibcs2_sys_statvfs, linux_sys_uselib,
osf1_sys_statfs, sunos_sys_statfs, sunos32_sys_statfs,
ultrix_sys_statfs, do_sys_mount, fss_create_files (3 of 4),
adosfs_mount, cd9660_mount, coda_ioctl, coda_mount, ext2fs_mount,
ffs_mount, filecore_mount, hfs_mount, lfs_mount, msdosfs_mount,
ntfs_mount, sysvbfs_mount, udf_mount, union_mount, sys_chflags,
sys_lchflags, sys_chmod, sys_lchmod, sys_chown, sys_lchown,
sys___posix_chown, sys___posix_lchown, sys_link, do_sys_pstatvfs,
sys_quotactl, sys_revoke, sys_truncate, do_sys_utimes, sys_extattrctl,
sys_extattr_set_file, sys_extattr_set_link, sys_extattr_get_file,
sys_extattr_get_link, sys_extattr_delete_file,
sys_extattr_delete_link, sys_extattr_list_file, sys_extattr_list_link,
sys_setxattr, sys_lsetxattr, sys_getxattr, sys_lgetxattr,
sys_listxattr, sys_llistxattr, sys_removexattr, sys_lremovexattr

All have been scrutinized (several times, in fact) and compile-tested,
but not all have been explicitly tested in action.

XXX: While I haven't (intentionally) changed the use or nonuse of
XXX: TRYEMULROOT in any of these places, I'm not convinced all the
XXX: uses are correct; an audit might be desirable.
 1.69 11-Jan-2009  christos branches: 1.69.2;
merge christos-time_t
 1.68 30-Jan-2008  ad branches: 1.68.6; 1.68.8; 1.68.12; 1.68.20; 1.68.22; 1.68.26; 1.68.28;
Replace struct lock on vnodes with a simpler lock object built on
krwlock_t. This is a step towards removing lockmgr and simplifying
vnode locking. Discussed on tech-kern.
 1.67 25-Jan-2008  ad Remove VOP_LEASE. Discussed on tech-kern.
 1.66 02-Jan-2008  ad Merge vmlocking2 to head.
 1.65 25-Dec-2007  perry Convert many of the uses of __attribute__ to equivalent
__packed, __unused and __dead macros from cdefs.h
 1.64 08-Dec-2007  pooka branches: 1.64.4;
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.
 1.63 26-Nov-2007  pooka branches: 1.63.2;
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
 1.62 23-Jul-2007  pooka branches: 1.62.4; 1.62.6; 1.62.12; 1.62.14;
Initialize size and/or writesize when creating a vnode.
 1.61 25-Apr-2007  dogcow branches: 1.61.2;
make coda compile again.
 1.60 15-Apr-2007  gdt Stop doing vref of vnodes on open (and vrele on close); this makes no
sense.

Improve coda_inactive, turning commented out DIAGNOSTIC checks into printfs.

minor style/comment fixes.
 1.59 15-Apr-2007  gdt In coda_{get,put}pages, drop and obtain v_uobj.vmobjlock rather than
v_interlock. They are actually the same lock, but the former protects
the uvm object associated with the vnode, and the latter vnode
reference counts. Explained to me by chs@.
 1.58 15-Apr-2007  gdt Based on suggestion from chs@, drop coda vnode interlock before
obtaining interlock on container vnode in coda_{get,put}pages. This
is the only functional change in this commit.

Improve many comments. In particular, note that the relationship
between VOP_OPEN and obtaining a container file (e.g. for getpages for
executables) is messy.

Add printfs for 'internal open' cases in coda_rdwr. These have not
been triggered in my testing. Note an apparent vref leak.
 1.57 12-Apr-2007  gdt Rewrite coda_{get,put}pages. Now copying files from coda with mmap
does not trigger assertions in uvm_fault, and executing files from
coda works as well.

Code very lightly reviewed by wrstuden@; scrutiny by those who
understand vnode and especially {get,put}pages would be appreciated.
 1.56 09-Apr-2007  gdt revert putpages part of last change. Thanks to pooka@ for pointing
out that the v_interlock in the previous code and v_uobj.vmobjlock are
really the same thing.
 1.55 08-Apr-2007  gdt Further cleanups on coda vnode handling.

Re-enable mmap. The problem is how uvm_fault handles page faults from
coda vnodes via container files, and executing a program caused the
same problem so disabling mmap only helped cp(1).

coda_open:
rename variables to match vnode_if.src
better comments about lock/reference state of vnodes
keep lock on container file until after VOP_OPEN, which requires locked vp
remove #if 0'd code to PNBUF_PUT

coda_link:
rename variables to match vnode_if.src
error out early if vp == dvp
check return value on vn_lock, and add comment questoining the lock
clarify lock handling, but unchanged logic
remove #if 0'd code to PNBUF_PUT

coda_rmdir:
error out early if vp == dvp
remove #if 0'd code to PNBUF_PUT

coda_grab_vnode:
add comments, and in particular question undocumented VFS_VGET semantics

coda_getpages:
question calling VOP_OPEN, which requires a locked vnode, with the
vnode we got (vop_getpages does not guarantee a locked vnode)

coda_putpages:
remove inexplicable simple_unlock(&vp->v_interlock);
add printf so we notice if this is ever called

add comment explaining that the implementation will lead to trouble,
because vnode_if.src says putpages is called with v_uobj.vmobjlock
held and is supposed to unlock it

With these changes and an uncommitted change to uvm_fault not to panic
if uvm objects are not equal, coda seems stable again.
 1.54 06-Apr-2007  gdt Disable mmap for coda. When copying a file from coda to normal ffs, I
got a panic in uvm_fault from ffs_write. I believe this is because cp
used mmap, the container file page was not in core, and uvm_fault
objected to the container file vnode and the coda vnode not matching.
I have long been plagued by crashes on cp from coda, and this was the
first time I got and understood a backtrace.

Clean up old comments that are no longer accurate.

Document refcounting better.

Note some questionable behaviors with XXX.

Clean up PNBUF_PUT and SAVESTART. Only do this where vnodeops(9) says
we should, and do it on error also.

In symlink, vput parent and free namebuf even in error cases.
 1.53 05-Apr-2007  gdt Improve conformance to vnode locking rules in coda_lookup, by doing
the unlock parent, lock child, lock parent in the ISDOTDOT case.

Clean up and rewrite comments to match more closely current reality.

Sprinkle XXX where I'm not sure the current rules are being followed.

Reviewed by wrstuden@, who agreed that this is an improvement over the
current code, with concerns about LK_RETRY and whether the ISDOTDOT
locking is done soon enough.
 1.52 04-Mar-2007  christos branches: 1.52.2; 1.52.4;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.51 09-Dec-2006  chs branches: 1.51.2;
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().
 1.50 21-Jul-2006  ad branches: 1.50.4; 1.50.6; 1.50.8;
- Use the LWP cached credentials where sane.
- Minor cosmetic changes.
 1.49 14-May-2006  elad integrate kauth.
 1.48 12-Apr-2006  christos COVERITY CID 1113: Don't use NULL for VOP_READDIR
 1.47 01-Mar-2006  yamt branches: 1.47.2; 1.47.4; 1.47.6;
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.
 1.46 12-Jan-2006  gdt branches: 1.46.2; 1.46.4;
In coda_lookup, add LK_RETRY to locking of child vnode. The previous
code paniced if the first attempt to lock the vnode failed, and such
failures are not errors - just cause to wait. gdt was regularly
hitting this panic.

Correct one of two identical panic messages.

Add XXX comments about

ISDOTDOT locking rules not being followed

questioning the practice of unlocking parent before locking child.
(But, given that the vnode is referenced, it can't be deleted, so
maybe this is fine.)

Why is failured to unlock not a panic but failure to lock is?
 1.45 11-Dec-2005  christos branches: 1.45.2;
merge ktrace-lwp.
 1.44 02-Nov-2005  yamt branches: 1.44.2;
merge yamt-vop branch. remove following VOPs.

VOP_BLKATOFF
VOP_VALLOC
VOP_BALLOC
VOP_REALLOCBLKS
VOP_VFREE
VOP_TRUNCATE
VOP_UPDATE
 1.43 30-Aug-2005  xtraeme branches: 1.43.2;
* Remove __P()
* Use ANSI function declarations
 1.42 19-Aug-2005  christos 64 bit inode changes.
 1.41 29-May-2005  christos branches: 1.41.2;
- sprinkle const
- avoid shadowed variables.
 1.40 26-Feb-2005  perry nuke trailing whitespace
 1.39 25-Jun-2004  petrov branches: 1.39.4; 1.39.6;
Fix coda symlink vnodeops. Provided by Greg Troxel. PR kern/25963.
 1.38 30-Oct-2003  simonb branches: 1.38.2;
Remove some assigned-to but otherwise unused variables.
 1.37 27-Aug-2003  drochner update for the protocol used by coda>=6,
patches supplied by the coda-6.0.2 distribution,
with small changes to support the old protocol optionally
(options CODA_COMPAT_5)
 1.36 29-Jun-2003  fvdl branches: 1.36.2;
Back out the lwp/ktrace changes. They contained a lot of colateral damage,
and need to be examined and discussed more.
 1.35 29-Jun-2003  thorpej 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.
 1.34 28-Jun-2003  darrenr 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
 1.33 06-Jan-2003  wiz writable, not writeable.
 1.32 27-Sep-2002  provos remove trailing \n in panic(). approved perry.
 1.31 30-Jul-2002  soren Die, qaddr_t, die! - mnt_data in struct mount is already effectively
a void *, so stop pretending otherwise.
 1.30 06-Dec-2001  chs branches: 1.30.8;
add a VOP_PUTPAGES method for all the filesystems that don't have pages,
just unlock the interlock.
 1.29 24-Nov-2001  perry add a VTOC macro that doesn't cast, and fix a spurious lvalue cast with it.
 1.28 23-Nov-2001  perry __FUNCTION__ -> __func__
 1.27 12-Nov-2001  lukem add RCSIDs
 1.26 24-Jul-2001  assar branches: 1.26.2;
change vop_symlink and vop_mknod to return vpp (the created node)
refed, so that the caller can actually use it. update callers and
file systems that implement these vnode operations
 1.25 03-Jul-2001  chs branches: 1.25.2;
add coda_{get,put}pages so that mmap works.
 1.24 28-May-2001  chs add a genfs_mmap() and change all of the disk-based filesystems
to implement VOP_MMAP() with the genfs version, in preparation for
actually using this VOP.
 1.23 22-Jan-2001  jdolecek branches: 1.23.2;
make filesystem vnodeop, specop, fifoop and vnodeopv_* arrays const
 1.22 27-Nov-2000  chs Initial integration of the Unified Buffer Cache project.
 1.21 19-Sep-2000  fvdl Adapt for VOP_FSYNC parameter change.
 1.20 03-Aug-2000  thorpej Convert namei pathname buffer allocation to use the pool allocator.
 1.19 27-Jun-2000  mrg remove redundant vm includes.
 1.18 05-Apr-2000  phil branches: 1.18.4;
Quiet some printfs unless VERBOSE.
 1.17 30-Mar-2000  augustss Kill register declarations.
 1.16 31-Oct-1999  chs fix DEBUG printfs to compile.
 1.15 17-Oct-1999  cgd branches: 1.15.2; 1.15.4;
nuke RCS "Log" tags. They cause problems for third parties importing
our sources, and for NetBSD release engineering folks. (They've
been against the NetBSD coding style forever, but they crept in anyway.)
 1.14 16-Oct-1999  wrstuden In spec_close(), if we're not doing a non-blocking close and VXLOCK is
not set, unlock the vnode before calling the device's close routine and
relock it after it returns. tty close routines will sleep waiting for
buffers to drain, which won't happen often times as the other side needs
to grab the vnode lock first.

Make all unmount routines lock the device vnode before calling VOP_CLOSE().
 1.13 01-Oct-1999  soren branches: 1.13.2;
Account for widened v_usecount in struct vnode.
 1.12 18-Sep-1999  matt Make this compile on alpha again.
 1.11 03-Aug-1999  wrstuden Add support for fcntl(2) to generate VOP_FCNTL calls. Any fcntl
call with F_FSCTL set and F_SETFL calls generate calls to a new
fileop fo_fcntl. Add genfs_fcntl() and soo_fcntl() which return 0
for F_SETFL and EOPNOTSUPP otherwise. Have all leaf filesystems
use genfs_fcntl().

Reviewed by: thorpej
Tested by: wrstuden
 1.10 08-Jul-1999  wrstuden Bump osrelease to 1.4E. Add layerfs files, remove null_subr.c.

Update coda to new struct lock in struct vnode.

make fdescfs, kernfs, portalfs, and procfs actually lock their vnodes.
It's not that hard.

Make unionfs set v_vnlock = NULL so any overlayed fs will call its
VOP_LOCK.
 1.9 10-Dec-1998  rvb branches: 1.9.4; 1.9.6;
Commit a couple of old fixes
 1.8 09-Nov-1998  rvb Change the way unmounting happens to guarantee that the
client programs are allowed to finish up (coda_call is
forced to complete) and release their locks. Thus there
is a reasonable chance that the vflush implicit in the
unmount will not get hung on held locks.
 1.7 28-Sep-1998  rvb I want to distinguish from DEBUG printouts and CODA_VERBOSE printouts.
The latter are normal informational messages that are sometimes
interesting to view.
 1.6 26-Sep-1998  tv DIAGNOSTIC -> DEBUG for all non-panic messages. DIAGNOSTIC is only for
sanity checks and should not turn on any messages not already printed
without it.
 1.5 25-Sep-1998  rvb Conditionalize "stray" printouts under DIAGNOSTIC and DEBUG.
Make files compile if DEBUG is on (from Alan Barrett). Finally,
make coda an lkm.
 1.4 15-Sep-1998  rvb Final piece of rename cfs->coda
 1.3 12-Sep-1998  rvb Change cfs/CFS in symbols, strings and constants to coda/CODA
to avoid fs conflicts.
 1.2 08-Sep-1998  rvb Pass2 complete
 1.1 29-Aug-1998  rvb branches: 1.1.1;
Initial revision
 1.1.1.1 29-Aug-1998  rvb Very Preliminary Coda
 1.9.6.1 02-Aug-1999  thorpej Update from trunk.
 1.9.4.4 12-Feb-2000  he Apply patch (requested by he):
Fix a compile problem under CODA_VERBOSE caused by the v_usecount
widening.
 1.9.4.3 06-Feb-2000  he Apply patch (requested by christos):
Fix a compilation problem caused by the widening of v_usecount.
 1.9.4.2 18-Oct-1999  cgd pull up rev 1.14 from trunk (requested by wrstuden):
In spec_close(), call the device's close routine with the vnode
unlocked if the call might block. Force a non-blocking close if
VXLOCK is set. This eliminates a potential deadlock situation, and
should eliminate the dirty buffers on reboot issue.
 1.9.4.1 10-Oct-1999  cgd pull up rev 1.13 from trunk (requested by mycroft):
Fix potential overflow of v_usecount and v_writecount (and panics
resulting from this) by widening them to `long'. Mostly affects
systems where maxvnodes>=32768.
 1.13.2.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.15.4.1 15-Nov-1999  fvdl Sync with -current
 1.15.2.3 11-Feb-2001  bouyer Sync with HEAD.
 1.15.2.2 08-Dec-2000  bouyer Sync with HEAD.
 1.15.2.1 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
 1.18.4.1 14-Dec-2000  he Pull up revision 1.21 (requested by fvdl):
Improve NFS performance, possibly with as much as 100% in
throughput. Please note: this implies a kernel interface change,
VOP_FSYNC gains two arguments.
 1.23.2.10 07-Jan-2003  thorpej Sync with HEAD.
 1.23.2.9 18-Oct-2002  nathanw Catch up to -current.
 1.23.2.8 01-Aug-2002  nathanw Catch up to -current.
 1.23.2.7 24-Jun-2002  nathanw Curproc->curlwp renaming.

Change uses of "curproc->l_proc" back to "curproc", which is more like the
original use. Bare uses of "curproc" are now "curlwp".

"curproc" is now #defined in proc.h as ((curlwp) ? (curlwp)->l_proc) : NULL)
so that it is always safe to reference curproc (*de*referencing curproc
is another story, but that's always been true).
 1.23.2.6 08-Jan-2002  nathanw Catch up to -current.
 1.23.2.5 14-Nov-2001  nathanw Catch up to -current.
 1.23.2.4 24-Aug-2001  nathanw A few files and lwp/proc conversions I missed in the last big update.
GENERIC runs again.
 1.23.2.3 24-Aug-2001  nathanw Catch up with -current.
 1.23.2.2 21-Jun-2001  nathanw Catch up to -current.
 1.23.2.1 05-Mar-2001  nathanw Initial commit of scheduler activations and lightweight process support.
 1.25.2.4 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.25.2.3 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.25.2.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.25.2.1 03-Aug-2001  lukem update to -current
 1.26.2.3 01-Oct-2001  fvdl Catch up with -current.
 1.26.2.2 26-Sep-2001  fvdl * add a VCLONED vnode flag that indicates a vnode representing a cloned
device.
* rename REVOKEALL to REVOKEALIAS, and add a REVOKECLONE flag, to pass
to VOP_REVOKE
* the revoke system call will revoke all aliases, as before, but not the
clones
* vdevgone is called when detaching a device, so make it use REVOKECLONE
to get rid of all clones as well
* clean up all uses of VOP_OPEN wrt. locking.
* add a few VOPS to spec_vnops that need to do something when it's a
clone vnode (access and getattr)
* add a copy of the vnode vattr structure of the original 'master' vnode
to the specinfo of a cloned vnode. could possibly redirect getattr to
the 'master' vnode, but this has issues with revoke
* add a vdev_reassignvp function that disassociates a vnode from its
original device, and reassociates it with the specified dev_t. to be
used by cloning devices only, in case a new minor is allocated.
* change all direct references in drivers to v_devcookie and v_rdev
to vdev_privdata(vp) and vdev_rdev(vp). for diagnostic purposes
when debugging race conditions that still exist wrt. locking and
revoking vnodes.
* make the locking state of a vnode consistent when passed to
d_open and d_close (unlocked). locked would be better, but has
some deadlock issues
 1.26.2.1 18-Sep-2001  fvdl Various changes to make cloning devices possible:

* Add an extra argument (struct vnode **) to VOP_OPEN. If it is
not NULL, specfs will create a cloned (aliased) vnode during
the call, and return it there. The caller should release and
unlock the original vnode if a new vnode was returned. The
new vnode is returned locked.

* Add a flag field to the cdevsw and bdevsw structures.
DF_CLONING indicates that it wants a new vnode for each
open (XXX is there a better way? devprop?)

* If a device is cloning, always call the close entry
point for a VOP_CLOSE.


Also, rewrite cons.c to do the right thing with vnodes. Use VOPs
rather then direct device entry calls. Suggested by mycroft@

Light to moderate testing done an i386 system (arch doesn't matter
though, these are MI changes).
 1.30.8.1 29-Aug-2002  gehenna catch up with -current.
 1.36.2.8 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.36.2.7 04-Mar-2005  skrll Sync with HEAD.

Hi Perry!
 1.36.2.6 24-Oct-2004  skrll coda_grab_vnode no longer requires a struct lwp * argument.
 1.36.2.5 21-Sep-2004  skrll Fix the sync with head I botched.
 1.36.2.4 18-Sep-2004  skrll Sync with HEAD.
 1.36.2.3 24-Aug-2004  skrll 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.
 1.36.2.2 03-Aug-2004  skrll Sync with HEAD
 1.36.2.1 02-Jul-2003  darrenr Apply the aborted ktrace-lwp changes to a specific branch. This is just for
others to review, I'm concerned that patch fuziness may have resulted in some
errant code being generated but I'll look at that later by comparing the diff
from the base to the branch with the file I attempt to apply to it. This will,
at the very least, put the changes in a better context for others to review
them and attempt to tinker with removing passing of 'struct lwp' through
the kernel.
 1.38.2.1 27-Jun-2004  jdc Pull up revision 1.39 (requested by petrov in ticket #550).

Fix coda symlink vnodeops. Provided by Greg Troxel. PR kern/25963.
 1.39.6.1 19-Mar-2005  yamt sync with head. xen and whitespace. xen part is not finished.
 1.39.4.1 29-Apr-2005  kent sync with -current
 1.41.2.6 04-Feb-2008  yamt sync with head.
 1.41.2.5 21-Jan-2008  yamt sync with head
 1.41.2.4 07-Dec-2007  yamt sync with head
 1.41.2.3 03-Sep-2007  yamt sync with head.
 1.41.2.2 30-Dec-2006  yamt sync with head.
 1.41.2.1 21-Jun-2006  yamt sync with head.
 1.43.2.1 20-Oct-2005  yamt adapt coda.
 1.44.2.2 18-Nov-2005  yamt - associate read-ahead context to vnode, rather than file.
- revert VOP_READ prototype.
 1.44.2.1 15-Nov-2005  yamt - adapt to the new prototype of VOP_READ.
- adapt ext2fs and union.
 1.45.2.2 18-Feb-2006  yamt adapt the rest of MI code.
 1.45.2.1 15-Jan-2006  yamt sync with head.
 1.46.4.2 01-Jun-2006  kardel Sync with head.
 1.46.4.1 22-Apr-2006  simonb Sync with head.
 1.46.2.1 09-Sep-2006  rpaulo sync with head
 1.47.6.1 24-May-2006  tron Merge 2006-05-24 NetBSD-current into the "peter-altq" branch.
 1.47.4.3 06-May-2006  christos - Move kauth_cred_t declaration to <sys/types.h>
- Cleanup struct ucred; forward declarations that are unused.
- Don't include <sys/kauth.h> in any header, but include it in the c files
that need it.

Approved by core.
 1.47.4.2 19-Apr-2006  elad sync with head.
 1.47.4.1 08-Mar-2006  elad Adapt to kernel authorization KPI.
 1.47.2.2 11-Aug-2006  yamt sync with head
 1.47.2.1 24-May-2006  yamt sync with head.
 1.50.8.4 04-Aug-2010  bouyer Pull up following revision(s) (requested by christos in ticket #1400):
sys/coda/coda_venus.c: revision 1.28
sys/coda/coda_vnops.c: revision 1.76
sys/coda/coda.h: revision 1.16
Correct incomplete size checks for the coda ioctls. From Dan Rosenberg.
 1.50.8.3 06-Jun-2007  bouyer branches: 1.50.8.3.4;
Apply patch, requested by perseant as part of ticket #703:
sys/coda/coda_vnops.c patch
make coda build again.
 1.50.8.2 13-May-2007  pavel branches: 1.50.8.2.2;
Pull up following revision(s) (requested by gdt in ticket #643):
sys/coda/coda_vnops.c: revision 1.53-1.60 via patch
Major changes to coda vnode operations to restore stability and
functionality. Make coda_lookup conform to the vnode locking protocol
in the IS_DOTDOT case. Fix getpages/putpages to use container vnode
properly so that the uvm code does not fail an assertion. Clean up
handling of pnbuf in light of current rules. Massive update of comments
and general cleanup.
 1.50.8.1 17-Feb-2007  tron Apply patch (requested by chs in ticket #422):
- Fix various deadlock problems with nullfs and unionfs.
- Speed up path lookups by upto 25%.
 1.50.8.3.4.1 04-Aug-2010  bouyer Pull up following revision(s) (requested by christos in ticket #1400):
sys/coda/coda_venus.c: revision 1.28
sys/coda/coda_vnops.c: revision 1.76
sys/coda/coda.h: revision 1.16
Correct incomplete size checks for the coda ioctls. From Dan Rosenberg.
 1.50.8.2.2.1 03-Sep-2007  wrstuden Sync w/ NetBSD-4-RC_1
 1.50.6.1 10-Dec-2006  yamt sync with head.
 1.50.4.1 12-Jan-2007  ad Sync with head.
 1.51.2.3 07-May-2007  yamt sync with head.
 1.51.2.2 15-Apr-2007  yamt sync with head.
 1.51.2.1 12-Mar-2007  rmind Sync with HEAD.
 1.52.4.1 11-Jul-2007  mjf Sync with head.
 1.52.2.5 16-Sep-2007  ad Checkpoint work in progress on the vnode lifecycle and reference counting
stuff. This makes it work properly without kernel_lock and fixes a few
quite old bugs. See vfs_subr.c 1.283.2.17 for details.
 1.52.2.4 20-Aug-2007  ad Sync with HEAD.
 1.52.2.3 15-Jul-2007  ad Sync with head.
 1.52.2.2 08-Jun-2007  ad Sync with head.
 1.52.2.1 05-Apr-2007  ad Compile fixes.
 1.61.2.1 15-Aug-2007  skrll Sync with HEAD.
 1.62.14.2 23-Jul-2007  pooka Initialize size and/or writesize when creating a vnode.
 1.62.14.1 23-Jul-2007  pooka file coda_vnops.c was added on branch matt-mips64 on 2007-07-23 11:27:47 +0000
 1.62.12.3 18-Feb-2008  mjf Sync with HEAD.
 1.62.12.2 27-Dec-2007  mjf Sync with HEAD.
 1.62.12.1 08-Dec-2007  mjf Sync with HEAD.
 1.62.6.2 23-Mar-2008  matt sync with HEAD
 1.62.6.1 09-Jan-2008  matt sync with HEAD
 1.62.4.2 09-Dec-2007  jmcneill Sync with HEAD.
 1.62.4.1 27-Nov-2007  joerg Sync with HEAD. amd64 Xen support needs testing.
 1.63.2.2 26-Dec-2007  ad Sync with head.
 1.63.2.1 04-Dec-2007  ad Pull the vmlocking changes into a new branch.
 1.64.4.1 02-Jan-2008  bouyer Sync with HEAD
 1.68.28.1 20-May-2011  matt bring matt-nb5-mips64 up to date with netbsd-5-1-RELEASE (except compat).
 1.68.26.1 25-Aug-2010  snj Pull up following revision(s) (requested by christos in ticket #1431):
sys/coda/coda.h: revision 1.16
sys/coda/coda_venus.c: revision 1.28
sys/coda/coda_vnops.c: revision 1.76
Correct incomplete size checks for the coda ioctls. From Dan Rosenberg.
 1.68.22.1 25-Aug-2010  snj Pull up following revision(s) (requested by christos in ticket #1431):
sys/coda/coda.h: revision 1.16
sys/coda/coda_venus.c: revision 1.28
sys/coda/coda_vnops.c: revision 1.76
Correct incomplete size checks for the coda ioctls. From Dan Rosenberg.
 1.68.20.1 19-Jan-2009  skrll Sync with HEAD.
 1.68.12.4 11-Aug-2010  yamt sync with head.
 1.68.12.3 11-Mar-2010  yamt sync with head
 1.68.12.2 18-Jul-2009  yamt sync with head.
 1.68.12.1 04-May-2009  yamt sync with head.
 1.68.8.2 30-Dec-2008  christos dev_t format.
 1.68.8.1 29-Mar-2008  christos Welcome to the time_t=long long dev_t=uint64_t branch.
 1.68.6.1 17-Jan-2009  mjf Sync with HEAD.
 1.69.2.1 23-Jul-2009  jym Sync with HEAD.
 1.71.4.5 31-May-2011  rmind sync with head
 1.71.4.4 19-May-2011  rmind Implement sharing of vnode_t::v_interlock amongst vnodes:
- Lock is shared amongst UVM objects using uvm_obj_setlock() or getnewvnode().
- Adjust vnode cache to handle unsharing, add VI_LOCKSHARE flag for that.
- Use sharing in tmpfs and layerfs for underlying object.
- Simplify locking in ubc_fault().
- Sprinkle some asserts.

Discussed with ad@.
 1.71.4.3 05-Mar-2011  rmind sync with head
 1.71.4.2 03-Jul-2010  rmind sync with head
 1.71.4.1 16-Mar-2010  rmind Change struct uvm_object::vmobjlock to be dynamically allocated with
mutex_obj_alloc(). It allows us to share the locks among UVM objects.
 1.71.2.1 17-Aug-2010  uebayasi Sync with HEAD.
 1.78.2.1 06-Jun-2011  jruoho Sync with HEAD.
 1.79.2.1 23-Jun-2011  cherry Catchup with rmind-uvmplock merge.
 1.81.6.2 02-Jun-2012  mrg sync to latest -current.
 1.81.6.1 29-Apr-2012  mrg sync to latest -current.
 1.81.2.3 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.81.2.2 30-Oct-2012  yamt sync with head
 1.81.2.1 23-May-2012  yamt sync with head.
 1.90.4.1 18-May-2014  rmind sync with head
 1.90.2.2 03-Dec-2017  jdolecek update from HEAD
 1.90.2.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.96.2.1 10-Aug-2014  tls Rebase.
 1.98.2.4 28-Aug-2017  skrll Sync with HEAD
 1.98.2.3 05-Oct-2016  skrll Sync with HEAD
 1.98.2.2 06-Jun-2015  skrll Sync with HEAD
 1.98.2.1 06-Apr-2015  skrll Sync with HEAD
 1.102.2.1 26-Apr-2017  pgoyette Sync with HEAD
 1.103.2.1 21-Apr-2017  bouyer Sync with HEAD
 1.106.10.3 21-Apr-2020  martin Sync with HEAD
 1.106.10.2 08-Apr-2020  martin Merge changes from current as of 20200406
 1.106.10.1 10-Jun-2019  christos Sync with HEAD
 1.106.8.1 26-Nov-2018  pgoyette Sync with HEAD, resolve a couple of conflicts
 1.106.2.1 14-Nov-2020  martin Pull up following revision(s) (requested by hannken in ticket #1622):

sys/coda/coda_vnops.c: revision 1.114 (patch)
sys/coda/coda.h: revision 1.21 (patch)

Rewrite coda_readdir() to directly process the container file.

Passing this operation down to the file system holding the container
cannot work for anything but UFS and UFS doesn't allow reading
directory from a plain file since ~2015.

Fixes PR kern/55775 Coda client, its in-kernel part, opens wrong files ...
 1.107.6.2 29-Feb-2020  ad Sync with head.
 1.107.6.1 17-Jan-2020  ad Sync with head.
 1.107.4.1 14-Nov-2020  martin Pull up following revision(s) (requested by hannken in ticket #1131):

sys/coda/coda_vnops.c: revision 1.114 (patch)
sys/coda/coda.h: revision 1.21 (patch)

Rewrite coda_readdir() to directly process the container file.

Passing this operation down to the file system holding the container
cannot work for anything but UFS and UFS doesn't allow reading
directory from a plain file since ~2015.

Fixes PR kern/55775 Coda client, its in-kernel part, opens wrong files ...
 1.110.4.1 20-Apr-2020  bouyer Sync with HEAD
 1.112.2.1 14-Dec-2020  thorpej Sync w/ HEAD.
 1.114.4.1 01-Aug-2021  thorpej Sync with HEAD.
 1.17 14-Nov-2020  hannken Add coda_pathconf() always returning EINVAL.
 1.16 02-Aug-2012  christos branches: 1.16.52;
- move debugging functions to vcoda so modules with -DDEBUG link
- fix writing to coda files. this is probably not the right way to do
this, but it satisfies the locking protocol:
1. Sometimes coda_open() is called with an unlocked vnode which
does not satisfy the locking protocol. Lock it for now. We
need to find out why this happens
2. VFS_VGET sometimes returns the container vnode unlocked. What
is the locking protocol for VFS_VGET? We also lock it here.
 1.15 28-Jul-2012  matt -fno-common fallout.
 1.14 28-Apr-2012  christos Fixes from get/putpages from rmind.
In grab vnode, share the lock of the coda vnode with the underlying vnode,
so that the locking protocol works.
 1.13 14-May-2006  elad branches: 1.13.98; 1.13.102;
integrate kauth.
 1.12 11-Dec-2005  christos branches: 1.12.4; 1.12.6; 1.12.8; 1.12.10; 1.12.12;
merge ktrace-lwp.
 1.11 30-Aug-2005  xtraeme * Remove __P()
* Use ANSI function declarations
 1.10 26-Feb-2005  perry branches: 1.10.4;
nuke trailing whitespace
 1.9 29-Jun-2003  fvdl branches: 1.9.2; 1.9.10; 1.9.12;
Back out the lwp/ktrace changes. They contained a lot of colateral damage,
and need to be examined and discussed more.
 1.8 29-Jun-2003  thorpej 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.
 1.7 28-Jun-2003  darrenr 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
 1.6 03-Jul-2001  chs add coda_{get,put}pages so that mmap works.
 1.5 17-Oct-1999  cgd branches: 1.5.12;
nuke RCS "Log" tags. They cause problems for third parties importing
our sources, and for NetBSD release engineering folks. (They've
been against the NetBSD coding style forever, but they crept in anyway.)
 1.4 15-Sep-1998  rvb branches: 1.4.12;
Final piece of rename cfs->coda
 1.3 12-Sep-1998  rvb Change cfs/CFS in symbols, strings and constants to coda/CODA
to avoid fs conflicts.
 1.2 08-Sep-1998  rvb Pass2 complete
 1.1 29-Aug-1998  rvb branches: 1.1.1;
Initial revision
 1.1.1.1 29-Aug-1998  rvb Very Preliminary Coda
 1.4.12.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.5.12.1 24-Aug-2001  nathanw Catch up with -current.
 1.9.12.1 19-Mar-2005  yamt sync with head. xen and whitespace. xen part is not finished.
 1.9.10.1 29-Apr-2005  kent sync with -current
 1.9.2.6 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.9.2.5 04-Mar-2005  skrll Sync with HEAD.

Hi Perry!
 1.9.2.4 24-Oct-2004  skrll coda_grab_vnode no longer requires a struct lwp * argument.
 1.9.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.9.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.9.2.1 02-Jul-2003  darrenr Apply the aborted ktrace-lwp changes to a specific branch. This is just for
others to review, I'm concerned that patch fuziness may have resulted in some
errant code being generated but I'll look at that later by comparing the diff
from the base to the branch with the file I attempt to apply to it. This will,
at the very least, put the changes in a better context for others to review
them and attempt to tinker with removing passing of 'struct lwp' through
the kernel.
 1.10.4.1 21-Jun-2006  yamt sync with head.
 1.12.12.1 24-May-2006  tron Merge 2006-05-24 NetBSD-current into the "peter-altq" branch.
 1.12.10.1 08-Mar-2006  elad Adapt to kernel authorization KPI.
 1.12.8.1 24-May-2006  yamt sync with head.
 1.12.6.1 01-Jun-2006  kardel Sync with head.
 1.12.4.1 09-Sep-2006  rpaulo sync with head
 1.13.102.1 29-Apr-2012  mrg sync to latest -current.
 1.13.98.2 30-Oct-2012  yamt sync with head
 1.13.98.1 23-May-2012  yamt sync with head.
 1.16.52.1 14-Dec-2020  thorpej Sync w/ HEAD.
 1.6 02-Mar-2010  pooka Don't generate unused fs_thefs.h headers.
 1.5 11-Dec-2005  christos branches: 1.5.74; 1.5.96;
merge ktrace-lwp.
 1.4 27-Aug-2003  drochner update for the protocol used by coda>=6,
patches supplied by the coda-6.0.2 distribution,
with small changes to support the old protocol optionally
(options CODA_COMPAT_5)
 1.3 26-Dec-2002  jdolecek branches: 1.3.2;
fix incorrectly introduced coda_psdev.c name change from previous
revision; it was part of local devel change I did not intend to commit
 1.2 26-Dec-2002  jdolecek slightly tweak so that the file for vcoda pseudo device is next to
pseudo device declaration
 1.1 16-Apr-2002  thorpej branches: 1.1.6; 1.1.8;
Cleanup how file system configuration information is declared, grouping
related information together, with the file system code itself.

This is just low-hanging fruit -- more to come.
 1.1.8.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.8.1 16-Apr-2002  jdolecek file files.coda was added on branch kqueue on 2002-06-23 17:43:38 +0000
 1.1.6.3 29-Dec-2002  thorpej Sync with HEAD.
 1.1.6.2 20-Jun-2002  nathanw Catch up to -current.
 1.1.6.1 16-Apr-2002  nathanw file files.coda was added on branch nathanw_sa on 2002-06-20 03:42:41 +0000
 1.3.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.3.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.3.2.1 03-Aug-2004  skrll Sync with HEAD
 1.5.96.1 30-Apr-2010  uebayasi Sync with HEAD.
 1.5.74.1 11-Mar-2010  yamt sync with head

RSS XML Feed