Age | Commit message (Collapse) | Author |
|
ok md5 "can't be worse" thib@
|
|
case.
ok guenther@ thib@
|
|
problem has been tracked down. This fixes the sharing of the signal
handling state: shared bits go in sigacts, per-rthread bits goes in
struct proc.
ok deraadt@
|
|
down curproc instead of the struct proc from the I/O request...which
may gone away behind our back. Assert that the supplied request
*is* curproc in a couple other places.
Reproduction and testing by sthen@
ok deraadt@, beck@, art@
|
|
|
|
until they're zombies and then send them signals (for intr mounts). Until
that is untangled, the sigacts change is unsafe. sthen@ was the victim
for this one
|
|
be shared (p_sigignore, p_sigcatch, P_NOCLDSTOP, P_NOCLDWAIT) moves
to struct sigacts, wihle stuff that should be per rthread (ps_oldmask,
SAS_OLDMASK, ps_sigstk) moves to struct proc. Treat the coredumping
state bits (ps_sig, ps_code, ps_type, ps_sigval) as per-rthread
until our locking around coredumping is better.
Oh, and remove the old SunOS-compat ps_usertramp member.
"I like the sound of this" tedu@
|
|
and return EOPNOTSUPP directly from the VOP_* functions.
Filesystems should, at some point fill in every function
in the vop_default struct so we can get rid of the 'if'
statements in VOP_*.
|
|
unrelated, and his alpha is much happier now.
OK deraadt@
|
|
Re-initializing the pool everytime nfsd(8) terminates is very bad since it
screws up the list of pools resulting in infinite loops when traversing that
list. Issue found by Daniel Melameth.
ok deraadt@
|
|
have been resolved.
|
|
OK oga@, beck@, matthew@
|
|
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@
|
|
as the kernel now compiles w/o ``#include <sys/pool.h>'' in mbuf.h; removing
that line, though, is for another day, as a userland program (systat, IIRC)
fails to build without it there.
ok krw@
|
|
cannot then re-align it using ALIGN(). That is not portable since we
have architectures where the modulo are quite different. define an
ALIGN_POINTER() macro in place, and use it in one spot.
This caused a NFS crash on sparc (which borrows mbufs and chains them
itself in insane ways). I heard claudio and beck trying to diagnose
it from over the room when suddenly I knew exactly what it was.
blambert spent a few hours on it making sure that I wasn't insane.
|
|
are required to detect that.
Change the function to take a wait argument (used in nfs server, but
M_NOWAIT everywhere else for now) and to return an error
ok claudio@ henning@ krw@
|
|
sync a few comments to reality (or remove them), remove the cn_hash member
from struct componentname, spacing.
ok beck@
|
|
the nfs_bufq is full - instead tsleep waiting for one of our nfsiod's
to free up space for us in the queue so we can enqueue on the end.
ok blambert@, tedu@, oga@
|
|
switch(type) {
case VREG:
/*something */
break;
case VLNK:
/* something */
break;
default:
panic("wtf?");
}
do_something_that_doesn't_change_type();
switch(type) {
case VREG:
/* nowt */
break;
case VLNK:
n = 0;
break;
default:
panic("wtf?");
}
be a bit less silly and replace the second switch with:
if (type == VLNK)
n = 0;
ok beck@, blambert@
|
|
deciding to do nothing, printing about it and continuing along our merry
way without even erroring the sodding buffer, just panic. by this point
we are liked very fucked up anyway.
found in either edmonton or stockholm then forgotten. ok beck@,
blambert@
|
|
ok deraadt@
|
|
Feedback from miod@ and kettenis@.
ok beck@
|
|
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@
|
|
picking a name meant that more than 58 sillys in a directory and we fail
with EINVAL, resulting in strange problems for nfs which in turn causes
pain and stress in building, and PTSD in nfs and vfs hackers. Has bit us
in the butt since the vienna f2k7 hackathon.
good suggestions from deraadt@ guenther@ and otto@
ok deraadt@,oga@,blambert@,krw@,guenther@, and a "very special ok" tedu@
Oh god, I'm an nfs hacker..
|
|
a directory gets reclaimed on a forced unmount before the silly file
in it gets blown away... fixes an issue seen by phessler@
ok oga@, art@
|
|
no binary change apart from nfsm_reqhead() which is clearly correct.
ok thib@
|
|
problem noticed by deraadt@
ok beck@
|
|
already been freed, thus make the callers of nfs_namei() bail out early,
instead of jumping to nfsmout as there they will try to vrele() vnodes
that don't exists (NULL pointers) and free the pathname buffer.
this is way nicer then adding checks after the nfsmout label.
OK blambert@
|
|
Tiny spacing nit.
Fix a typo, pointed out by miod@.
|
|
and worked members. nad_worked becomes NFSAIOD_WAKEUP, which is set after if
an aiod was removed from the idle list and woken up by nfs_asyncio().
don't rely on tsleep wchans being unique, that is keep going back to sleep if
woken up unless the NFSAIOD_WAKEUP flag is set.
fix a divide by zero crash if nfs.vfs.iothreads is set to 0, as that can happen
when we recalculate the maximum buf's to queue up for each aiod.
in nfs_asyncio() set the nad_mnt to NULL before returning the aiod back to the
idle list in the case where we have already queued up to many bufs, otherwise
we trip an assertion.
minimize the time we are holding the nfs_aiodl_mtx to only when we are inserting
or removing from the lists, with the exception of nfs_set_naiod() as it would
make the loops more complicated and its uncommon in any case.
tested by myself and deraadt@
"fine with me" deraadt@
|
|
before inserting it back into the list.
crashes debugged with help from deraadt@ who also tested this fix.
|
|
also make the rexmit timeout per nfsmount, and make sure to start/stop the
timer appropriately.
now the nfs_timer() only fires if there is work todo, not always at nfs_ticks
(it did, even if there where no nfsmounts in the system!).
OK blambert@
|
|
each mount, and when work is "found", peg an aiod to that mount todo the
I/O. Make nfs_asyncio() a bit smarter when deciding when to do asyncio
and when to force it sync, this is done by keeping the aiod's one two lists,
an "idle" and an "all" list, so asyncio is only done when there are aiods
hanging around todo it for us or are already pegged to the mount.
Idea liked by at least beck@ (and I think art@).
Extensive testing done by myself and jasper and a few others on various
arch's.
Ideas/Code from Net/Free.
OK blambert@.
|
|
and rewrite the nfsreq code to use pool_walk().
OK beck@, blambert@
|
|
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@
|
|
ok thib@
|
|
ok thib@
|
|
ok thib@
|
|
use mbufs directly, but the shiny new nfsm_info struct
ok thib@
|
|
prodded by and ok thib@
agreed by art@ and blambert@
|
|
pointer since its just used in one place.
ok blambert@
|
|
- Prevent a double vrele() by setting the vnode pointer to NULL.
- Check if vnode pointers have been set to NULL before trying to
vrele().
- don't double free the component path name buffer.
- Add a workaround for multiple vnode pointers all pointing to the
same vnode and the code doing vrele() on all of them, leading to
botched refcounts. This is a horrible hack, but a real fix is being
worked on.
OK blambert@
|
|
Idea from NetBSD.
OK blambert@
|
|
error = operation();
memory = malloc();
if (error) free(memory);
gets relegated to the dustbin of history
ok thib@
|
|
but extensive performance benchmarking done by myself and jasper@
has shown that it doesn't help, at all - even on vaxens and in some
cases it makes things significantly slower.
"this excites me sexually" jetpack@
Tested by jasper@.
OK blambert@
|
|
High five from thib@
|
|
loop over allocating a chain of mbufs to store <= NFS_MAXPATHLEN
bytes.
Clean up some variables, which thib@ likes.
ok thib@
|