Age | Commit message (Collapse) | Author |
|
OK oga@, beck@, matthew@
|
|
Feedback from miod@ and kettenis@.
ok beck@
|
|
no binary change apart from nfsm_reqhead() which is clearly correct.
ok thib@
|
|
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@
|
|
ok thib@
|
|
ok thib@
|
|
use mbufs directly, but the shiny new nfsm_info struct
ok thib@
|
|
- 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@
|
|
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@
|
|
loop over allocating a chain of mbufs to store <= NFS_MAXPATHLEN
bytes.
Clean up some variables, which thib@ likes.
ok thib@
|
|
memory = malloc();
if (error) free(memory);
makes no sense; move error checking to above memory allocation
ok thib@
|
|
from it.
This can cause us to follow garbage in the nfsd loop, causing two kinds of hell.
problem noticed by nicm@. OK blambert@.
|
|
to keep the data munging "state" into an nfsm_info structure. Each
function now has this structure on its stack, and it and its members
are now passed around so that the macros/functions can work there magic.
this will make removing the nfsm_* macros way easier.
Idea/code picked up from DragonflyBSD.
Tested by krw@, jacekm@ and myself.
OK blambert@.
|
|
OK blambert@
|
|
some error cases
ok thib@
|
|
actually get us anything.
ok thib@
|
|
ok thib@
|
|
"get it in" thib@
|
|
|
|
|
|
Diff from FreeBSD.
OK blambert@
|
|
error = foo();
if (!error)
bar();
is an alien construct; replace with one from this planet
ok thib@
|
|
ok thib@
|
|
idea never really caught on anywhere so retire it.
"gank this shizzle", blambert@
|
|
In snaps for a while (way too long, according to deraadt@)
|
|
In snaps for a while.
|
|
levels. This will allow for platforms where soft interrupt levels do not
map to real hardware interrupt levels to have soft ipl values overlapping
hard ipl values without breaking spl asserts.
|
|
pointed out by bluhm@, "obvious" thib@
|
|
timeouts. Rrids us of the ugly cur_sec variable, and some shadows.
Also helps with granularity.
Diff from blambert@ who asked me to commit this since he's away for
some days and we wanted to put this in with the timespec changes in
the nfsnode.
|
|
as for open/read/write etc, that is assume that the file
as already been opened proper, this fixes an ancient
ftruncate bug, that is if ftruncate was called on a file
with no write modes, we'd return EACCES, this breaks posixy
behavior. however, for e.g. truncate() we'll return EACCESS
as we should.
Diff from PR5880 by mickey.
I had forgotten about this PR, and the fix but niklas@ ran
into similar issues which prompted another review of this.
OK kettenis@
|
|
its used only once and nuke its definition.
Stolen from blambert's bag'o'diffs.
OK blambert@.
|
|
hurt readability and it was just plain annoying seeing them defined
in every other .c file.
OK blambert@
|
|
ok blambert@
|
|
ok blambert@
|
|
filehandle -> mbuf write macros.
Removes `magic' variable cp which was used only in these macros,
and should lead to marginally better mbuf packing as well.
`slap it in' thib@
|
|
ok blambert@
|
|
the function it was named after took 4 arguments instead of 2.
"get it in; get it in; get it in" thib@
|
|
NFS mbufs, mbufs now contain all their internal buffer state internally,
the way god intended.
ok thib@
testing johan@ (and possibly merdely@; this diff's been around for a bit...)
|
|
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
|
|
handrolled loops with nfsm_strtombuf and nfsm_buftombuf.
ok deraadt@ via thib@; ok 'nfs buddy' thib@
testing johan@, merdely@; thanks
|
|
(the latter only had it to pass it to nfsrv_fhtovp()).
appropriate cleanup also;
ok blambert@
|
|
and add some to be able to support statvfs(2). Do the compat dance
to provide backward compatibility. ok thib@ miod@
|
|
When you use a macro ~200 times, it tends to bloat your code, so make a
function out of it.
Shaves ~8.5 kB from my kernel.
ok thib@, "looks good" krw@
In snaps for 1+ week with no negative reports.
|
|
Use the va_blocksize, that is the blocksize of the underlying exported
file system instead of the DIRBLKSIZ constant to size the chunks.
Diff from Enache Adrian <3n4ch3@gmail.com>
Tested by myself and a few others.
|
|
ok thib@ 'emphatic' ok beck@
|
|
and nuke it's definition.
OK krw@, blamers@
|
|
nuke it's definition.
OK krw@, blambert@
|
|
variables, that are declared all over, since they are passed via macros
to nfs_rephead(); which doesn't do anything with it.
OK krw@
|
|
Uneeded includes and casts...
ok krw@
|