summaryrefslogtreecommitdiff
path: root/sys/nfs
AgeCommit message (Collapse)Author
2004-05-14use pool for namei pathbuf. testing ok millert@ tdeval@Ted Unangst
2004-04-26nfs_poll cannot simply be defined to seltrue so use a stub nfs_pollTodd C. Miller
duplicated from UFS. Closes PR 3757; OK deraadt@
2004-04-12make sockargs take void *, combine a len check.Ted Unangst
from pedro martelletto, ok markus@
2004-03-02silly fifos aren't a real fs, so we have to be sure to call reclaimTed Unangst
in the host fs.
2004-02-27Defer use of NFS_ISV3 macro in nfs_link until sanity checks have been done.Todd C. Miller
Fixes a panic that can occur when trying to link from a local filesystem to an nfs-mounted one. Problem pointed out by Jim Rees, fix exists in Net and Free. OK tedu@ csapuntz@
2003-12-08nfs_reqq is operated at softnet other places and thus softclock is not high ↵Michael Shalayeff
enough; tedu@ ok
2003-11-28crank max sizes. from millert. believed to solve pr3561Ted Unangst
2003-10-22typos from Jared Yanovich;Jason McIntyre
also sync with header, and change spacing a little to prevent line breaks;
2003-09-23Replace select backends with poll backends. selscan() and pollscan()Todd C. Miller
now call the poll backend. With this change we implement greater poll(2) functionality instead of emulating it via the select backend. Adapted from NetBSD and including some changes from FreeBSD. Tested by many, deraadt@ OK
2003-08-15change arguments to suser. suser now takes the process, and a flagsTed Unangst
argument. old cred only calls user suser_ucred. this will allow future work to more flexibly implement the idea of a root process. looks like something i saw in freebsd, but a little different. use of suser_ucred vs suser in file system code should be looked at again, for the moment semantics remain unchanged. review and input from art@ testing and further review miod@
2003-08-14constify vfsops; tedu@ okMichael Shalayeff
2003-07-10unlock on error condition. from Tim Wiess. ok csapuntz@ millert@Ted Unangst
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-13Kill a bunch more commons (very few left =)Jason Wright
2003-05-07make this at least compile ...Michael Shalayeff
2003-05-06string cleaning; tedu okTheo de Raadt
2003-03-28Ip -> IP;Jason McIntyre
ok miod@
2003-01-31File system locking fixups, mostly from NetBSD:Artur Grabowski
- cache_lookup move common code from various fs's here always return with vnode and parent locked adjust return codes - PDIRUNLOCK - new flag set if lookup couldn't lock parent vnode - kernfs and procfs lock vnode in get_root don't unlock (again) in kernfs_freevp fix memory leak in procfs From tedu@stanford.edu deraadt@ and various other ok
2002-12-11in mountroot:Michael Shalayeff
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
2002-11-08Implement simple vnodeop inheritance for specfs and fifofs.Artur Grabowski
The inheritace is implemented by setting the default vnodeop to a bypass op that repeats the operation on the spec/fifo vnodeop vector. The overhead of one extra indirect function call is worth the cleanup and improved correctness. This actually solves a few bugs where some vnode ops were missing from some vectors (like kqfilter or revoke). (and even more on the ubc branch). Inspired by the same thing done in FreeBSD.
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-08-01Fix handling of 0-length RPC fragmentsConstantine Sapuntzakis
2002-07-30Bug/type found by teduConstantine Sapuntzakis
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-07-03Remove unused function parameter 'cache' from nfs_repheadNathan Binkert
ok costa@
2002-07-02use hash.h for nfs_hash as well as namei's hashEric Jackson
ok art@ costa@
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-06-11splassert where comments tell us to.Artur Grabowski
2002-06-02correct fake nfs_boot_getfh(); ski@wuhjuhbuh.2y.netTheo de Raadt
2002-05-21Protect calls to biodone with splbio. Some functions calledArtur Grabowski
by biodone assume splbio (probably just on other filesystems) and some callbacks from b_iodone assume it too. It's just much safer. costa@ ok.
2002-05-17Fix nfs_realign to allocate new mbufs. Taken from freebsdConstantine Sapuntzakis
2002-05-10Fix for PR2641. Length calculation was wrong in loop. Include commentConstantine Sapuntzakis
describing fixed length calculation
2002-04-29constrain readdirplus request count; j@pureftpd.org, ok costaTheo de Raadt
2002-04-11Back out nfs_realign() change, it causes "pool_get: must have NOWAIT" panics.Todd C. Miller
deraadt@ OK
2002-04-10nfs_realign from FreeBSD. The old code was over-optimized, occasionally ↵Constantine Sapuntzakis
overwriting other parts of a TCP stream, occasionally dereferencing NULL pointers
2002-03-14First round of __P removal in sysTodd C. Miller
2002-02-23Sigh. The diff is out for testing for three months without a single problem.Artur Grabowski
Two days after commit people report serious lockups all over the place. Back out nfs locking changes.
2002-02-22More locking in the NFS codeConstantine Sapuntzakis
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-08There are NFS servers where it's possible to modify a symbolic link. Remove ↵Constantine Sapuntzakis
aggressive optimization
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-02-04Cleanup mountroot-related definitions.Miod Vallat
2002-01-28add NFS_VER4Jim Rees
2002-01-23Pool deals fairly well with physical memory shortage, but it doesn't dealArtur Grabowski
well (not at all) with shortages of the vm_map where the pages are mapped (usually kmem_map). Try to deal with it: - group all information the backend allocator for a pool in a separate struct. The pool will only have a pointer to that struct. - change the pool_init API to reflect that. - link all pools allocating from the same allocator on a linked list. - Since an allocator is responsible to wait for physical memory it will only fail (waitok) when it runs out of its backing vm_map, carefully drain pools using the same allocator so that va space is freed. (see comments in code for caveats and details). - change pool_reclaim to return if it actually succeeded to free some memory, use that information to make draining easier and more efficient. - get rid of PR_URGENT, noone uses it.
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