Commit Graph

975 Commits

Author SHA1 Message Date
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
jmmv bccb33bf70 Fix a typo in a comment. 2006-10-30 16:06:05 +00:00
reinoud dc5b5420b9 Revisit mnt_vnodelist TAILQ patch. Remove all suspicious TAILQ_FOREACH()
loops where vnodes can get removed or added during the loops. This could
lead to panic's on unmount since nodes are skipped or otherwise
TAILQ_NEXT(0xdeadbeef, ...) was dereferenced.
2006-10-25 22:01:54 +00:00
mjf 84bd46b9f9 Add support to allow a file system to not permit being exported over NFS.
Approved by elad@ and wrstuden@
2006-10-24 21:53:10 +00:00
pooka 96d8335980 kauth_cred_uucvt() -> kauth_uucred_to_cred(), introduce kauth_cred_to_uucred()
per tech-kern proposal
2006-10-22 13:07:15 +00:00
reinoud 0ce809091d Replace the LIST structure mp->mnt_vnodelist to a TAILQ structure since all
vnodes were synced and processed backwards. This meant that the last
accessed node was processed first and the earlierst last.

An extra benefit is the removal of the ugly hack from the Berkly days on
LFS.

In the proces, i've also replaced the various variations hand written loops
by the TAILQ_FOREACH() macro's.
2006-10-20 18:58:12 +00:00
dogcow 372e6ef309 now that we have -Wno-unused-parameter, back out all the tremendously ugly
code to gratuitously access said parameters.
2006-10-17 18:21:29 +00:00
christos 3b347a3429 another variable should have been _KERNEL only. 2006-10-17 14:55:13 +00:00
christos 0a3d351aae don't expose kernel variables to userland. 2006-10-17 14:53:54 +00:00
yamt 583781abd3 grab glock when calling uvm_unp_setsize, so that it doesn't interfere
mmap'ed accesses.  this fixes an assertion failure in in nfs_doio_read.
("vp->v_size >= uiop->uio_offset + uiop->uio_resid")
2006-10-14 09:18:57 +00:00
christos 6c265266c5 more __unused 2006-10-13 20:53:59 +00:00