Age | Commit message (Collapse) | Author |
|
ok miod@ mpi@
|
|
Make the silly file removal happen after the vnode has been unlocked.
This avoids a file-directory reversal in the vnode locking order.
OK jca@
|
|
(both kernel and userland bits)
GENERIC + VFSLCKDEBUG is broken with it.
|
|
This flag is currently used to mark or unmark a vnode to actively
check vnode locking semantic (when compiled with VFSLCKDEBUG).
Currently, VLOCKSWORK flag isn't properly set for several FS
implementation which have full locking support. This commit enable
proper checking for them too (cd9660, udf, fuse, msdosfs, tmpfs).
Instead of using a particular flag, it directly check if
v_op->vop_islocked is nullop or not to activate or not the vnode
locking checks.
ok mpi@
|
|
use VOP_LOCK / VOP_UNLOCK wrappers.
VOP_LOCK() is prefered over vn_lock() here in order to keep equivalent code.
ok mpi@ visa@ (as part of larger diff)
|
|
into read-only data segment.
OK deraadt@ tedu@
|
|
OK mpi@
|
|
Tested in bulks by many. ok visa@, beck@
|
|
curproc that does the locking or unlocking, so the proc parameter
is pointless and can be dropped.
OK mpi@, deraadt@
|
|
nodes.
nfs_root() now returns a "locked" vnode, so vput(9) must be called to
release it. Note that this has currently no effect as nfs_lock/unlock
are still stubs.
This will prevent some lock odering problems with upcoming NFSnode
locking.
Tested by landry@, sthen@, visa@, naddy@ and myself.
From NetBSD with some tweaks, ok visa@
|
|
protect insertions in `nm_ntree'.
This will prevent a future lock ordering problem with NFSnode's lock.
ok tedu@, visa@
|
|
|
|
torture tested on amd64, i386 and macppc
ok beck mpi stefan
"the change looks right" deraadt
|
|
ok tedu@, with a slight tweak
|
|
have any direct symbols used. Tested for indirect use by compiling
amd64/i386/sparc64 kernels.
ok tedu@ deraadt@
|
|
|
|
|
|
objective: vnode.h doesn't include uvm_extern.h anymore.
followup changes: include uvm_extern.h or lock.h where necessary.
ok and help from deraadt
|
|
|
|
ok mpi@ kspillner@
|
|
after discussions with beck deraadt kettenis.
|
|
unrelated, and his alpha is much happier now.
OK deraadt@
|
|
have been resolved.
|
|
vector setup that has questionable features (that have, as far as I can
tell never been used in practice, atleast not in OpenBSD), remove all
the gunk and favor a simple struct full of function pointers that get
set directly by each of the filesystems.
Removes gobs of ugly code and makes things simpler by a magnitude.
The only downside of this is that we loose the vnoperate feature so
the spec/fifo operations of the filesystems need to be kept in sync
with specfs and fifofs, this is no big deal as the API it self is pretty
static.
Many thanks to armani@ who pulled an earlier version of this diff to
current after c2k10 and Gabriel Kihlman on tech@ for testing.
Liked by many. "come on, find your balls" deraadt@.
|
|
Bogus chunks pointed out by matthew@ and miod@. No cookies for
marco@ and jasper@.
ok deraadt@ miod@ matthew@ jasper@ macro@
|
|
in nfs_inactive, on a reboot.
The core of the problem was in nfs_nget, when we lose the race to put a new
nfsnode in the tree, we have previously allocated a vnode, which getnewvnode
has done an insmntque into the nfs mp's mntlist. The problem being we then
try again with a new vnode, abandoning this one on the mntlist, leaving
junk there for us to die on when we unmount.
This introduces VLARVAL - so we can indicate in a vnode that the higher
level stuff hiding in v_data is incompletely set up. This flag is then
used by nfs to deal with a halfway set up vnode and release it correctly.
analysis and bogus fix by art@, correct fix by me after serveral failed
attempts and much painful testing by krw@, good suggestions by tedu and miod
ok krw@ oga@ thib@ blambert@ art@
|
|
the first try
vgone doesn't work in other cases of this. I must fix this slightly differntly
|
|
in nfs_inactive, on a reboot.
The core of the problem was in nfs_nget, when we lose the race to put a new
nfsnode in the tree, we have previously allocated a vnode, which getnewvnode
has done an insmntque into the nfs mp's mntlist. The problem being we then
try again with a new vnode, abandoning this one on the mntlist, leaving
junk there for us to die on when we unmount.
analysis and bogus fix by art@, correct fix by me. much painful testing by
krw@
ok oga@, art@
|
|
What can happen is that a recycling of a vnode could pull one from out
under us (since NFS has issues with ref counts...).
Dance around getnewvnode() since we can end up recycling vnodes that
where formerly owned by NFS, causing recursive locking.
We where lucky with the old hashtables has the race was rare but now
with more aggresive recycling we loose, just as theo found out on vax.
help from oga, beck and blambert (beck mostly screamed though).
ok oga@, beck@, blambert@
|
|
pointer since its just used in one place.
ok blambert@
|
|
Idea from NetBSD.
OK blambert@
|
|
OK blambert@
|
|
hurt readability and it was just plain annoying seeing them defined
in every other .c file.
OK blambert@
|
|
|
|
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@
|
|
as it was never used because there were 64-bit buffers already allocated
for filehandles in nfsnode structs.
ok thib@
|
|
conversions that should shave a few bytes off the kernel.
ok henning, krw, jsing, oga, miod, and thib (``even though i usually prefer
FOO|BAR''; thanks for looking.
|
|
Also, it is historical practice to #include <sys/queue.h>
when using queue.h macros.
ok thib@ krw@
special thanks to krw@ for reminders vice violence
|
|
add a function to handle cache_enter()'s for us since
we need to update the appropriate timestamps so we don't
miss on lookup;
o Do not purge the dvp in nfs_rmdir(), since there's no need;
o cache the new entry created in nfs_mkdir();
o Do caching of the access modes, this drastically reduces the
amount of over the wire access RPCs we do in the NFSv3 case.
This diff was written by Pedro Martelletto, sometime in 2004.
A lot of people have been running with it at one time or another,
this includes at least markus and matthieu.
OK deraadt@, blambert@
|
|
was used as a part of the "old-style directory caching"
that was removed in 2001;
ok beck@, blambert@
|
|
Uneeded includes and casts...
ok krw@
|
|
"ap = v" comments in under 8 seconds, so it must be ok. and it compiles
too.
|
|
Pick reasonble names for the locks involved..
ok tedu@, art@
|
|
ok tedu@
|
|
without breaking into ddb. doubles the size of rwlock [1], but moving
forward this really helps. ok/tested pedro fgsch millert krw
[1 - next person to add a field to this struct gets whipped with a wet noodle]
|
|
Inspiration from miod@, okay deraadt@. Tested on i386, macppc and amd64.
|
|
|
|
of panics and bugfixes. Access curproc directly, do not expect a process
pointer as an argument. Should fix many "process context required" bugs.
Incentive and okay millert@, okay marc@. Various testing, thanks.
|
|
no change in compiler assembly output.
|
|
these into larger ranges wherever possible.
this should speed up NFS writes quite a bit.
ok art@ millert@ pedro@ tedu@
|