summaryrefslogtreecommitdiff
path: root/sys/nfs
AgeCommit message (Collapse)Author
2008-05-27Remove bloated and nasty nfsm_clget macro; while here, replace someBret Lambert
handrolled loops with nfsm_strtombuf and nfsm_buftombuf. ok deraadt@ via thib@; ok 'nfs buddy' thib@ testing johan@, merdely@; thanks
2008-05-27be much more clear about revarp failures; ok miodTheo de Raadt
2008-05-23Deal with the situation when TCP nfs mounts timeout and processesThordur I. Bjornsson
get hung in nfs_reconnect() because they do not have the proper privilages to bind to a socket, by adding a struct proc * argument to sobind() (and the *_usrreq() routines, and finally in{6}_pcbbind) and do the sobind() with proc0 in nfs_connect. OK markus@, blambert@. "go ahead" deraadt@. Fixes an issue reported by bernd@ (Tested by bernd@). Fixes PR5135 too.
2008-05-20Fix last commit, it is rtrequest1() and not rtrequest(). Lucky me it seemsClaudio Jeker
that the code is ifdef-ed out all the time.
2008-05-17KNF. No names for arguments in function prototypes, regroupThordur I. Bjornsson
functions and make some comments nicer...
2008-05-13don't grab the receive lock in nfs_rcvlock if the reply hasThordur I. Bjornsson
already been received while we slept. prevents processes from monopolising the lock. From FreeBSD; ok blambert@ tested by johan@ and a few others
2008-05-09Another rtrequest() rtrequest1() replacement.Claudio Jeker
OK henning@
2008-05-08retire vn_default_error() and replace all instancesThordur I. Bjornsson
with eopnotsupp() instead; ok blambert@
2008-05-02plug potential mbuf leaks;Thordur I. Bjornsson
Parts from NetBSD; OK blambert@; tested by johan@, sthen@ and a few others.
2008-04-25Plug potential mbuf leak by changing m_free to m_freem.Bret Lambert
From NetBSD. ok thib@
2008-04-22Remove kludges that map EEXIST errors too a 0 return (success) for certainThordur I. Bjornsson
operations (non-idempotent ones) under the assumption that the reply from the server is for a duplicate of the original request. However, most (all) NFS server today have a duplicate reply cache that address this problem and these kludges have been shown to cause problems with some applications (most notably dovecot as pointed out by brad@). For more information: http://lists.freebsd.org/pipermail/freebsd-current/2007-November/079961.html And revision 1.277 of sys/nfsclient/nfs_vnops.c in FreeBSD. Diff from rwatson@freebsd.org OK blambert@, "no objections" krw@ tested by many;
2008-04-22Close potential mbuf leak by iterating over the mbuf packet chainBret Lambert
and m_freem()'ing vice doing so only on the first packet. From a similar change in NetBSD. "yes please" thib@
2008-04-22remove the "kerbflag" argument from nfsrv_fhtovp() and nfs_namei()Thordur I. Bjornsson
(the latter only had it to pass it to nfsrv_fhtovp()). appropriate cleanup also; ok blambert@
2008-04-22Add comments detailing what the SLP_* flag #define's meanBret Lambert
ok thib@
2008-04-19in nfsm_reqh(), only allocate an mbuf cluster if theThordur I. Bjornsson
len exceeds MLEN, not MINCLSIZE; inspired by a similar commit from damien. ok damien@, blambert@
2008-04-18use arc4random_uniform() for random number requests that are not aDamien Miller
power of two. use arc4random_bytes() when requesting more than a word of PRNG output. ok deraadt@
2008-04-16more efficient use of mbufs in nfsm_uiotombuf().Damien Bergamini
allocate a mbuf cluster only if length is greater than MLEN instead of MINCLSIZE. ok blambert@, thib@
2008-04-14Rework NFS mbuf write routines:Bret Lambert
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-14move the cache lookup code into a function, instead repeatingThordur I. Bjornsson
it twice, makes this nicer as a bonus; From NetBSD. tested by johan@, ok blambert@.
2008-03-31Refine "netboot" interface group semantics to indicate the interface weTheo de Raadt
booted from to the most precision; preferring the boot device, or if that is not known, the root device discussed with miod and reyk tested by beck
2008-03-19label all interfaces we netboot from in group "netboot", in a MI fashionTheo de Raadt
ok miod
2008-03-16Widen some struct statfs fields to support large filesystem stataOtto Moerbeek
and add some to be able to support statvfs(2). Do the compat dance to provide backward compatibility. ok thib@ miod@
2008-01-06diff missed in previous commit:Theo de Raadt
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-06More NFS-related kernel shrinkage...Bret Lambert
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.
2007-12-28nfs_sndlock() is often called with its rep argumentThordur I. Bjornsson
as NULL, so make sure its non-NULL before attempting to reference it. Fixes PR5694; Confirmed by submitter. OK art@, krw@
2007-12-27Fix for PR5365.Thordur I. Bjornsson
Use the va_blocksize, that is the blocksize of the underlying exported file system instead of the DIRBLKSIZ constant to size the chunks. Diff from Enache Adrian <3n4ch3@gmail.com> Tested by myself and a few others.
2007-12-13Garbage collect nfsdmap and leftover code. That structureThordur I. Bjornsson
was used as a part of the "old-style directory caching" that was removed in 2001; ok beck@, blambert@
2007-12-13convert massive (expanded to 150+ lines) nfsm_v3attr macro to a functionBret Lambert
shaves an insane (~8K) amount from an i386 kernel ok thib@
2007-11-28fill the va_blocksize with something a litte saner,Thordur I. Bjornsson
make stat(2) return st_blocksize thats a bit closer to reality. From NetBSD; OK art@, beck@, tedu@
2007-11-08Fix unsafe queue macro useBret Lambert
ok thib@ 'emphatic' ok beck@
2007-11-07more low hanging fruit; Expand the nfsm_srvwcc_data() macroThordur I. Bjornsson
and nuke it's definition. OK krw@, blamers@
2007-11-06Expand the nfsm_srvfillattr() macro andThordur I. Bjornsson
nuke it's definition. OK krw@, blambert@
2007-11-05deinline nfs_attrtimeo(); and remove some associatedThordur I. Bjornsson
#ifdef goo. ok krw@, blambert@
2007-10-30remove an unused macro, NFSMINOFF;Thordur I. Bjornsson
ok beck@, blambert@ "Kill it. Kill it dead." krw@
2007-10-29Touch of KNF and style(9), spaces and comments.Thordur I. Bjornsson
make pretty. ok krw@
2007-10-28Remove the "frev" argument from nfs_rephead(); and clean up the "frev"Thordur I. Bjornsson
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-28remove some unused members of struct nfsnode;Thordur I. Bjornsson
some spacing while there. ok krw@
2007-10-17use TAILQ_FOREACH() where applicable in nfs_timer();Thordur I. Bjornsson
ok art@, blambert@
2007-10-15Remove a set, but unused varible in nfs_socket();Thordur I. Bjornsson
NQNFS leftover. ok miod@,blambert@
2007-10-14Remove now unused functions dealing with kerberosThordur I. Bjornsson
authentication. ok beck@
2007-10-13Remove alot of dead kerberos code (add sane comments too).Thordur I. Bjornsson
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-08shrink nfsrv_v2errmap[] and check table size more carefully to avoidTheo de Raadt
dependency on ELAST; ok miod thib
2007-10-07Make sure nfsrv_v2errmap[] really contains ELAST initialized values.Miod Vallat
2007-09-26nfsm_uiotom macro does nothing but hide error-handling code; replaceBret Lambert
inline in the one place that it's called ok thib@, weingart@ "I don't see why not" fgsch@
2007-09-20Don't rely on mbuf.h including pool.h (which is going to stop soon)Bret Lambert
ok thib@ henning@ art@
2007-09-20MALLOC/FREE -> malloc/free + M_ZERO.Thordur I. Bjornsson
Uneeded includes and casts... ok krw@
2007-09-11Replace nfsm_reqdone and nfsm_srvdone macros inline. No binary change.Bret Lambert
ok thib@
2007-06-25replace magic number with a define.Thordur I. Bjornsson
(2 -> SHUT_RDWR in calls to soshutdown()). From Iruata Souza. ok deraadt@
2007-06-21remove a whole bunch of duplicate functionThordur I. Bjornsson
prototypes. (survived build/release on macppc/amd64). ok pedro@
2007-06-20READDIRPLUS is v3 only, bail out if the mount isnt a v3.Thordur I. Bjornsson
Prevents weird things from happening. ok tedu@,pedro@