History log of /openbsd-current/sys/nfs/nfs_srvcache.c
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 1.31 01-May-2024 jsg

remove unneeded includes
ok miod@ mpi@


# 1.30 30-Apr-2024 miod

Constify NFS data whenever possible. Also make a few more const data static.

ok jsg@ semarie@


Revision tags: 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.29 05-Dec-2019 mpi

Convert infinite sleeps to tsleep_nsec(9).

ok jca@


Revision tags: OPENBSD_5_9_BASE OPENBSD_6_0_BASE OPENBSD_6_1_BASE OPENBSD_6_2_BASE OPENBSD_6_3_BASE OPENBSD_6_4_BASE OPENBSD_6_5_BASE OPENBSD_6_6_BASE
# 1.28 28-Aug-2015 deraadt

fairly simple sizes for free(); ok tedu


Revision tags: OPENBSD_5_8_BASE
# 1.27 14-Mar-2015 jsg

Remove some includes include-what-you-use claims don't
have any direct symbols used. Tested for indirect use by compiling
amd64/i386/sparc64 kernels.

ok tedu@ deraadt@


Revision tags: OPENBSD_5_7_BASE
# 1.26 18-Nov-2014 dlg

use siphash for key lookups in all the filesystem hashes.

ok deraadt@ tedu@


# 1.25 14-Sep-2014 jsg

remove uneeded proc.h includes
ok mpi@ kspillner@


Revision tags: OPENBSD_5_6_BASE
# 1.24 12-Jul-2014 tedu

add a size argument to free. will be used soon, but for now default to 0.
after discussions with beck deraadt kettenis.


Revision tags: OPENBSD_4_6_BASE 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.23 04-Jun-2009 thib

Plug mbuf leaks in the DRC, when we reuse entries we didn't
free the mbufs the entry has (socket name, reply).

Found with dlg@'s amazing mbuf debug diff, fix is based on
the same thing in NetBSD (by yamt@netbsd.org).

OK blambert@


# 1.22 30-May-2009 thib

Remove unused procnums (NQNFS leftovers) and cleanup.

OK blambert@ sometime ago


Revision tags: OPENBSD_4_5_BASE
# 1.21 24-Dec-2008 thib

Replace the TRUE/FALSE defines with 1/0 respectively. This doesn't
hurt readability and it was just plain annoying seeing them defined
in every other .c file.

OK blambert@


# 1.20 20-Oct-2008 blambert

Be pedantically correct in freeing allocated mbufs, even upon clearing
the server cache on shutdown.

ok thib@


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

use m_freem() instead of MFREE() since we ignore the
mbuf that points to the rest of the chain (if it is a
chain).

ok blambert@


# 1.18 12-Jun-2008 blambert

Remove now-vestigial bpos pointer from NFS. For building outgoing
NFS mbufs, mbufs now contain all their internal buffer state internally,
the way god intended.

ok thib@

testing johan@ (and possibly merdely@; this diff's been around for a bit...)


# 1.17 11-Jun-2008 blambert

Canonical for() -> queue.h FOREACH macro conversions.
Also, it is historical practice to #include <sys/queue.h>
when using queue.h macros.

ok thib@ krw@

special thanks to krw@ for reminders vice violence


# 1.16 14-Apr-2008 thib

move the cache lookup code into a function, instead repeating
it twice, makes this nicer as a bonus;

From NetBSD.

tested by johan@, ok blambert@.


Revision tags: OPENBSD_4_3_BASE
# 1.15 29-Oct-2007 thib

Touch of KNF and style(9), spaces and comments.
make pretty.

ok krw@


# 1.14 28-Oct-2007 thib

Remove the "frev" argument from nfs_rephead(); and clean up the "frev"
variables, that are declared all over, since they are passed via macros
to nfs_rephead(); which doesn't do anything with it.

OK krw@


# 1.13 20-Sep-2007 thib

MALLOC/FREE -> malloc/free + M_ZERO.
Uneeded includes and casts...

ok krw@


Revision tags: OPENBSD_3_7_BASE OPENBSD_3_8_BASE OPENBSD_3_9_BASE OPENBSD_4_0_BASE OPENBSD_4_1_BASE OPENBSD_4_2_BASE
# 1.12 26-Dec-2004 miod

Use list and queue macros where applicable to make the code easier to read;
no change in compiler assembly output.


Revision tags: OPENBSD_3_6_BASE
# 1.11 16-Jul-2004 henning

kill netiso stuff here as well, millert ok


Revision tags: OPENBSD_3_4_BASE OPENBSD_3_5_BASE SMP_SYNC_A SMP_SYNC_B
# 1.10 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: OPENBSD_3_2_BASE OPENBSD_3_3_BASE UBC_SYNC_A UBC_SYNC_B
# 1.9 03-Jul-2002 nate

Remove unused function parameter 'cache' from nfs_rephead
ok costa@


Revision tags: OPENBSD_3_1_BASE
# 1.8 16-Jan-2002 ericj

use queue.h macro's
remove register


Revision tags: OPENBSD_3_0_BASE UBC_BASE
# 1.7 25-Jun-2001 csapuntz

branches: 1.7.4;
Remove NQNFS


Revision tags: OPENBSD_2_6_BASE OPENBSD_2_7_BASE OPENBSD_2_8_BASE OPENBSD_2_9_BASE SMP_BASE kame_19991208
# 1.6 28-Apr-1999 art

branches: 1.6.4;
zap the newhashinit hack.
Add an extra flag to hashinit telling if it should wait in malloc.
update all calls to hashinit.


Revision tags: OPENBSD_2_0_BASE OPENBSD_2_1_BASE OPENBSD_2_2_BASE OPENBSD_2_3_BASE OPENBSD_2_4_BASE OPENBSD_2_5_BASE
# 1.5 21-Apr-1996 deraadt

partial sync with netbsd 960418, more to come


# 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 29-Feb-1996 niklas

From NetBSD: merge with 960217 (still NFSv2)


# 1.1 18-Oct-1995 deraadt

branches: 1.1.1;
Initial revision


# 1.29 05-Dec-2019 mpi

Convert infinite sleeps to tsleep_nsec(9).

ok jca@


Revision tags: OPENBSD_5_9_BASE OPENBSD_6_0_BASE OPENBSD_6_1_BASE OPENBSD_6_2_BASE OPENBSD_6_3_BASE OPENBSD_6_4_BASE OPENBSD_6_5_BASE OPENBSD_6_6_BASE
# 1.28 28-Aug-2015 deraadt

fairly simple sizes for free(); ok tedu


Revision tags: OPENBSD_5_8_BASE
# 1.27 14-Mar-2015 jsg

Remove some includes include-what-you-use claims don't
have any direct symbols used. Tested for indirect use by compiling
amd64/i386/sparc64 kernels.

ok tedu@ deraadt@


Revision tags: OPENBSD_5_7_BASE
# 1.26 18-Nov-2014 dlg

use siphash for key lookups in all the filesystem hashes.

ok deraadt@ tedu@


# 1.25 14-Sep-2014 jsg

remove uneeded proc.h includes
ok mpi@ kspillner@


Revision tags: OPENBSD_5_6_BASE
# 1.24 12-Jul-2014 tedu

add a size argument to free. will be used soon, but for now default to 0.
after discussions with beck deraadt kettenis.


Revision tags: OPENBSD_4_6_BASE 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.23 04-Jun-2009 thib

Plug mbuf leaks in the DRC, when we reuse entries we didn't
free the mbufs the entry has (socket name, reply).

Found with dlg@'s amazing mbuf debug diff, fix is based on
the same thing in NetBSD (by yamt@netbsd.org).

OK blambert@


# 1.22 30-May-2009 thib

Remove unused procnums (NQNFS leftovers) and cleanup.

OK blambert@ sometime ago


Revision tags: OPENBSD_4_5_BASE
# 1.21 24-Dec-2008 thib

Replace the TRUE/FALSE defines with 1/0 respectively. This doesn't
hurt readability and it was just plain annoying seeing them defined
in every other .c file.

OK blambert@


# 1.20 20-Oct-2008 blambert

Be pedantically correct in freeing allocated mbufs, even upon clearing
the server cache on shutdown.

ok thib@


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

use m_freem() instead of MFREE() since we ignore the
mbuf that points to the rest of the chain (if it is a
chain).

ok blambert@


# 1.18 12-Jun-2008 blambert

Remove now-vestigial bpos pointer from NFS. For building outgoing
NFS mbufs, mbufs now contain all their internal buffer state internally,
the way god intended.

ok thib@

testing johan@ (and possibly merdely@; this diff's been around for a bit...)


# 1.17 11-Jun-2008 blambert

Canonical for() -> queue.h FOREACH macro conversions.
Also, it is historical practice to #include <sys/queue.h>
when using queue.h macros.

ok thib@ krw@

special thanks to krw@ for reminders vice violence


# 1.16 14-Apr-2008 thib

move the cache lookup code into a function, instead repeating
it twice, makes this nicer as a bonus;

From NetBSD.

tested by johan@, ok blambert@.


Revision tags: OPENBSD_4_3_BASE
# 1.15 29-Oct-2007 thib

Touch of KNF and style(9), spaces and comments.
make pretty.

ok krw@


# 1.14 28-Oct-2007 thib

Remove the "frev" argument from nfs_rephead(); and clean up the "frev"
variables, that are declared all over, since they are passed via macros
to nfs_rephead(); which doesn't do anything with it.

OK krw@


# 1.13 20-Sep-2007 thib

MALLOC/FREE -> malloc/free + M_ZERO.
Uneeded includes and casts...

ok krw@


Revision tags: OPENBSD_3_7_BASE OPENBSD_3_8_BASE OPENBSD_3_9_BASE OPENBSD_4_0_BASE OPENBSD_4_1_BASE OPENBSD_4_2_BASE
# 1.12 26-Dec-2004 miod

Use list and queue macros where applicable to make the code easier to read;
no change in compiler assembly output.


Revision tags: OPENBSD_3_6_BASE
# 1.11 16-Jul-2004 henning

kill netiso stuff here as well, millert ok


Revision tags: OPENBSD_3_4_BASE OPENBSD_3_5_BASE SMP_SYNC_A SMP_SYNC_B
# 1.10 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: OPENBSD_3_2_BASE OPENBSD_3_3_BASE UBC_SYNC_A UBC_SYNC_B
# 1.9 03-Jul-2002 nate

Remove unused function parameter 'cache' from nfs_rephead
ok costa@


Revision tags: OPENBSD_3_1_BASE
# 1.8 16-Jan-2002 ericj

use queue.h macro's
remove register


Revision tags: OPENBSD_3_0_BASE UBC_BASE
# 1.7 25-Jun-2001 csapuntz

branches: 1.7.4;
Remove NQNFS


Revision tags: OPENBSD_2_6_BASE OPENBSD_2_7_BASE OPENBSD_2_8_BASE OPENBSD_2_9_BASE SMP_BASE kame_19991208
# 1.6 28-Apr-1999 art

branches: 1.6.4;
zap the newhashinit hack.
Add an extra flag to hashinit telling if it should wait in malloc.
update all calls to hashinit.


Revision tags: OPENBSD_2_0_BASE OPENBSD_2_1_BASE OPENBSD_2_2_BASE OPENBSD_2_3_BASE OPENBSD_2_4_BASE OPENBSD_2_5_BASE
# 1.5 21-Apr-1996 deraadt

partial sync with netbsd 960418, more to come


# 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 29-Feb-1996 niklas

From NetBSD: merge with 960217 (still NFSv2)


# 1.1 18-Oct-1995 deraadt

branches: 1.1.1;
Initial revision


Revision tags: OPENBSD_5_9_BASE OPENBSD_6_0_BASE OPENBSD_6_1_BASE OPENBSD_6_2_BASE
# 1.28 28-Aug-2015 deraadt

fairly simple sizes for free(); ok tedu


Revision tags: OPENBSD_5_8_BASE
# 1.27 14-Mar-2015 jsg

Remove some includes include-what-you-use claims don't
have any direct symbols used. Tested for indirect use by compiling
amd64/i386/sparc64 kernels.

ok tedu@ deraadt@


Revision tags: OPENBSD_5_7_BASE
# 1.26 18-Nov-2014 dlg

use siphash for key lookups in all the filesystem hashes.

ok deraadt@ tedu@


# 1.25 14-Sep-2014 jsg

remove uneeded proc.h includes
ok mpi@ kspillner@


Revision tags: OPENBSD_5_6_BASE
# 1.24 12-Jul-2014 tedu

add a size argument to free. will be used soon, but for now default to 0.
after discussions with beck deraadt kettenis.


Revision tags: OPENBSD_4_6_BASE 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.23 04-Jun-2009 thib

Plug mbuf leaks in the DRC, when we reuse entries we didn't
free the mbufs the entry has (socket name, reply).

Found with dlg@'s amazing mbuf debug diff, fix is based on
the same thing in NetBSD (by yamt@netbsd.org).

OK blambert@


# 1.22 30-May-2009 thib

Remove unused procnums (NQNFS leftovers) and cleanup.

OK blambert@ sometime ago


Revision tags: OPENBSD_4_5_BASE
# 1.21 24-Dec-2008 thib

Replace the TRUE/FALSE defines with 1/0 respectively. This doesn't
hurt readability and it was just plain annoying seeing them defined
in every other .c file.

OK blambert@


# 1.20 20-Oct-2008 blambert

Be pedantically correct in freeing allocated mbufs, even upon clearing
the server cache on shutdown.

ok thib@


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

use m_freem() instead of MFREE() since we ignore the
mbuf that points to the rest of the chain (if it is a
chain).

ok blambert@


# 1.18 12-Jun-2008 blambert

Remove now-vestigial bpos pointer from NFS. For building outgoing
NFS mbufs, mbufs now contain all their internal buffer state internally,
the way god intended.

ok thib@

testing johan@ (and possibly merdely@; this diff's been around for a bit...)


# 1.17 11-Jun-2008 blambert

Canonical for() -> queue.h FOREACH macro conversions.
Also, it is historical practice to #include <sys/queue.h>
when using queue.h macros.

ok thib@ krw@

special thanks to krw@ for reminders vice violence


# 1.16 14-Apr-2008 thib

move the cache lookup code into a function, instead repeating
it twice, makes this nicer as a bonus;

From NetBSD.

tested by johan@, ok blambert@.


Revision tags: OPENBSD_4_3_BASE
# 1.15 29-Oct-2007 thib

Touch of KNF and style(9), spaces and comments.
make pretty.

ok krw@


# 1.14 28-Oct-2007 thib

Remove the "frev" argument from nfs_rephead(); and clean up the "frev"
variables, that are declared all over, since they are passed via macros
to nfs_rephead(); which doesn't do anything with it.

OK krw@


# 1.13 20-Sep-2007 thib

MALLOC/FREE -> malloc/free + M_ZERO.
Uneeded includes and casts...

ok krw@


Revision tags: OPENBSD_3_7_BASE OPENBSD_3_8_BASE OPENBSD_3_9_BASE OPENBSD_4_0_BASE OPENBSD_4_1_BASE OPENBSD_4_2_BASE
# 1.12 26-Dec-2004 miod

Use list and queue macros where applicable to make the code easier to read;
no change in compiler assembly output.


Revision tags: OPENBSD_3_6_BASE
# 1.11 16-Jul-2004 henning

kill netiso stuff here as well, millert ok


Revision tags: OPENBSD_3_4_BASE OPENBSD_3_5_BASE SMP_SYNC_A SMP_SYNC_B
# 1.10 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: OPENBSD_3_2_BASE OPENBSD_3_3_BASE UBC_SYNC_A UBC_SYNC_B
# 1.9 03-Jul-2002 nate

Remove unused function parameter 'cache' from nfs_rephead
ok costa@


Revision tags: OPENBSD_3_1_BASE
# 1.8 16-Jan-2002 ericj

use queue.h macro's
remove register


Revision tags: OPENBSD_3_0_BASE UBC_BASE
# 1.7 25-Jun-2001 csapuntz

branches: 1.7.4;
Remove NQNFS


Revision tags: OPENBSD_2_6_BASE OPENBSD_2_7_BASE OPENBSD_2_8_BASE OPENBSD_2_9_BASE SMP_BASE kame_19991208
# 1.6 28-Apr-1999 art

branches: 1.6.4;
zap the newhashinit hack.
Add an extra flag to hashinit telling if it should wait in malloc.
update all calls to hashinit.


Revision tags: OPENBSD_2_0_BASE OPENBSD_2_1_BASE OPENBSD_2_2_BASE OPENBSD_2_3_BASE OPENBSD_2_4_BASE OPENBSD_2_5_BASE
# 1.5 21-Apr-1996 deraadt

partial sync with netbsd 960418, more to come


# 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 29-Feb-1996 niklas

From NetBSD: merge with 960217 (still NFSv2)


# 1.1 18-Oct-1995 deraadt

branches: 1.1.1;
Initial revision