summaryrefslogtreecommitdiff
path: root/sys/nfs/nfs_syscalls.c
AgeCommit message (Collapse)Author
2003-06-02Remove the advertising clause in the UCB license which BerkeleyTodd C. Miller
rescinded 22 July 1999. Proofed by myself and Theo.
2003-05-07make this at least compile ...Michael Shalayeff
2002-10-29Get rid of some commons.Artur Grabowski
2002-08-23Just like getvnode, make getsock FREF the file so that we can't get awayArtur Grabowski
with not refing it. Eyeballed by lurene@daemonkitty.net, fries@, nordin@ and fries@ Some additional cleanups by nordin@
2002-07-24Use sizeof(array) instead of sizeof(array *) for bcopy length. ok deraadt@Thomas Nordin
2002-07-12Change the locking on the mountpoint slightly. Instead of using mnt_lockArtur Grabowski
to get shared locks for lookup and get the exclusive lock only with LK_DRAIN on unmount and do the real exclusive locking with flags in mnt_flags, we now use shared locks for lookup and an exclusive lock for unmount. This is accomplished by slightly changing the semantics of vfs_busy. Old vfs_busy behavior: - with LK_NOWAIT set in flags, a shared lock was obtained if the mountpoint wasn't being unmounted, otherwise we just returned an error. - with no flags, a shared lock was obtained if the mountpoint was being unmounted, otherwise we slept until the unmount was done and returned an error. LK_NOWAIT was used for sync(2) and some statistics code where it isn't really critical that we get the correct results. 0 was used in fchdir and lookup where it's critical that we get the right directory vnode for the filesystem root. After this change vfs_busy keeps the same behavior for no flags and LK_NOWAIT. But if some other flags are passed into it, they are passed directly into lockmgr (actually LK_SLEEPFAIL is always added to those flags because if we sleep for the lock, that means someone was holding the exclusive lock and the exclusive lock is only held when the filesystem is being unmounted. More changes: dounmount must now be called with the exclusive lock held. (before this the caller was supposed to hold the vfs_busy lock, but that wasn't always true). Zap some (now) unused mount flags. And the highlight of this change: Add some vfs_busy calls to match some vfs_unbusy calls, especially in sys_mount. (lockmgr doesn't detect the case where we release a lock noone holds (it will do that soon)). If you've seen hangs on reboot with mfs this should solve it (I repeat this for the fourth time now, but this time I spent two months fixing and redesigning this and reading the code so this time I must have gotten this right).
2002-06-11Remove some unused code for dealing with nfs over kerberos. No actual change,Hans Insulander
just some #ifdef'ed out code removed. ok deraadt@, art@ and csapuntz@
2002-03-14First round of __P removal in sysTodd C. Miller
2002-02-12Fix all users of getsock to use FREF/FRELE properly.Artur Grabowski
2002-02-10theo doesn't like this codeNathan Binkert
2002-02-08- Rename FILE_{,UN}USE to FREF and FRELE. USE is a bad verb and we don't haveArtur Grabowski
the same semantics as NetBSD anyway, so it's good to avoid name collissions. - Always fdremove before freeing the file, not the other way around. - falloc FREFs the file. - have FILE_SET_MATURE FRELE the file (It feels like a good ortogonality to falloc FREFing the file). - Use closef as much as possible instead of ffree in error paths of falloc:ing functions. closef is much more careful with the fd and can deal with the fd being forcibly closed by dup2. Also try to avoid manually calling *fo_close when closef can do that for us (this makes some error paths mroe complicated (sys_socketpair and sys_pipe), but others become simpler (sys_open)).
2002-02-05Add counting of temporary references to a struct file (as opposed to referencesArtur Grabowski
from fd tables and other long-lived objects). This is to avoid races between using a file descriptor and having another process (with shared fd table) close it. We use a separate refence count so that error values from close(2) will be correctly returned to the caller of close(2). The macros for those reference counts are FILE_USE(fp) and FILE_UNUSE(fp). Make sure that the cases where closef can be called "incorrectly" (most notably dup2(2)) are handled. Right now only callers of closef (and {,p}read) use FILE_{,UN}USE correctly, more fixes incoming soon.
2002-01-20Move nfs_norsvport out from behind #ifdef NFSSERVER so ramdiskHugh Graham
kernels with only NFSCLIENT defined can build.
2002-01-16use queue.h macro'sEric Jackson
remove register
2002-01-11Add a new sysctl that removes the requirement for reserved ports to beNathan Binkert
used by the nfs server.
2001-12-19UBC was a disaster. It worked very good when it worked, but on someArtur Grabowski
machines or some configurations or in some phase of the moon (we actually don't know when or why) files disappeared. Since we've not been able to track down the problem in two weeks intense debugging and we need -current to be stable, back out everything to a state it had before UBC. We apologise for the inconvenience.
2001-11-27Merge in the unified buffer cache code as found in NetBSD 2001/03/10. TheArtur Grabowski
code is written mostly by Chuck Silvers <chuq@chuq.com>/<chs@netbsd.org>. Tested for the past few weeks by many developers, should be in a pretty stable state, but will require optimizations and additional cleanups.
2001-11-15Remove creds from struct buf, move the creds that nfs need into the nfs node.Artur Grabowski
While in the area, convert nfs node allocation from malloc to pool and do some cleanups. Based on the UBC changes in NetBSD. niklas@ ok.
2001-06-26Remove left-over code from cleaning that was causing servers to fail to respondConstantine Sapuntzakis
2001-06-25Remove NQNFSConstantine Sapuntzakis
2001-02-23Change the B_DELWRI flag using buf_dirty and buf_undirty instead ofConstantine Sapuntzakis
manually twiddling it. This allows the buffer cache to more easily keep track of dirty buffers and decide when it is appropriate to speed up the syncer. Insipired by FreeBSD. Look over by art@
2000-11-09PHOLD the nfsd.Artur Grabowski
PRELE the nfsiod when it exits (shouldn't be necessary to PHOLD it because it's a kernel thread, but it doesn't hurt.
2000-05-24return ENOSYS for NFSSVC_BIOD request. since none to call it anywayMichael Shalayeff
2000-05-19from tsarna@netbsd.org (sysctl changes to come later):Michael Shalayeff
Death to nfsiod! It is replaced by kernel threads that do the same thing. The number of kernel threads used is set with the vfs.nfs.iothreads sysctl.
2000-02-07moved sys_getfh to vfs_syscalls.cassar
1997-12-02More splbio()'s added so that reassignbuf can do its thing.Constantine Sapuntzakis
1997-11-06Updates for VFS Lite 2 + soft update.Constantine Sapuntzakis
1997-10-06back out vfs lite2 till after 2.2Theo de Raadt
1997-10-06VFS Lite2 ChangesConstantine Sapuntzakis
1997-03-30ifdef out some vars used only w/ NFSCLIENT definedMichael Shalayeff
1996-06-14Keep dirty list used by in-kernel update(8) in sync with buffersThorsten Lockert
1996-04-21partial sync with netbsd 960418, more to comeTheo de Raadt
1996-04-17Minor cleanups. Checked against Lite2.Michael Shalayeff
(NetBSD's was really just a Lite2's, but w/ 64bit support)
1996-03-31From NetBSD: NFSv3 import (tomorrow's Net's kernel)Michael Shalayeff
Open's patches kept in. i'll possibly take a look at Lite2 soon, is there smth usefull ?..
1996-02-29From NetBSD: merge with 960217 (still NFSv2)Niklas Hallqvist
1995-12-21from cgd; handle 64-bit pointers and longsTheo de Raadt
1995-10-18initial import of NetBSD treeTheo de Raadt