summaryrefslogtreecommitdiffstats
path: root/sys/nfs/nfs_vfsops.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* KNFbeck2011-07-091-13/+10
| | | | ok md5 "can't be worse" thib@
* antsyjsg2009-10-191-65/+22
| | | | | | no binary change apart from nfsm_reqhead() which is clearly correct. ok thib@
* Backout the asyncio/aiod change, as it causes buf's to get hung.thib2009-09-021-16/+13
| | | | | | problem noticed by deraadt@ ok beck@
* move to having requests on a per nfsmount tailq instead of one global one.thib2009-08-251-1/+4
| | | | | | | | | | 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@
* Rework the way we do async I/O in nfs. Introduce separate buf queues forthib2009-08-201-13/+16
| | | | | | | | | | | | | | | | 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@.
* Teach nfsm_fhtom about nfsm_info structsblambert2009-08-131-3/+3
| | | | ok thib@
* Use an RB tree instead of a hashtable for fh/node lookups.thib2009-08-101-1/+3
| | | | | | Idea from NetBSD. OK blambert@
* group all of the on-stack variables that are uses by the nfsm_macrosthib2009-08-041-22/+26
| | | | | | | | | | | | | | 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@.
* (struct foo *)0 -> NULL, every where I could find it.thib2009-07-201-3/+3
| | | | OK blambert@
* Make the callers of nfs_request() responsible for freeing the reply mbuf,thib2009-07-131-49/+46
| | | | | | | | | if the reply is an error and retire the NFS_RETERR hack. For NFSv3 mounts the flag was set and reply mbuf not freed to allow the callers to handle the post-op attributes, or just free the mbuf for NFSv2. Tested by myself and jasper@ on various arch's. OK blambert@.
* Demacro nfsm_lookup for great justice.blambert2009-06-041-3/+15
| | | | | | Thanks to ckuethe for saving much typing with a drive-by perl script. ok thib@
* give the retransmission count booking keeping a facelift,thib2009-06-021-14/+5
| | | | | | | just store the maximun amount of rexmits in one place and cleanup. Also make sure this only effects soft mounts. OK blambert@
* Convert macros to functions to reduce kernel memory usage.blambert2009-04-131-3/+3
| | | | In snaps for a while (way too long, according to deraadt@)
* Replace the TRUE/FALSE defines with 1/0 respectively. This doesn'tthib2008-12-241-5/+2
| | | | | | | hurt readability and it was just plain annoying seeing them defined in every other .c file. OK blambert@
* dont stuff nfs mount point flags into the statfs f_flags member, itsthib2008-07-281-2/+1
| | | | | | | wrong. But this was harmless anyway since sys_statfs() sets this field corrently after calling VFS_STATFS(); ok pedro@, blambert@
* nuke two bogus ARGSUSEDthib2008-07-101-2/+1
|
* Clean up some old dead code, mostly nqnfs and kerberos leftoversthib2008-07-051-2/+1
| | | | | | for uid goo, mostly zapping unused members from various structures. ok blambert@
* Replace nfsm_build/bcopy with nfsm_{buf,str}tombuf functions inblambert2008-06-141-3/+1
| | | | | | | | | filehandle -> mbuf write macros. Removes `magic' variable cp which was used only in these macros, and should lead to marginally better mbuf packing as well. `slap it in' thib@
* Kill one-liner macro which obfuscated mbuf pointer assignment.blambert2008-06-131-3/+3
| | | | | | | | Rescue nfsm_reqhead macro name and rename nfsm_reqh. End of one-liners from nfsm_subs.h. ok thib@
* Remove now-vestigial bpos pointer from NFS. For building outgoingblambert2008-06-121-3/+3
| | | | | | | | | 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...)
* Canonical for() -> queue.h FOREACH macro conversions.blambert2008-06-111-3/+3
| | | | | | | | | 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
* Plug potential mbuf leak by changing m_free to m_freem.blambert2008-04-251-2/+2
| | | | | | From NetBSD. ok thib@
* Rework NFS mbuf write routines:blambert2008-04-141-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | 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@
* Widen some struct statfs fields to support large filesystem stataotto2008-03-161-15/+13
| | | | | and add some to be able to support statvfs(2). Do the compat dance to provide backward compatibility. ok thib@ miod@
* diff missed in previous commit:deraadt2008-01-061-3/+3
| | | | | | | | | | | | | 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.
* MALLOC/FREE -> malloc/free + M_ZERO.thib2007-09-201-4/+3
| | | | | | Uneeded includes and casts... ok krw@
* Replace nfsm_reqdone and nfsm_srvdone macros inline. No binary change.blambert2007-09-111-3/+5
| | | | ok thib@
* READDIRPLUS is v3 only, bail out if the mount isnt a v3.thib2007-06-201-1/+4
| | | | | | Prevents weird things from happening. ok tedu@,pedro@
* - Remove the nm_inprog member from struct nfsmount;thib2007-06-131-37/+9
| | | | | | | | | | | NQNFS leftover. - Remove setting of the NFSMNT_DISMINPROG flag, its set and unset in the same function servering no purpose, im however going to reuse it shortly. - kill an if thats always true (NFSMNT_KERB cant be set) - misc cleanup and KNF. ok beck@
* remove some unused externs;thib2007-06-121-11/+5
| | | | | | smallish cleanup (move prototypes and externs togather). ok toby@
* remove unused members from struct nfsmount and nfsnode;thib2007-04-121-2/+1
| | | | ok pedro@
* revert vfs.nfs.privport sysctl, broke a few architecturesavsm2006-05-291-4/+1
| | | | requested by deraadt@
* Add support for NFS mounts to be from non-reserved ports:avsm2006-05-281-1/+4
| | | | | | | | - 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
* Remove unused mount list simple_lock() goopedro2006-04-191-3/+1
|
* Remove unused sw_nblks field of struct swdevt. Then, remove swapconf()miod2005-12-271-3/+1
| | | | which duplicates work done by uvm_swap_init().
* No need for vfs_busy() and vfs_unbusy() to take a process pointerpedro2005-11-301-3/+3
| | | | anymore. Testing by jolan@, thanks.
* optimize nfs_sync() a bit, by not iterating over the list of vnodespedro2005-05-221-3/+9
| | | | | belonging to a mount point if we want to skip all of them, okay art@ a couple of days ago, commit it deraadt@
* re-commit marius commit:deraadt2005-03-311-10/+1
| | | | | | | | | | > fix preposterous time warnings in the nfs client; caused by false hits > in the attribute cache > based on original fix by pedro@, ok pedro@, tedu@; testing kettenis@ was backed out because too close to release put back in now, since tree is unlocked. unfortunately it appears that even after MANY MAILS ON THIS SUBJECT, NOONE HAS DONE THIS. WTF? Noone wants to FINISH jobs anymore?
* backout nfs_subs.c rev1.51 nfs_vfsops.c rev1.54:pvalchev2005-02-011-1/+10
| | | | | | | fix preposterous time warnings in the nfs client; caused by false hits in the attribute cache too close to release, save for immediately after unlock
* fix preposterous time warnings in the nfs client; caused by false hitsmarius2005-01-241-10/+1
| | | | | | in the attribute cache based on original fix by pedro@, ok pedro@, tedu@; testing kettenis@
* First step towards more sane time handling in the kernel -- this changestholo2004-06-211-4/+4
| | | | | | | | 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@
* make sockargs take void *, combine a len check.tedu2004-04-121-2/+2
| | | | from pedro martelletto, ok markus@
* constify vfsops; tedu@ okmickey2003-08-141-2/+2
|
* Remove the advertising clause in the UCB license which Berkeleymillert2003-06-021-6/+2
| | | | rescinded 22 July 1999. Proofed by myself and Theo.
* in mountroot:mickey2002-12-111-7/+2
| | | | | | | check system clock against root atime, not mtime, since the later does not change that often and is a bad mark to sync unto. remove a bogus splnet() i've put way back in 96 w/ v3 integration. miod@ tested on diskless sparc and sparc64, mickey@ on hppa
* First round of __P removal in sysmillert2002-03-141-8/+5
|
* Sigh. The diff is out for testing for three months without a single problem.art2002-02-231-2/+2
| | | | | Two days after commit people report serious lockups all over the place. Back out nfs locking changes.
* More locking in the NFS codecsapuntz2002-02-221-2/+2
|
* theo doesn't like this codenate2002-02-101-5/+1
|
* use queue.h macro'sericj2002-01-161-25/+24
| | | | remove register