summaryrefslogtreecommitdiff
path: root/sys/nfs
AgeCommit message (Collapse)Author
2009-07-22Instead of calculating a number of seconds to sleep, tsleep()ing onBret Lambert
lbolt and waking up every second and checking to see if the correct number of seconds has passed, just calculate the timeout once and pass that to tsleep(). ok thib@
2009-07-22remove a comment thats part lie and part stating the obvious.Thordur I. Bjornsson
ok blambert@
2009-07-20(struct foo *)0 -> NULL, every where I could find it.Thordur I. Bjornsson
OK blambert@
2009-07-20For memory that gets allocated for every NFS request, pools make moreBret Lambert
sense than malloc. ok thib@, who says the puffin still gets it either way
2009-07-18if -> in, and the sentance makes more sense.Thordur I. Bjornsson
2009-07-18Fixes for the NFSERR_RETERR commit.Thordur I. Bjornsson
- Make sure to set the mbuf pointers and the dpos pointer correctly in nfs_request() before returning an error. - Fix potential mbufs leaks in nfs_{read,write}rpc for v2. The reply mbuf was not being freed before the jump to nfsmout. - Reorder error handling to prevent an error case being treated as a non-error case. Fixes issues noticed by sthen@ and ajacoutot@. Tested by both of them. Reviewd by oga@ OK blambert@
2009-07-17Initialize a variable that was previously using a mystery value inBret Lambert
some error cases ok thib@
2009-07-14don't give people any ideas. nfssvc(2) should not be usedThordur I. Bjornsson
by anyone besides nfsd(8). ok blambert@
2009-07-13Make the callers of nfs_request() responsible for freeing the reply mbuf,Thordur I. Bjornsson
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@.
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-07-08remove redundant comment.Thordur I. Bjornsson
OK blambert@
2009-06-25backout the buf_acquire() does the bremfree() since all callersThordur I. Bjornsson
where doing bremfree() befure calling buf_acquire(). This is causing us headache pinning down a bug that showed up when deraadt@ too cvs to current, and will have to be done anyway as a preperation for backouts. OK deraadt@
2009-06-23- /dev/drum is long gone; sync comment with realityJasper Lievisse Adriaanse
ok thib@
2009-06-06Don't allocate an mbuf cluster without checking to see if it willBret Lambert
actually get us anything. ok thib@
2009-06-06Consolidate error handling in read case.Bret Lambert
ok thib@
2009-06-06All caller of buf_acquire were doing bremfree before the call.Artur Grabowski
Just put it in the buf_acquire function. oga@ ok
2009-06-06Consolidate error handling code. Much less atrocious than before.Bret Lambert
"get it in" thib@
2009-06-06turdshine previousThordur I. Bjornsson
2009-06-05bring back rev1.70Thordur I. Bjornsson
2009-06-05revert to 1.67 to unbreak NFS writes; ok beck@ thib@Christian Weisgerber
2009-06-05- make this a lot more readable; no binary changeJasper Lievisse Adriaanse
ok thib@
2009-06-05EPERM from VOP_ACCESS() is always an error, so don't hide it.Thordur I. Bjornsson
Diff from FreeBSD. OK blambert@
2009-06-04typo; init -> in itBret Lambert
ok thib@
2009-06-04the following:Bret Lambert
error = foo(); if (!error) bar(); is an alien construct; replace with one from this planet ok thib@
2009-06-04Move code that logically belongs together to be together.Bret Lambert
ok thib@
2009-06-04Plug mbuf leaks in the DRC, when we reuse entries we didn'tThordur I. Bjornsson
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@
2009-06-04Add some descriptive comments, because not having to read NFS codeBret Lambert
is good for the brain. ok thib@
2009-06-04simplify argument list for nfssvc_nfsd()Bret Lambert
ok thib@
2009-06-04Demacro nfsm_lookup for great justice.Bret Lambert
Thanks to ckuethe for saving much typing with a drive-by perl script. ok thib@
2009-06-03Place code to search for/sleep waiting for an nfs socket into its ownBret Lambert
code; makes the cleaned-up function much more legible. ok thib@
2009-06-03kill some unused defines, don't do an ifndef dance forThordur I. Bjornsson
things that should be defined here and remove a silly comment.
2009-06-03remove cruft that snuck in with previousThordur I. Bjornsson
2009-06-03Lift the NFS over UDP retransmit logic from FreeBSD.Thordur I. Bjornsson
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.
2009-06-02give the retransmission count booking keeping a facelift,Thordur I. Bjornsson
just store the maximun amount of rexmits in one place and cleanup. Also make sure this only effects soft mounts. OK blambert@
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-05-21IO_METASYNC has been a noop since around 4.4BSD-Lite, theThordur I. Bjornsson
idea never really caught on anywhere so retire it. "gank this shizzle", blambert@
2009-05-15nicer (unique) wmesg for the tsleep(9) in nfs_reconnect();Thordur I. Bjornsson
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-03-19We don't count buffercache stats in the B_PHYS case, so fix nfs to notOwain Ainsworth
increment the num{read,write} and pending{read,write} statistics in that case, since biodone won't change them on completion. On another note, I'm not sure that we use physical buffers for swapping over nfs anymore, so this chunk may be superfluous. beck@ came up with the same diff "So anyway rather than me commiting it from my copy, I'm giving you the OK and the commit. since it officially makes you a buffer cache and NFS hacker };-)"
2009-03-15Introduce splsoftassert(), similar to splassert() but for soft interruptMiod Vallat
levels. This will allow for platforms where soft interrupt levels do not map to real hardware interrupt levels to have soft ipl values overlapping hard ipl values without breaking spl asserts.
2009-02-22fix PR 6082: do not create more fd's than will fit in the message onOtto Moerbeek
the receiving side when passing fd's. ok deraadt@ kettenis@
2009-01-28Remove cur_usec variable that is no longer used.Alexander Bluhm
ok blambert@
2009-01-27Correct my timeradd() thinko in nfsrv_writegather()Bret Lambert
pointed out by bluhm@, "obvious" thib@
2009-01-24oops. forgot to remove a debug printf from the diff.Thordur I. Bjornsson
(that I applied to a clean tree to commit)
2009-01-24Use a timespec for the server write deadline and procrastinationThordur I. Bjornsson
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.
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-24propagate the O_EXCL flag down to the file systems, by settingThordur I. Bjornsson
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@
2009-01-24magic 8 -> nitems(nfs_backoff)Thordur I. Bjornsson
prompted by David <dunnoseriously _att_ gmail.com>