1
0
mirror of https://github.com/openbsd/src.git synced 2025-01-10 06:47:55 -08:00
Commit Graph

41 Commits

Author SHA1 Message Date
blambert
eaaf7dadba Kill one-liner macro which obfuscated mbuf pointer assignment.
Rescue nfsm_reqhead macro name and rename nfsm_reqh.

End of one-liners from nfsm_subs.h.

ok thib@
2008-06-13 22:11:32 +00:00
blambert
5a0357639a Replace one-line macro which only obfuscated the fact that
the function it was named after took 4 arguments instead of 2.

"get it in; get it in; get it in" thib@
2008-06-13 03:49:26 +00:00
blambert
65faa1c0af 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...)
2008-06-12 20:24:06 +00:00
thib
c7d932a0ae o Avoid putting duplicate entries into the name cache,
add a function to handle cache_enter()'s for us since
  we need to update the appropriate timestamps so we don't
  miss on lookup;
o Do not purge the dvp in nfs_rmdir(), since there's no need;
o cache the new entry created in nfs_mkdir();
o Do caching of the access modes, this drastically reduces the
  amount of over the wire access RPCs we do in the NFSv3 case.

This diff was written by Pedro Martelletto, sometime in 2004.
A lot of people have been running with it at one time or another,
this includes at least markus and matthieu.

OK deraadt@, blambert@
2008-06-10 22:59:09 +00:00
djm
f1b31bc741 nfsm_get_xid() => nfs_get_xid() after thib@ informed me that the
nfsm_* functions are for mbufs
2008-06-09 22:49:15 +00:00
djm
ca6e56f20e Introduce a facility to generate unpredictable 32 bit numbers with
near maximal (2^32) cycle times. These are useful for network
IDs in cases where there are negative consequences to ID prediction
and/or reuse.

Use the idgen32() functions to generate IPv6 IDs and NFS client/server
XIDs.

Pseudorandom permutation code in crypto/idgen.c based on public
domain skip32.c from Greg Rose.

feedback & ok thib@ deraadt@
2008-06-09 22:47:41 +00:00
thib
044b565ee2 remove the "kerbflag" argument from nfsrv_fhtovp() and nfs_namei()
(the latter only had it to pass it to nfsrv_fhtovp()).

appropriate cleanup also;

ok blambert@
2008-04-22 18:53:34 +00:00
blambert
63fd1d0759 Rework NFS mbuf write routines:
nfsm_uiotombuf():
- no meaningful return, function becomes void
- replace frankensteined uiomove/MGET with actual call to uiomove

nfsm_strtmbuf():
- no meaningful return, becomes void
- rename and reorder parameters to be consistent with other functions
- becomes wrapper to nfsm_uiotombuf

nfsm_buftombuf():
- new function; unused but slated for future use
- wrapper to nfsm_uiotombuf

As a bonus, making these functions void removes much unneeded code and
garbage collects `magic' variable t2 which was only used (invisibly)
by the macros from nfsm_subs.h

Preps the way for removing much more NFS goo...

testing by myself, thib@ and merdely@
ok thib@
2008-04-14 13:46:13 +00:00
blambert
1d99196e7b More NFS-related kernel shrinkage...
When you use a macro ~200 times, it tends to bloat your code, so make a
function out of it.

Shaves ~8.5 kB from my kernel.

ok thib@, "looks good" krw@

In snaps for 1+ week with no negative reports.
2008-01-06 17:38:23 +00:00
blambert
ebaba6ec21 convert massive (expanded to 150+ lines) nfsm_v3attr macro to a function
shaves an insane (~8K) amount from an i386 kernel

ok thib@
2007-12-13 18:32:55 +00:00
thib
b4f07eb061 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@
2007-10-28 14:12:41 +00:00
thib
e255ace58d Remove now unused functions dealing with kerberos
authentication.

ok beck@
2007-10-14 19:34:41 +00:00
thib
37c1538aa1 Remove alot of dead kerberos code (add sane comments too).
Cleanup and partly redo the way we create the RPC header, by having
nfsm_rpchead() do a bit more work. Right now this is pretty RPCAUTH_UNIX
centric, but since it is the only auth method we support right now thats
fine.

Make sure we can never generate a zero xid, thats forbidden by the RFC.

Misc cleanup.

tested by a few.
2007-10-13 17:38:43 +00:00
thib
1f7dd9ae1d remove a whole bunch of duplicate function
prototypes.
(survived build/release on macppc/amd64).

ok pedro@
2007-06-21 22:59:49 +00:00
thib
9cc4c30ad3 daddr_t -> daddr64_t;
Basically the usage of daddr_t was to math out arguments to
nfs_getcacheblk, wich calls getblk();

ok deraadt@
2007-06-01 07:13:47 +00:00
thib
fad52cc095 Replace the nfskevq_lock lockmgr lock with rwlock.
Replace nfs_kqinit() wich just calls lockinit with
RWLOCK_INITALIZER. Assorted cleanup.

ok tedu@
"reads good" art@
2007-04-19 14:46:44 +00:00
thib
620fc945c8 Move the declaration of VN_KNOTE() into vnode.h instead of having
multiple defines all over;

ok tedu@
2007-04-13 17:09:22 +00:00
thib
34d9ef7e9e remove duplicate prototype;
ok pedro@
2007-04-11 12:18:54 +00:00
marius
e4c869ec83 NFS commit coalescion: instead of sending a commit for each block, coalesce
these into larger ranges wherever possible.

this should speed up NFS writes quite a bit.

ok art@ millert@ pedro@ tedu@
2004-08-03 17:11:48 +00:00
marius
c667ebb95e kqueue support for NFS, adapted from netbsd.
ok art@ pedro@, "get it in" deraadt@
2004-07-21 17:30:55 +00:00
nate
6c90fdaf69 Remove unused function parameter 'cache' from nfs_rephead
ok costa@
2002-07-03 20:57:00 +00:00
ericj
4114e07e11 use hash.h for nfs_hash as well as namei's hash
ok art@ costa@
2002-07-02 04:23:25 +00:00
csapuntz
6aaa5f1f64 nfs_realign from FreeBSD. The old code was over-optimized, occasionally overwriting
other parts of a TCP stream, occasionally dereferencing NULL pointers
2002-04-10 18:16:46 +00:00
millert
c4071fd138 First round of __P removal in sys 2002-03-14 01:26:25 +00:00
art
1414b0faee 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.
2001-12-19 08:58:05 +00:00
art
5af79db257 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.
2001-11-27 05:27:11 +00:00
art
e3c7f0cd3a Remove creds from struct buf, move the creds that nfs need into the nfs node.
While in the area, convert nfs node allocation from malloc to pool and do
some cleanups.
Based on the UBC changes in NetBSD. niklas@ ok.
2001-11-15 23:15:15 +00:00
csapuntz
69b4bf0b40 Remove NQNFS 2001-06-25 03:28:01 +00:00
csapuntz
ade437a34d Get rid of old directory caching scheme which caused persistent duplicates.
Still not correct for NFSv3 but that's hard.
2001-06-25 02:15:46 +00:00
art
d479b130b9 Remove redundant declaration of nfs_init. 2000-06-30 01:06:02 +00:00
mickey
496b1c38ca 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.
2000-05-19 16:36:03 +00:00
assar
ea14d14a65 removed prototype of sys_getfh - it is now a normal syscall 2000-02-07 04:48:42 +00:00
csapuntz
49e90f704e Rename vop_revoke, vn_bwrite, vop_noislocked, vop_nolock, vop_nounlock
to be vop_generic_revoke, vop_generic_bwrite, vop_generic_islocked,
vop_generic_lock and vop_generic_unlock.

Create vop_generic_abortop and propogate change to all file systems.

Fix PR/371.

Get rid of locking in NULLFS (should be mostly unnecessary now except for
forced unmounts).
1998-08-06 19:34:18 +00:00
niklas
6de36799d6 Changes made for GCC 2.8 -Wall pleasures 1998-02-22 01:21:31 +00:00
csapuntz
07feb63c29 Updates for VFS Lite 2 + soft update. 1997-11-06 05:58:00 +00:00
deraadt
f6d35f956a back out vfs lite2 till after 2.2 1997-10-06 20:19:26 +00:00
csapuntz
6e175d504b VFS Lite2 Changes 1997-10-06 15:05:18 +00:00
deraadt
9b741727d9 better nfsrv_access() control, from netbsd 1996-12-14 15:36:50 +00:00
deraadt
18770882b7 fix NFSSERVER w/o NFSCLIENT; netbsd pr#1780, cgd@netbsd (yes, a 10month
old PR and the fix is mostly unchanged).
1996-09-21 11:06:08 +00:00
mickey
78530d4627 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 ?..
1996-03-31 13:15:23 +00:00
niklas
370decb4f9 From NetBSD: merge with 960217 (still NFSv2) 1996-02-29 09:24:48 +00:00