Commit Graph

985 Commits

Author SHA1 Message Date
yamt
63abe2b629 nfssvc_nfsd: check SPCF_SHOULDYIELD and yield cpu. 2007-06-01 14:43:17 +00:00
yamt
ab5f84630b nfssvc_nfsd: add assertions. 2007-06-01 14:10:02 +00:00
yamt
05aaff39ff use mutex and condvar. 2007-06-01 11:56:03 +00:00
yamt
61131eb130 nfsdsock_lock: fix an inverted check of SLP_VALID. 2007-06-01 11:38:44 +00:00
yamt
febe85111f - remove nfs_exit exit hook. ok'ed by christos@.
- as far as i understand the code, it shouldn't be necessary
	  because nfs_request can't return without removing its request
	  and r->r_lwp is either curlwp or NULL.
	- even if it's necessary, leaking requests is not the correct way
	  to recover from the condition.
- nfs_request: add a related assertion.
2007-05-28 16:47:38 +00:00
yamt
683644f00e nfs_write: report an error correctly in the case of IO_SYNC. 2007-05-09 23:17:45 +00:00
manu
f39939ad43 Fix buid (broken by a fix introduced in the wrong file...) 2007-05-08 09:29:50 +00:00
manu
31b57f40ff Add the TFTPROOT kernel option for TFTP'ing root RAMdisk at root mount time.
This allows working around situations where a kernel with embedded RAMdisk
cannot be booted by the bootloader because the RAMdisk is too big.
2007-05-08 06:10:27 +00:00
yamt
fce3c58e5e nfs_rcvlock: fix NFSMNT_INT check, which has been broken since rev.1.39. 2007-05-02 16:19:55 +00:00
yamt
e4c778084c - nfs_reply: keep rcvlock longer so that lwp which already have its reply
received won't be stuck in nfs_receive.
- nfs_rcvlock: check exceptions before sleeping on the lock.
- nfs_rcvunlock: use cv_broadcast rather than cv_signal to ensure that
  lwps which received its reply get woken up.
2007-05-02 14:48:47 +00:00
yamt
ab54f30196 remove R_GETONEREP. 2007-04-30 23:10:55 +00:00
yamt
6e3d653f39 fix a lock leak in rev.1.109. pointed by Mindaugas R. 2007-04-30 10:30:51 +00:00
yamt
fbee155d25 use mutex and condvar. 2007-04-29 15:31:53 +00:00
yamt
6623a01439 don't forget to destroy mutex and condvar. 2007-04-29 15:30:26 +00:00
yamt
f14398066d include condvar.h. pointed by Kurt Schreiner. 2007-04-29 14:58:21 +00:00
yamt
bbe5115ad9 use condvar. 2007-04-29 14:56:59 +00:00
yamt
aca6764004 use mutex and condver. 2007-04-29 10:30:18 +00:00
yamt
ac99b69f8d use mutex and condvar. 2007-04-29 08:41:10 +00:00
dsl
b8fbaf8c4b Change the way that emulations locate files within the emulation root to
avoid having to allocate space in the 'stackgap'
  - which is very LWP unfriendly.
The additional code for non-emulation namei() is trivial, the reduction for
  the emulations is massive.
The vnode for a processes emulation root is saved in the cwdi structure
  during process exec.
If the emulation root the TRYEMULROOT flag are set, namei() will do an initial
  search for absolute pathnames in the emulation root, if that fails it will
  retry from the normal root.
".." at the emulation root will always go to the real root, even in the middle
  of paths and when expanding symlinks.
Absolute symlinks found using absolute paths in the emulation root will be
  relative to the emulation root (so /usr/lib/xxx.so -> /lib/xxx.so links
  inside the emulation root don't need changing).
If the root of the emulation would be returned (for an emulation lookup), then
  the real root is returned instead (matching the behaviour of emul_lookup,
  but being a cheap comparison here) so that programs that scan "../.."
  looking for the root dircetory don't loop forever.
The target for symbolic links is no longer mangled (it used to get the
  CHECK_ALT_xxx() treatment, so could get /emul/xxx prepended).
CHECK_ALT_xxx() are no more. Most of the change is deleting them, and adding
  TRYEMULROOT to the flags to NDINIT().
A lot of the emulation system call stubs could now be deleted.
2007-04-22 08:29:55 +00:00
yamt
337d052ee1 hold proclist_mutex when calling psignal(). 2007-04-19 11:05:14 +00:00
hannken
29ddf6065f Remove calls to now obsolete vn_start_write() and vn_finished_write(). 2007-04-06 14:28:28 +00:00
ad
59d979c5f1 Pass an ipl argument to pool_init/POOL_INIT to be used when initializing
the pool's lock.
2007-03-12 18:18:22 +00:00
yamt
02530653ff nfs_check_wccdata: print timestamps. 2007-03-09 05:55:33 +00:00
yamt
7e98ba85a6 nfsrv_setattr: revive nfsm_srvsattr which was (mistakenly?)
removed with caddr_t.
2007-03-05 23:18:50 +00:00
christos
53524e44ef Kill caddr_t; there will be some MI fallout, but it will be fixed shortly. 2007-03-04 05:59:00 +00:00
yamt
5057834077 nfs_getpages: fix an inverted condition in rev.1.147. 2007-02-27 10:03:56 +00:00
thorpej
b3667ada6d TRUE -> true, FALSE -> false 2007-02-22 06:05:00 +00:00
thorpej
712239e366 Replace the Mach-derived boolean_t type with the C99 bool type. A
future commit will replace use of TRUE and FALSE with true and false.
2007-02-21 22:59:35 +00:00
pooka
033e539d53 after freeing cookies, set the pointer to NULL to prevent dangling reuse 2007-02-20 16:27:21 +00:00
ad
adbb9ec2fa Call genfs_node_destroy() where appropriate. 2007-02-20 16:21:03 +00:00
yamt
6d6b5c51d6 use mutex and rwlock rather than lockmgr. 2007-02-15 16:01:51 +00:00
ad
b07ec3fc38 Merge newlock2 to head. 2007-02-09 21:55:00 +00:00
chs
f0cdf39d80 add back a mistakenly removed vput(). 2007-02-05 16:03:53 +00:00
yamt
cb2e7baf50 have a mowner dedicated to nfs reply cache. 2007-02-05 11:55:45 +00:00
yamt
7224686465 nfsrv_updatecache: actually use reply caches for connection oriented protocols. 2007-02-05 11:55:03 +00:00
chs
0507747213 more fixes for the new vnode locking scheme:
- don't use SAVESTART in calls to relookup() from unionfs,
   just vref() the desired vnode when we need to.
 - fix locking and refcounting in the unionfs EEXIST error cases.
 - release any vnode locks before calling VFS_ROOT(), vfs_busy() is enough.
   this allows us to simplify union_root() and fix PR 3006.
 - union_lock() doesn't handle shared lock requests correctly,
   so convert them to exclusive instead.  fixes PR 34775.
 - in relookup(), avoid reusing "dp" for different purposes,
   the error handling wasn't right.  (actually just get rid of dp.)
   also, change relookup() to ignore LOCKLEAF and always return the
   vnode locked since the callers already expect this.
2007-02-04 15:03:20 +00:00
chs
6721fd793e in nfsrv_rename(), change vput(fdirp) back to vrele() since the dirp
returned from nfs_namei() is not locked in this case.  fixes PR 35542.
also, apply the same fix here as was made in rename_files() to handle
the case when dvp and vp are the same.
2007-02-04 14:48:51 +00:00
hubertf
142c2a33ba Remove duplicate #includes, patch contributed in private mail
by Slava Semushin <slava.semushin@gmail.com>.

To verify that no nasty side effects of duplicate includes (or their
removal) have an effect here, I've compiled an i386/ALL kernel with
and without the patch, and the only difference in the resulting .o
files was in shifted line numbers in some assert() calls.
The comparison of the .o files was based on the output of "objdump -D".

Thanks to martin@ for the input on testing.
2007-01-24 13:08:11 +00:00
hannken
1b9c6382e3 New file system suspension API to replace vn_start_write and vn_finished_write.
The suspension helpers are now put into file system specific operations.
This means every file system not supporting these helpers cannot be suspended
and therefore snapshots are no longer possible.

Implemented for file systems of type ffs.

The new API is enabled on a kernel option NEWVNGATE.  This option is
not enabled by default in any kernel config.

Presented and discussed on tech-kern with much input from
Bill Studenmund <wrstuden@netbsd.org> and YAMAMOTO Takashi <yamt@netbsd.org>.

Welcome to 4.99.9 (new vfs op vfs_suspendctl).
2007-01-19 14:49:08 +00:00
yamt
2224a4350f plug a mbuf leak. 2007-01-17 12:40:36 +00:00
yamt
3be095f658 plug mbuf leaks. 2007-01-17 12:40:08 +00:00
elad
8426ae751a Consistent usage of KAUTH_GENERIC_ISSUSER. 2007-01-04 20:24:08 +00:00
yamt
a23a6ee6c6 remove several nqnfs definitions. 2006-12-28 00:39:03 +00:00
yamt
431da137b1 - remove the rest of nqnfs.
- reject NFSMNT_MNTD and NFSMNT_KERB.  (no users in tree.)
2006-12-27 12:51:22 +00:00
yamt
ccfd2c0df0 remove nqnfs. 2006-12-27 12:10:09 +00:00
chs
c398ae9734 a smorgasbord of improvements to vnode locking and path lookup:
- LOCKPARENT is no longer relevant for lookup(), relookup() or VOP_LOOKUP().
   these now always return the parent vnode locked.  namei() works as before.
   lookup() and various other paths no longer acquire vnode locks in the
   wrong order via vrele().  fixes PR 32535.
   as a nice side effect, path lookup is also up to 25% faster.
 - the above allows us to get rid of PDIRUNLOCK.
 - also get rid of WANTPARENT (just use LOCKPARENT and unlock it).
 - remove an assumption in layer_node_find() that all file systems implement
   a recursive VOP_LOCK() (unionfs doesn't).
 - require that all file systems supply vfs_vptofh and vfs_fhtovp routines.
   fill in eopnotsupp() for file systems that don't support being exported
   and remove the checks for NULL.  (layerfs calls these without checking.)
 - in union_lookup1(), don't change refcounts in the ISDOTDOT case, just
   adjust which vnode is locked.  fixes PR 33374.
 - apply fixes for ufs_rename() from ufs_vnops.c rev. 1.61 to ext2fs_rename().
2006-12-09 16:11:50 +00:00
yamt
9c62b6fe1d nfs_disconnect: 2 -> SHUT_RDWR. no functional change. 2006-12-06 09:13:46 +00:00
yamt
6c575a38c3 nfsrv_rcv: claim ownership of received mbufs. 2006-12-06 08:55:52 +00:00
yamt
89682b24fe remove some __unused in function parameters. 2006-11-09 09:53:57 +00:00
mjf
a2be0ed655 Revert the changes I introduced trying to solve tmpfs' NFS export problem.
Requested by yamt@
2006-10-31 08:12:46 +00:00