summaryrefslogtreecommitdiff
path: root/sys/nfs
AgeCommit message (Collapse)Author
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>
2009-01-24make sure the from mbuf gets freed on error to.Thordur I. Bjornsson
from David <dunnoseriously _att_ gmail.com> ok blambert@
2009-01-22After the NFS server had sent a reply of size readsize or readdirsize,Alexander Bluhm
the udp receive space got completely filled up. Even if the next packet from the server was a small reply, it got dropped by udp_input(). After a second the client resent the NFS request. Doubling rcvreserve reduces the chance of retransmits by having enough recv space for multiple NFS replies even if there comes a big one. found with pedro@, ok blambert@, thib@, pedro@
2009-01-22The variable nfs_reqq was protected by splsoftnet() only in 3 outAlexander Bluhm
of 5 cases. In the functions nfs_reconnect() and nfs_reply() put the TAILQ_FOREACH over nfs_reqq also inside splsoftnet() protection. found with pedro@, ok blambert@, pedro@, thib@
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-19Introduce a macro to invalidate the attributeThordur I. Bjornsson
cache instead of setting n_attrstamp to 0 directly. Lift the macro name from NetBSD. prompted by and OK blambert@
2009-01-18Remove unused members from struct nfsd.Bret Lambert
ok thib@
2009-01-18remove function which only called nfssvc_iod(), and pass nfssvc_iod()Bret Lambert
to kthread_create() ok thib@
2009-01-18Replace #ifndef DIAGNOSTIC with #ifdef to make the additional checksAlexander Bluhm
in diagnostic kernels. The typo comes from 4.4BSD-Lite2 via NetBSD. Found with pedro@, ok pedro@, blambert@, thib@
2009-01-18add $OpenBSD$ tagThordur I. Bjornsson
2009-01-18Perform the same access enforcements for set attributesThordur I. Bjornsson
as for open/read/write etc, that is assume that the file as already been opened proper, this fixes an ancient ftruncate bug, that is if ftruncate was called on a file with no write modes, we'd return EACCES, this breaks posixy behavior. however, for e.g. truncate() we'll return EACCESS as we should. Diff from PR5880 by mickey. I had forgotten about this PR, and the fix but niklas@ ran into similar issues which prompted another review of this. OK kettenis@
2009-01-18Add nfs ddb hooks, for now only to show all the outstanding nfsreq'sThordur I. Bjornsson
and to print out struct nfsreq. "get it in so people can pound on it" blambert@ OK and information_s_ on the manpage from miod@
2009-01-16turn nfs_msg into void functions, also make it take an nfsreqThordur I. Bjornsson
argument since all of the info we need is there, makes it and the use it a tad bit nicer. ok blambert@
2009-01-15remove prototypes for nonexistent functionsThordur I. Bjornsson
2009-01-13Trivial lvalue abuse fixes, no binary changes.Alexander Yurchenko
ok millert@ tedu@
2008-12-27expand the ifdef _KERNEL around kernel only function prototypesThordur I. Bjornsson
since they have no business being export to userland. OK blambert@
2008-12-24Low hanging macro fruit. Inline the nfsm_srvstrsiz macro sinceThordur I. Bjornsson
its used only once and nuke its definition. Stolen from blambert's bag'o'diffs. OK blambert@.
2008-12-24remove argument names from function prototypes, this way theThordur I. Bjornsson
file shares the same sane style.
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-12-23small indent fixThordur I. Bjornsson
2008-11-24use the shiny new nitems macroThordur I. Bjornsson
2008-10-31Revert last commit; mbuf leaks are not solved by double-freeing mbuf chainsBret Lambert
blambert@-- Real solution is to fix NFS mbuf handling.
2008-10-26Plug mbuf leak in RPC record error case.Bret Lambert
ok thib@
2008-10-20Be pedantically correct in freeing allocated mbufs, even upon clearingBret Lambert
the server cache on shutdown. ok thib@
2008-10-16Don't hide the fact that NFS uses vop_generic_* functions behindBret Lambert
#define's in nfs_var.h ok thib@
2008-09-12zap a deprecated macro, NMOD.Thordur I. Bjornsson
2008-09-12provide a NOTE_TRUNCATED kq hint in nfs_setattr() if the fileThordur I. Bjornsson
shrinks, same thing as UFS does. ok/pointers pedro@ ok blambert@
2008-09-12move the declaration of nfsrv3_procs to nfs_syscalls.cThordur I. Bjornsson
ok blambert@
2008-09-11issue a NOTE_TRUNCATE if the file size has shrinkedThordur I. Bjornsson
ok tedu@, blambert@, art@
2008-08-31remove the #if 0'ed NFS_ATTRTIMEO() macro since it wasThordur I. Bjornsson
replaced by a function long ago.. ok blambert@
2008-08-25Correctly invalidate attribute cache entries in case the vnode modePedro Martelletto
changes, okay beck@, tedu@ and thib@.
2008-08-21Fix 'if ();' construction introduced in last commit, okay deraadt@Pedro Martelletto
2008-08-20Return EINVAL instead of '1' for invalid kq filters.Thordur I. Bjornsson
From NetBSD; OK art@, blambert@
2008-08-09o nfs_vinvalbuf() is always called with the intrflag as 1, and thenThordur I. Bjornsson
checks if the mount is actually interrutable, and if not sets it 0. remove this argument from nfs_vinvalbuf and just do the checking inside the function. o give nfs_vinvalbuf() a makeover so it looks nice. (spacing, casts, &c); o Actually pass PCATCH too tsleep() if the mount it interrutable. ok art@, blambert@
2008-08-08o sync comment with reality, we have never malloc()'ed filehandlesThordur I. Bjornsson
and the dead code that was supposed todo that has been removed. o rename the NFS_SMALLFH constant to NFS_MAXFHSIZE, since it better reflects what it's for. ok blambert@
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-08-08Remove code for variable-sized allocations of NFS filehandles by malloc(),Bret Lambert
as it was never used because there were 64-bit buffers already allocated for filehandles in nfsnode structs. ok thib@
2008-07-28dont stuff nfs mount point flags into the statfs f_flags member, itsThordur I. Bjornsson
wrong. But this was harmless anyway since sys_statfs() sets this field corrently after calling VFS_STATFS(); ok pedro@, blambert@
2008-07-25much more correct way of dealing with nfs pending reads/writesBob Beck
ok thib@
2008-07-23make this real CTheo de Raadt
2008-07-23Correct cases of mishandling of pending reads and writes to preventBob Beck
them going negative - this consists of identifying a number of cases of IO not going through the buffer cache and marking those buffers with B_RAW - as well as fixing nfs_bio to show pending writes and reads through the buffer cache via NFS still has a problem with mishandling the counters I believe in the async/sync fallback case where counters stay positive which will be addressed seperately. ok tedu@ deraadt@