History log of /openbsd-current/sys/nfs/nfs.h
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 1.54 04-May-2024 jsg

remove some unused defines
ok miod@


Revision tags: OPENBSD_6_1_BASE OPENBSD_6_2_BASE OPENBSD_6_3_BASE OPENBSD_6_4_BASE OPENBSD_6_5_BASE OPENBSD_6_6_BASE OPENBSD_6_7_BASE OPENBSD_6_8_BASE OPENBSD_6_9_BASE OPENBSD_7_0_BASE OPENBSD_7_1_BASE OPENBSD_7_2_BASE OPENBSD_7_3_BASE OPENBSD_7_4_BASE OPENBSD_7_5_BASE
# 1.53 22-Feb-2017 mpi

Keep local definitions local.

"good work" deraadt@, ok visa@


Revision tags: OPENBSD_5_6_BASE OPENBSD_5_7_BASE OPENBSD_5_8_BASE OPENBSD_5_9_BASE OPENBSD_6_0_BASE
# 1.52 24-Mar-2014 guenther

Split the API: struct ucred remains the kernel internal structure while
struct xucred becomes the structure for syscalls (mount(2) and nfssvc(2)).

ok deraadt@ beck@


Revision tags: OPENBSD_4_7_BASE OPENBSD_4_8_BASE OPENBSD_4_9_BASE OPENBSD_5_0_BASE OPENBSD_5_1_BASE OPENBSD_5_2_BASE OPENBSD_5_3_BASE OPENBSD_5_4_BASE OPENBSD_5_5_BASE
# 1.51 02-Sep-2009 thib

Backout the asyncio/aiod change, as it causes buf's to get hung.
problem noticed by deraadt@

ok beck@


# 1.50 25-Aug-2009 thib

move to having requests on a per nfsmount tailq instead of one global one.
also make the rexmit timeout per nfsmount, and make sure to start/stop the
timer appropriately.

now the nfs_timer() only fires if there is work todo, not always at nfs_ticks
(it did, even if there where no nfsmounts in the system!).

OK blambert@


# 1.49 20-Aug-2009 thib

Rework the way we do async I/O in nfs. Introduce separate buf queues for
each mount, and when work is "found", peg an aiod to that mount todo the
I/O. Make nfs_asyncio() a bit smarter when deciding when to do asyncio
and when to force it sync, this is done by keeping the aiod's one two lists,
an "idle" and an "all" list, so asyncio is only done when there are aiods
hanging around todo it for us or are already pegged to the mount.

Idea liked by at least beck@ (and I think art@).
Extensive testing done by myself and jasper and a few others on various
arch's.

Ideas/Code from Net/Free.

OK blambert@.


# 1.48 14-Aug-2009 thib

add ddb functions to be able to show all the nfsnodes in the system
and rewrite the nfsreq code to use pool_walk().

OK beck@, blambert@


# 1.47 10-Aug-2009 thib

Use an RB tree instead of a hashtable for fh/node lookups.

Idea from NetBSD.

OK blambert@


# 1.46 10-Aug-2009 thib

Remove the v2 writegather code. It did help alot back in the 80s
but extensive performance benchmarking done by myself and jasper@
has shown that it doesn't help, at all - even on vaxens and in some
cases it makes things significantly slower.

"this excites me sexually" jetpack@
Tested by jasper@.
OK blambert@


# 1.45 14-Jul-2009 thib

don't give people any ideas. nfssvc(2) should not be used
by anyone besides nfsd(8).

ok blambert@


Revision tags: OPENBSD_4_6_BASE
# 1.44 04-Jun-2009 blambert

Add some descriptive comments, because not having to read NFS code
is good for the brain.

ok thib@


# 1.43 03-Jun-2009 thib

kill some unused defines, don't do an ifndef dance for
things that should be defined here and remove a silly
comment.


# 1.42 03-Jun-2009 thib

Lift the NFS over UDP retransmit logic from FreeBSD.

OK blambert@

FreeBSD commit message:
Refactor the NFS over UDP retransmit timeout estimation logic to allow
the estimator to be more easily tuned and maintained.

There should be no functional change except there is now a lower limit
on the retransmit timeout to prevent the client from retransmitting
faster than the server's disks can fill requests, and an upper limit
to prevent the estimator from taking to long to retransmit during a
server outage.


# 1.41 02-Jun-2009 thib

give the retransmission count booking keeping a facelift,
just store the maximun amount of rexmits in one place and
cleanup. Also make sure this only effects soft mounts.

OK blambert@


# 1.40 22-May-2009 thib

retire the nfs rtt log code, this isnt really all that
usefull, and has been disabled for a long long time.
Cleans house a bit.

OK blambert@


# 1.39 21-May-2009 thib

IO_METASYNC has been a noop since around 4.4BSD-Lite, the
idea never really caught on anywhere so retire it.

"gank this shizzle", blambert@


Revision tags: OPENBSD_4_5_BASE
# 1.38 24-Jan-2009 thib

Use a timespec for the server write deadline and procrastination
timeouts. Rrids us of the ugly cur_sec variable, and some shadows.
Also helps with granularity.

Diff from blambert@ who asked me to commit this since he's away for
some days and we wanted to put this in with the timespec changes in
the nfsnode.


# 1.37 24-Jan-2009 thib

propagate the O_EXCL flag down to the file systems, by setting
VA_EXCLUSIVE. Handle this in NFS, also in NFS use arc4random()
for the create verifier instead of an uninitialized long and
the address of the first interface (which is likely to be lo0).

Lifted from NetBSD with small tweaks;
"looks good", miod@
OK blambert@


# 1.36 18-Jan-2009 blambert

Remove unused members from struct nfsd.

ok thib@


# 1.35 12-Sep-2008 thib

zap a deprecated macro, NMOD.


# 1.34 31-Aug-2008 thib

remove the #if 0'ed NFS_ATTRTIMEO() macro since it was
replaced by a function long ago..

ok blambert@


Revision tags: OPENBSD_4_4_BASE
# 1.33 05-Jul-2008 thib

Remove R_GETONEREP and the code that checks if its set
(its never set).

"please kill it" blambert@


# 1.32 05-Jul-2008 thib

Clean up some old dead code, mostly nqnfs and kerberos leftovers
for uid goo, mostly zapping unused members from various structures.

ok blambert@


# 1.31 12-Jun-2008 thib

add a statistic bit to count how often we change async to sync

you need to upgrade nfsstat and the relevant header files

ok beck@


# 1.30 08-Jun-2008 thib

remove a bunch of kerberos definitions


# 1.29 22-Apr-2008 blambert

Add comments detailing what the SLP_* flag #define's mean

ok thib@


Revision tags: OPENBSD_4_1_BASE OPENBSD_4_2_BASE OPENBSD_4_3_BASE
# 1.28 16-Jan-2007 thib

Retire VOP_LEASE(); It was a bit for NQNFS and has
effectively been a no-op for quite some time now,
without promise for future usage.

ok pedro@
Testing by krw@ (earlier diff)
and Johan Mson Lindman (tybollt@solace.miun.se)


# 1.27 20-Sep-2006 thib

Fix the way delays between request retransmissions are calculated
in the case where NFSERR_TRYLATER is received from the server.

Adapted from NetBSD.
ok pedro@, tedu@


Revision tags: OPENBSD_4_0_BASE
# 1.26 29-May-2006 avsm

revert vfs.nfs.privport sysctl, broke a few architectures
requested by deraadt@


# 1.25 28-May-2006 avsm

Add support for NFS mounts to be from non-reserved ports:

- new sysctl vfs.nfs.privport to require NFS mount requests to be on
reserved ports when set to 1 (the default).
- mountd now automatically sets the sysctl depending on the -n flag.
- add mountd_flags to rc.conf to enable the -n flag at boot.
deraadt@ ok


Revision tags: OPENBSD_3_8_BASE OPENBSD_3_9_BASE
# 1.24 08-Jun-2005 marius

make nfsstats counters 64 bit.

ok pedro@


# 1.23 02-Apr-2005 mickey

use pool for struct nfsreq; tedu@ pedro@ ok and testing by mark patruck <mark@2ls4agd.net> on several archs


Revision tags: OPENBSD_3_6_BASE OPENBSD_3_7_BASE
# 1.22 21-Jun-2004 tholo

First step towards more sane time handling in the kernel -- this changes
things such that code that only need a second-resolution uptime or wall
time, and used to get that from time.tv_secs or mono_time.tv_secs now get
this from separate time_t globals time_second and time_uptime.

ok art@ niklas@ nordin@


Revision tags: OPENBSD_3_5_BASE SMP_SYNC_A SMP_SYNC_B
# 1.21 22-Oct-2003 jmc

typos from Jared Yanovich;
also sync with header, and change spacing a little to prevent
line breaks;


Revision tags: OPENBSD_3_4_BASE
# 1.20 02-Jun-2003 millert

Remove the advertising clause in the UCB license which Berkeley
rescinded 22 July 1999. Proofed by myself and Theo.


Revision tags: UBC_SYNC_A
# 1.19 28-Mar-2003 jmc

Ip -> IP;

ok miod@


Revision tags: OPENBSD_3_3_BASE
# 1.18 29-Oct-2002 art

Get rid of some commons.


Revision tags: OPENBSD_3_1_BASE OPENBSD_3_2_BASE UBC_SYNC_B
# 1.17 10-Feb-2002 nate

theo doesn't like this code


# 1.16 11-Jan-2002 nate

Add a new sysctl that removes the requirement for reserved ports to be
used by the nfs server.


# 1.15 19-Dec-2001 art

UBC was a disaster. It worked very good when it worked, but on some
machines or some configurations or in some phase of the moon (we actually
don't know when or why) files disappeared. Since we've not been able to
track down the problem in two weeks intense debugging and we need -current
to be stable, back out everything to a state it had before UBC.

We apologise for the inconvenience.


Revision tags: UBC_BASE
# 1.14 27-Nov-2001 art

branches: 1.14.2;
Merge in the unified buffer cache code as found in NetBSD 2001/03/10. The
code is written mostly by Chuck Silvers <chuq@chuq.com>/<chs@netbsd.org>.

Tested for the past few weeks by many developers, should be in a pretty stable
state, but will require optimizations and additional cleanups.


Revision tags: OPENBSD_3_0_BASE
# 1.13 16-Sep-2001 millert

Add some missing lengths checks when passing data from userland to
kernel. From based on NetBSD patches.


# 1.12 19-Aug-2001 art

Remove some more.


# 1.11 25-Jun-2001 csapuntz

Remove NQNFS


Revision tags: OPENBSD_2_8_BASE OPENBSD_2_9_BASE
# 1.10 22-May-2000 mickey

branches: 1.10.2; 1.10.4;
NFS_MAXID


# 1.9 19-May-2000 mickey

oops, s/niothreads/iothreads/ in FS_NFS_NAMES


# 1.8 19-May-2000 mickey

from tsarna@netbsd.org (sysctl changes to come later):
Death to nfsiod!

It is replaced by kernel threads that do the same thing. The number of
kernel threads used is set with the vfs.nfs.iothreads sysctl.


Revision tags: OPENBSD_2_4_BASE OPENBSD_2_5_BASE OPENBSD_2_6_BASE OPENBSD_2_7_BASE SMP_BASE kame_19991208
# 1.7 25-May-1998 deraadt

branches: 1.7.8;
nd_procnum should be unsigned; ovg@nusun.jinr.ru


Revision tags: OPENBSD_2_1_BASE OPENBSD_2_2_BASE OPENBSD_2_3_BASE
# 1.6 17-Dec-1996 dm

NFS attribute cache timeout mount param


Revision tags: OPENBSD_2_0_BASE
# 1.5 10-Jun-1996 deraadt

align correct for 64 bit in NWDELAYHASH


# 1.4 17-Apr-1996 mickey

Minor cleanups. Checked against Lite2.
(NetBSD's was really just a Lite2's, but w/ 64bit support)


# 1.3 31-Mar-1996 mickey

From NetBSD: NFSv3 import (tomorrow's Net's kernel)
Open's patches kept in. i'll possibly take a look at Lite2 soon,
is there smth usefull ?..


# 1.2 21-Dec-1995 deraadt

from cgd; handle 64-bit pointers and longs


# 1.1 18-Oct-1995 deraadt

branches: 1.1.1;
Initial revision


Revision tags: OPENBSD_6_1_BASE OPENBSD_6_2_BASE
# 1.53 22-Feb-2017 mpi

Keep local definitions local.

"good work" deraadt@, ok visa@


Revision tags: OPENBSD_5_6_BASE OPENBSD_5_7_BASE OPENBSD_5_8_BASE OPENBSD_5_9_BASE OPENBSD_6_0_BASE
# 1.52 24-Mar-2014 guenther

Split the API: struct ucred remains the kernel internal structure while
struct xucred becomes the structure for syscalls (mount(2) and nfssvc(2)).

ok deraadt@ beck@


Revision tags: OPENBSD_4_7_BASE OPENBSD_4_8_BASE OPENBSD_4_9_BASE OPENBSD_5_0_BASE OPENBSD_5_1_BASE OPENBSD_5_2_BASE OPENBSD_5_3_BASE OPENBSD_5_4_BASE OPENBSD_5_5_BASE
# 1.51 02-Sep-2009 thib

Backout the asyncio/aiod change, as it causes buf's to get hung.
problem noticed by deraadt@

ok beck@


# 1.50 25-Aug-2009 thib

move to having requests on a per nfsmount tailq instead of one global one.
also make the rexmit timeout per nfsmount, and make sure to start/stop the
timer appropriately.

now the nfs_timer() only fires if there is work todo, not always at nfs_ticks
(it did, even if there where no nfsmounts in the system!).

OK blambert@


# 1.49 20-Aug-2009 thib

Rework the way we do async I/O in nfs. Introduce separate buf queues for
each mount, and when work is "found", peg an aiod to that mount todo the
I/O. Make nfs_asyncio() a bit smarter when deciding when to do asyncio
and when to force it sync, this is done by keeping the aiod's one two lists,
an "idle" and an "all" list, so asyncio is only done when there are aiods
hanging around todo it for us or are already pegged to the mount.

Idea liked by at least beck@ (and I think art@).
Extensive testing done by myself and jasper and a few others on various
arch's.

Ideas/Code from Net/Free.

OK blambert@.


# 1.48 14-Aug-2009 thib

add ddb functions to be able to show all the nfsnodes in the system
and rewrite the nfsreq code to use pool_walk().

OK beck@, blambert@


# 1.47 10-Aug-2009 thib

Use an RB tree instead of a hashtable for fh/node lookups.

Idea from NetBSD.

OK blambert@


# 1.46 10-Aug-2009 thib

Remove the v2 writegather code. It did help alot back in the 80s
but extensive performance benchmarking done by myself and jasper@
has shown that it doesn't help, at all - even on vaxens and in some
cases it makes things significantly slower.

"this excites me sexually" jetpack@
Tested by jasper@.
OK blambert@


# 1.45 14-Jul-2009 thib

don't give people any ideas. nfssvc(2) should not be used
by anyone besides nfsd(8).

ok blambert@


Revision tags: OPENBSD_4_6_BASE
# 1.44 04-Jun-2009 blambert

Add some descriptive comments, because not having to read NFS code
is good for the brain.

ok thib@


# 1.43 03-Jun-2009 thib

kill some unused defines, don't do an ifndef dance for
things that should be defined here and remove a silly
comment.


# 1.42 03-Jun-2009 thib

Lift the NFS over UDP retransmit logic from FreeBSD.

OK blambert@

FreeBSD commit message:
Refactor the NFS over UDP retransmit timeout estimation logic to allow
the estimator to be more easily tuned and maintained.

There should be no functional change except there is now a lower limit
on the retransmit timeout to prevent the client from retransmitting
faster than the server's disks can fill requests, and an upper limit
to prevent the estimator from taking to long to retransmit during a
server outage.


# 1.41 02-Jun-2009 thib

give the retransmission count booking keeping a facelift,
just store the maximun amount of rexmits in one place and
cleanup. Also make sure this only effects soft mounts.

OK blambert@


# 1.40 22-May-2009 thib

retire the nfs rtt log code, this isnt really all that
usefull, and has been disabled for a long long time.
Cleans house a bit.

OK blambert@


# 1.39 21-May-2009 thib

IO_METASYNC has been a noop since around 4.4BSD-Lite, the
idea never really caught on anywhere so retire it.

"gank this shizzle", blambert@


Revision tags: OPENBSD_4_5_BASE
# 1.38 24-Jan-2009 thib

Use a timespec for the server write deadline and procrastination
timeouts. Rrids us of the ugly cur_sec variable, and some shadows.
Also helps with granularity.

Diff from blambert@ who asked me to commit this since he's away for
some days and we wanted to put this in with the timespec changes in
the nfsnode.


# 1.37 24-Jan-2009 thib

propagate the O_EXCL flag down to the file systems, by setting
VA_EXCLUSIVE. Handle this in NFS, also in NFS use arc4random()
for the create verifier instead of an uninitialized long and
the address of the first interface (which is likely to be lo0).

Lifted from NetBSD with small tweaks;
"looks good", miod@
OK blambert@


# 1.36 18-Jan-2009 blambert

Remove unused members from struct nfsd.

ok thib@


# 1.35 12-Sep-2008 thib

zap a deprecated macro, NMOD.


# 1.34 31-Aug-2008 thib

remove the #if 0'ed NFS_ATTRTIMEO() macro since it was
replaced by a function long ago..

ok blambert@


Revision tags: OPENBSD_4_4_BASE
# 1.33 05-Jul-2008 thib

Remove R_GETONEREP and the code that checks if its set
(its never set).

"please kill it" blambert@


# 1.32 05-Jul-2008 thib

Clean up some old dead code, mostly nqnfs and kerberos leftovers
for uid goo, mostly zapping unused members from various structures.

ok blambert@


# 1.31 12-Jun-2008 thib

add a statistic bit to count how often we change async to sync

you need to upgrade nfsstat and the relevant header files

ok beck@


# 1.30 08-Jun-2008 thib

remove a bunch of kerberos definitions


# 1.29 22-Apr-2008 blambert

Add comments detailing what the SLP_* flag #define's mean

ok thib@


Revision tags: OPENBSD_4_1_BASE OPENBSD_4_2_BASE OPENBSD_4_3_BASE
# 1.28 16-Jan-2007 thib

Retire VOP_LEASE(); It was a bit for NQNFS and has
effectively been a no-op for quite some time now,
without promise for future usage.

ok pedro@
Testing by krw@ (earlier diff)
and Johan Mson Lindman (tybollt@solace.miun.se)


# 1.27 20-Sep-2006 thib

Fix the way delays between request retransmissions are calculated
in the case where NFSERR_TRYLATER is received from the server.

Adapted from NetBSD.
ok pedro@, tedu@


Revision tags: OPENBSD_4_0_BASE
# 1.26 29-May-2006 avsm

revert vfs.nfs.privport sysctl, broke a few architectures
requested by deraadt@


# 1.25 28-May-2006 avsm

Add support for NFS mounts to be from non-reserved ports:

- new sysctl vfs.nfs.privport to require NFS mount requests to be on
reserved ports when set to 1 (the default).
- mountd now automatically sets the sysctl depending on the -n flag.
- add mountd_flags to rc.conf to enable the -n flag at boot.
deraadt@ ok


Revision tags: OPENBSD_3_8_BASE OPENBSD_3_9_BASE
# 1.24 08-Jun-2005 marius

make nfsstats counters 64 bit.

ok pedro@


# 1.23 02-Apr-2005 mickey

use pool for struct nfsreq; tedu@ pedro@ ok and testing by mark patruck <mark@2ls4agd.net> on several archs


Revision tags: OPENBSD_3_6_BASE OPENBSD_3_7_BASE
# 1.22 21-Jun-2004 tholo

First step towards more sane time handling in the kernel -- this changes
things such that code that only need a second-resolution uptime or wall
time, and used to get that from time.tv_secs or mono_time.tv_secs now get
this from separate time_t globals time_second and time_uptime.

ok art@ niklas@ nordin@


Revision tags: OPENBSD_3_5_BASE SMP_SYNC_A SMP_SYNC_B
# 1.21 22-Oct-2003 jmc

typos from Jared Yanovich;
also sync with header, and change spacing a little to prevent
line breaks;


Revision tags: OPENBSD_3_4_BASE
# 1.20 02-Jun-2003 millert

Remove the advertising clause in the UCB license which Berkeley
rescinded 22 July 1999. Proofed by myself and Theo.


Revision tags: UBC_SYNC_A
# 1.19 28-Mar-2003 jmc

Ip -> IP;

ok miod@


Revision tags: OPENBSD_3_3_BASE
# 1.18 29-Oct-2002 art

Get rid of some commons.


Revision tags: OPENBSD_3_1_BASE OPENBSD_3_2_BASE UBC_SYNC_B
# 1.17 10-Feb-2002 nate

theo doesn't like this code


# 1.16 11-Jan-2002 nate

Add a new sysctl that removes the requirement for reserved ports to be
used by the nfs server.


# 1.15 19-Dec-2001 art

UBC was a disaster. It worked very good when it worked, but on some
machines or some configurations or in some phase of the moon (we actually
don't know when or why) files disappeared. Since we've not been able to
track down the problem in two weeks intense debugging and we need -current
to be stable, back out everything to a state it had before UBC.

We apologise for the inconvenience.


Revision tags: UBC_BASE
# 1.14 27-Nov-2001 art

branches: 1.14.2;
Merge in the unified buffer cache code as found in NetBSD 2001/03/10. The
code is written mostly by Chuck Silvers <chuq@chuq.com>/<chs@netbsd.org>.

Tested for the past few weeks by many developers, should be in a pretty stable
state, but will require optimizations and additional cleanups.


Revision tags: OPENBSD_3_0_BASE
# 1.13 16-Sep-2001 millert

Add some missing lengths checks when passing data from userland to
kernel. From based on NetBSD patches.


# 1.12 19-Aug-2001 art

Remove some more.


# 1.11 25-Jun-2001 csapuntz

Remove NQNFS


Revision tags: OPENBSD_2_8_BASE OPENBSD_2_9_BASE
# 1.10 22-May-2000 mickey

branches: 1.10.2; 1.10.4;
NFS_MAXID


# 1.9 19-May-2000 mickey

oops, s/niothreads/iothreads/ in FS_NFS_NAMES


# 1.8 19-May-2000 mickey

from tsarna@netbsd.org (sysctl changes to come later):
Death to nfsiod!

It is replaced by kernel threads that do the same thing. The number of
kernel threads used is set with the vfs.nfs.iothreads sysctl.


Revision tags: OPENBSD_2_4_BASE OPENBSD_2_5_BASE OPENBSD_2_6_BASE OPENBSD_2_7_BASE SMP_BASE kame_19991208
# 1.7 25-May-1998 deraadt

branches: 1.7.8;
nd_procnum should be unsigned; ovg@nusun.jinr.ru


Revision tags: OPENBSD_2_1_BASE OPENBSD_2_2_BASE OPENBSD_2_3_BASE
# 1.6 17-Dec-1996 dm

NFS attribute cache timeout mount param


Revision tags: OPENBSD_2_0_BASE
# 1.5 10-Jun-1996 deraadt

align correct for 64 bit in NWDELAYHASH


# 1.4 17-Apr-1996 mickey

Minor cleanups. Checked against Lite2.
(NetBSD's was really just a Lite2's, but w/ 64bit support)


# 1.3 31-Mar-1996 mickey

From NetBSD: NFSv3 import (tomorrow's Net's kernel)
Open's patches kept in. i'll possibly take a look at Lite2 soon,
is there smth usefull ?..


# 1.2 21-Dec-1995 deraadt

from cgd; handle 64-bit pointers and longs


# 1.1 18-Oct-1995 deraadt

branches: 1.1.1;
Initial revision