summaryrefslogtreecommitdiff
path: root/sys/nfs/nfs_subs.c
AgeCommit message (Collapse)Author
2015-06-16Store a unique ID, an interface index, rather than a pointer to theMartin Pieuchot
receiving interface in the packet header of every mbuf. The interface pointer should now be retrieved when necessary with if_get(). If a NULL pointer is returned by if_get(), the interface has probably been destroy/removed and the mbuf should be freed. Such mechanism will simplify garbage collection of mbufs and limit problems with dangling ifp pointers. Tested by jmatthew@ and krw@, discussed with many. ok mikeb@, bluhm@, dlg@
2015-04-17Tweaks utimensat/futimens handling to always update ctime, even when bothPhilip Guenther
atime and mtime are UTIME_OMIT (at least for ufs, tmpfs, and ext2fs), and to correctly handle a timestamp of -1. ok millert@
2015-03-14Remove some includes include-what-you-use claims don'tJonathan Gray
have any direct symbols used. Tested for indirect use by compiling amd64/i386/sparc64 kernels. ok tedu@ deraadt@
2015-02-10First step towards making uiomove() take a size_t size argument:Miod Vallat
- rename uiomove() to uiomovei() and update all its users. - introduce uiomove(), which is similar to uiomovei() but with a size_t. - rewrite uiomovei() as an uiomove() wrapper. ok kettenis@
2015-01-17use NGROUPS_MAXTheo de Raadt
2014-12-29Explicitely include <uvm/uvm_extern.h> in order to build on variable page sizeMiod Vallat
architectures.
2014-12-23change req pool alloc to null. add prwaitok here and nfs_node_pool whichTed Unangst
is also sleeping in all callers, but already used null
2014-12-18convert one hot looking bcopy to memcpyTed Unangst
2014-12-18delete a whole mess of unnecessary caddr_t castsTed Unangst
2014-11-18move arc4random prototype to systm.h. more appropriate for most codeTed Unangst
to include that than rdnvar.h. ok deraadt dlg
2014-11-14bzero -> memsetTed Unangst
2014-09-14remove uneeded proc.h includesJonathan Gray
ok mpi@ kspillner@
2014-07-08decouple struct uvmexp into a new file, so that uvm_extern.h and sysctl.hTheo de Raadt
don't need to be married. ok guenther miod beck jsing kettenis
2013-11-27If the v_type is going to change when loading the NFS attribute cache,Joel Sing
purge the vnode from the namecache first. This prevents cache_purge() from later getting confused and trying to cache_zap() a namecache entry multiple times over, due to cache_zap() believing that the entry does not need to be removed from the vnode destinations queue. ok beck@
2013-08-13Switch time_t, ino_t, clock_t, and struct kevent's ident and dataPhilip Guenther
members to 64bit types. Assign new syscall numbers for (almost all) the syscalls that involve the affected types, including anything with time_t, timeval, itimerval, timespec, rusage, dirent, stat, or kevent arguments. Add a d_off member to struct dirent and replace getdirentries() with getdents(), thus immensely simplifying and accelerating telldir/seekdir. Build perl with -DBIG_TIME. Bump the major on every single base library: the compat bits included here are only good enough to make the transition; the T32 compat option will be burned as soon as we've reached the new world are are happy with the snapshots for all architectures. DANGER: ABI incompatibility. Updating to this kernel requires extra work or you won't be able to login: install a snapshot instead. Much assistance in fixing userland issues from deraadt@ and tedu@ and build assistance from todd@ and otto@
2011-07-04move the specfs code to a place people can see it; ok guenther thib krwTheo de Raadt
2010-12-21Bring back the "End the VOP experiment." diff, naddy's issues whereThordur I. Bjornsson
unrelated, and his alpha is much happier now. OK deraadt@
2010-09-10Backout the VOP diff until the issues naddy was seeing on alpha (gcc3)Thordur I. Bjornsson
have been resolved.
2010-09-09Rename lookup/relookup to vfs_lookup/vfs_relookup.Thordur I. Bjornsson
OK oga@, beck@, matthew@
2010-09-06End the VOP experiment. Instead of the ridicolusly complicated operationThordur I. Bjornsson
vector setup that has questionable features (that have, as far as I can tell never been used in practice, atleast not in OpenBSD), remove all the gunk and favor a simple struct full of function pointers that get set directly by each of the filesystems. Removes gobs of ugly code and makes things simpler by a magnitude. The only downside of this is that we loose the vnoperate feature so the spec/fifo operations of the filesystems need to be kept in sync with specfs and fifofs, this is no big deal as the API it self is pretty static. Many thanks to armani@ who pulled an earlier version of this diff to current after c2k10 and Gabriel Kihlman on tech@ for testing. Liked by many. "come on, find your balls" deraadt@.
2010-05-19clean up a few things that where left to rot after bob's vfs cache work.Thordur I. Bjornsson
sync a few comments to reality (or remove them), remove the cn_hash member from struct componentname, spacing. ok beck@
2009-10-19antsyJonathan Gray
no binary change apart from nfsm_reqhead() which is clearly correct. ok thib@
2009-09-02Backout the asyncio/aiod change, as it causes buf's to get hung.Thordur I. Bjornsson
problem noticed by deraadt@ ok beck@
2009-08-25move to having requests on a per nfsmount tailq instead of one global one.Thordur I. Bjornsson
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@
2009-08-20Rework the way we do async I/O in nfs. Introduce separate buf queues forThordur I. Bjornsson
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@.
2009-08-13Teach nfsm_fhtom about nfsm_info structsBret Lambert
ok thib@
2009-08-13change version 3 post-operation attribute building function to notBret Lambert
use mbufs directly, but the shiny new nfsm_info struct ok thib@
2009-08-10Use an RB tree instead of a hashtable for fh/node lookups.Thordur I. Bjornsson
Idea from NetBSD. OK blambert@
2009-08-10Remove the v2 writegather code. It did help alot back in the 80sThordur I. Bjornsson
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@
2009-08-04group all of the on-stack variables that are uses by the nfsm_macrosThordur I. Bjornsson
to keep the data munging "state" into an nfsm_info structure. Each function now has this structure on its stack, and it and its members are now passed around so that the macros/functions can work there magic. this will make removing the nfsm_* macros way easier. Idea/code picked up from DragonflyBSD. Tested by krw@, jacekm@ and myself. OK blambert@.
2009-07-20(struct foo *)0 -> NULL, every where I could find it.Thordur I. Bjornsson
OK blambert@
2009-07-09Remove the VREF() macro and replaces all instances with a call to verf(),Thordur I. Bjornsson
which is exactly what the macro does. Macro's that are nothing more then: #define FUNCTION(arg) function(arg) are almost always pointless and should go away. OK blambert@ Agreed by many.
2009-05-30Remove unused procnums (NQNFS leftovers) and cleanup.Thordur I. Bjornsson
OK blambert@ sometime ago
2009-05-22retire the nfs rtt log code, this isnt really all thatThordur I. Bjornsson
usefull, and has been disabled for a long long time. Cleans house a bit. OK blambert@
2009-04-13Convert macros to functions to reduce kernel memory usage.Bret Lambert
In snaps for a while (way too long, according to deraadt@)
2009-03-30Convert a sizeable macro to a much-leaner function. Saves (IIRC) 5k on i386.Bret Lambert
In snaps for a while.
2009-01-24Use a timespec instead of a time_t for the clients nfsnodeThordur I. Bjornsson
mtime, gives us better granularity, helps with cache consistency. Idea lifted from NetBSD. OK blambert@
2009-01-20Start reworking NFS client mbuf handling by creating an interface whichBret Lambert
requires well-formed mbuf chains to work. Existing function name is now a wrapper to this interface. Much, much more work to follow which will build on this. Truly change we can believe in. ok thib@, who would have preferred this in two commits, but I'm impatient :) testing on multiple arches (i386, arm, amd64, and sparc64 at least) by many, thanks to all who did so
2009-01-13Trivial lvalue abuse fixes, no binary changes.Alexander Yurchenko
ok millert@ tedu@
2008-12-24fix a typo made in last commit, also slightly better wording forThordur I. Bjornsson
another comment.
2008-12-24Replace the TRUE/FALSE defines with 1/0 respectively. This doesn'tThordur I. Bjornsson
hurt readability and it was just plain annoying seeing them defined in every other .c file. OK blambert@
2008-11-24use the shiny new nitems macroThordur I. Bjornsson
2008-08-25Correctly invalidate attribute cache entries in case the vnode modePedro Martelletto
changes, okay beck@, tedu@ and thib@.
2008-08-08After beck@ changed the way nfsiod's are notified of work, theBret Lambert
nfs_iodwant array became unused. Garbage collect and free up a few bytes. ok thib@
2008-06-15unroll the NFSMADV() macro and nuke itThordur I. Bjornsson
ok blambert@
2008-06-14use nfsm_padlen() where appropriate;Thordur I. Bjornsson
ok blambert@
2008-06-13Kill one-liner macro which obfuscated mbuf pointer assignment.Bret Lambert
Rescue nfsm_reqhead macro name and rename nfsm_reqh. End of one-liners from nfsm_subs.h. ok thib@
2008-06-13remove rpc_auth_kerb variable, its now unused...Thordur I. Bjornsson
2008-06-13Replace one-line macro which only obfuscated the fact thatBret Lambert
the function it was named after took 4 arguments instead of 2. "get it in; get it in; get it in" thib@
2008-06-12Remove now-vestigial bpos pointer from NFS. For building outgoingBret Lambert
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...)