Commit Graph

1733 Commits

Author SHA1 Message Date
rmind
fbc8beae75 Split off parts of vfs_subr.c into vfs_vnode.c and vfs_mount.c modules.
No functional change.  Discussed on tech-kern@.
2011-04-02 04:28:56 +00:00
dyoung
060522dec8 Hide the radix-trie implementation of the forwarding table so that we
will have an easier time replacing it with something different, even if
it is a second radix-trie implementation.

sys/net/route.c and sys/net/rtsock.c no longer operate directly on
radix_nodes or radix_node_heads.

Hopefully this will reduce the temptation to implement multipath or
source-based routing using grotty hacks to the grotty old radix-trie
code, too. :-)
2011-03-31 19:40:51 +00:00
pooka
bf89b7ec3f actually add libpud and revert damage to libputter.
pax -rw and forgetting to rm -rf CVS has some nasty side-effects ....
2011-03-31 08:36:25 +00:00
pooka
fe98957153 add pud as a rump component 2011-03-31 08:22:54 +00:00
dyoung
149dd44b66 __HAVE_DEVICE_REGISTER_POSTCONFIG and __HAVE_DEVICE_REGISTER
are no more, so don't use them here.
2011-03-28 22:23:39 +00:00
riz
d16ddb6294 Don't try to kmem_alloc() 0 bytes. Without this change, some trivial
kernel modules were not loadable by rump_server.
2011-03-27 21:16:52 +00:00
bouyer
d9210c2405 Add a new libquota library, which contains some blocks to build and/or
parse quota plists; as well as a getfsquota() function to retrieve quotas
for a single id from a single filesystem (whatever filesystem this is:
a local quota-enabled fs or NFS). This is build on functions getufsquota()
(for local filesystems with UFS-like quotas) and getnfsquota();
which are also available to userland programs.
move functions from quota2_subr.c to libquota or libprop as appropriate,
and ajust in-tree quota tools.
move some declarations from kernel headers to either sys/quota.h or
quota/quota.h as appropriate. ufs/ufs/quota.h still installed because
it's needed by other installed ufs headers.
ufs/ufs/quota1.h still installed as a quick&dirty way to get a code
using the old quotactl() to compile (just include ufs/ufs/quota1.h instead of
ufs/ufs/quota.h - old code won't compile without this change and this is
on purpose).
Discussed on tech-kern@ and tech-net@ (long thread, but not much about
libquota itself ...)
2011-03-24 17:05:39 +00:00
pooka
a3a20972d9 pnbuf_cache is used all over the place outside of vfs, so put it
in one place to avoid many definitions.
2011-03-22 15:16:23 +00:00
pooka
23bbd0e078 Update copyright statements.
no functional change.
2011-03-21 16:41:08 +00:00
pooka
056c4b30fa remove historic test 2011-03-21 15:51:34 +00:00
pooka
20c88ef126 this was moved to usr.bin ages ago 2011-03-21 15:47:53 +00:00
joerg
ad65a463d1 Include bsd.own.mk before making decisions based on mk.conf. 2011-03-21 05:15:18 +00:00
pooka
2750f1b5f9 make the if-else logic more obvious 2011-03-11 12:11:00 +00:00
pooka
86a95d8e4b After my change to the "interface accepts this packet" logic
yesterday the CARP test stopped working, since CARP depends on
IFF_PROMISC (which was previously always accidentally enabled).
While making the interface honor IFF_PROMISC, also make it compare
the received frame's address against ifp->if_sadl instead of a
local enaddr value we cached when the interface was created.
2011-03-11 12:10:15 +00:00
pooka
a6893ed075 Don't assume rump kernel PAGE_SIZE and host page size are the same. 2011-03-11 09:25:59 +00:00
wiz
fd1ad431e8 When panicing, at least tell the _real_ reason. 2011-03-10 22:11:05 +00:00
pooka
cd97edf46b autocreate /dev/zfs. requested by riz 2011-03-10 19:24:37 +00:00
pooka
8fa2364979 Support bpf. shmif_dumpbus(1) can be used for much the same effect,
but sometimes it's just more convenient to run tcpdump live.
2011-03-10 13:27:03 +00:00
pooka
d377d1cc83 Pass packet up if it's *for* us, not if it's from someone else.
This fixes a rather curious forwarding/redirect/etc. storm which
happened when there were >2 shmif kernels on the same shmbus with
ip forwarding set on. (at least it stress-tested other code ;)
2011-03-10 13:20:54 +00:00
pooka
df23472915 track lockdebug data even in the special path 2011-03-09 23:41:24 +00:00
pooka
49bc93eb11 Mark cv_wait mutex as locked before doing any further dances.
Fixes a LOCKDEBUG panic in case the uncommon condition is hit.
2011-03-09 18:15:39 +00:00
pooka
d469e02a3b Create cgd block device files in the right directory.
hi pooka!
2011-03-09 11:56:17 +00:00
pooka
08f26b12e5 Duh, the nfsd hacks in tests still used RUMP_SYS_NETWORKING. It
appears that using nxr to search for users wasn't a very good idea.
Put networking back and make the test of the defines give out
#errors.

me be fixink this
2011-03-09 10:10:19 +00:00
pooka
53b769ebd0 g/c old-style syscall selection method 2011-03-08 18:35:10 +00:00
pooka
ffad644563 regen: include rumpclient syscall headers from source tree instead of host 2011-03-08 18:31:11 +00:00
pooka
91240244df Nuke all threads belonging to a process calling exec before allowing
the exec handshake to return.

In addition to being The Right Thing To Do, fixes some nasty
conditions for CLOEXEC fd's (or at least does so in theory, I
couldn't create any problems although I tried).
2011-03-08 12:39:28 +00:00
pooka
9d382a98c5 Fill in a functional struct lwp (especially l_mutex) before exposing
it on p_lwps.
2011-03-07 21:04:47 +00:00
bouyer
063f96f3c2 merge the bouyer-quota2 branch. This adds a new on-disk format
to store disk quota usage and limits, integrated with ffs
metadata. Usage is checked by fsck_ffs (no more quotacheck)
and is covered by the WAPBL journal. Enabled with kernel
option QUOTA2 (added where QUOTA was enabled in kernel config files),
turned on with tunefs(8) on a per-filesystem
basis. mount_mfs(8) can also turn quotas on.

See http://mail-index.netbsd.org/tech-kern/2011/02/19/msg010025.html
for details.
2011-03-06 17:08:10 +00:00
joerg
8871ccf0f3 Fix spelling of MKZFS 2011-03-05 03:15:25 +00:00
pooka
67365afb80 We track page modified info with PG_CLEAN, so make clear_modify
return false.  This makes rump lfs unmount work on platforms which
use the pmap stub (i.e. non-x86, which already returned false here).
Otherwise, lfs would hang itself trying to flush some buffers but
couldn't fill a segment and therefore wouldn't actually write
anything.
2011-03-02 13:11:52 +00:00
pooka
da0742f9b8 Reset node's parent pointer when it's removed. Technically the
parent still exists, but allows us to avoid complicated g/c algorithms
if the parent *is* removed.
2011-03-01 15:14:35 +00:00
pooka
405dec72d6 Pass accurate protection info from ubc_uiomove() to the pager.
Fixes nfs{,ro}_fileio tests on at least sparc64 (and probably macppc
and other fat endian machines).

The problem was that nfs was fooled to thinking read() caused a
write fault because of VM_PROT_WRITE being unconditionally set and
therefore set NMODIFIED on a r/o file system.  It is absolutely
beyond me why the test worked on i386/amd64.  Incidentally, I seem
to have "misplaced" a few goats.
2011-03-01 10:02:11 +00:00
pooka
9bd36d4186 tmpfs has two layers of uvm objects (vnode->uobj and the anon object
in tmpfs_node), so when playing with pages make sure we lock the
uvm object the pages belong to instead of the vnode's uvm object.

per test from Nicolas Joly (which I'm sure he will commit soon ;)
2011-02-27 13:37:39 +00:00
riz
7559b861a8 Use AUDIO_DEVICE instead of 0 as the minor number for /dev/audio since
0 is incorrect. While I'm here, add /dev/sound, audioctl, and mixer too.

ok pooka@
2011-02-25 19:27:05 +00:00
pooka
4d59265f95 Don't autogenerate a large number of unnecessary device nodes, just
slows bootstrap.
2011-02-25 18:56:20 +00:00
pooka
db3f366798 Shuffle the pagedaemon algorithm a bit to record the number of
pageouts active and give up only if the pagedaemon could not free
memory and there are no outstanding pageouts.

This should fix the "out of memory" pauses reported by Mihai Chelaru
and Taylor R Campbell.  Tested by copying files to and from an ffs
backed by /dev/wd0 (with and without -o log) using a 1MB rump kernel
memory limit.
2011-02-22 20:17:37 +00:00
pooka
30a736a57d complete the incomplete pagesize rototill 2011-02-22 18:43:20 +00:00
pooka
bfe95d83e2 omstart 2011-02-22 14:09:35 +00:00
pooka
b4a00f1f22 regenagain: make returning off_t work (without breaking other return
types on some archs)
2011-02-22 14:06:29 +00:00
pooka
65fa004526 unregen 2011-02-22 13:05:07 +00:00
pooka
6578cf43da regen: cast rval to return type instead of just using rval[0] 2011-02-22 10:34:06 +00:00
pooka
686a05ebe4 regen: NOERR syscalls 2011-02-21 23:31:00 +00:00
pooka
5c02795ed4 regen: preadv/pwritev 2011-02-21 12:49:49 +00:00
pooka
2e56e2896f regen: always explicitly set errno (fixes some apps) 2011-02-21 11:33:36 +00:00
pooka
a21e393066 commit regen for int -> pid_t fix 2011-02-21 11:32:26 +00:00
pooka
dd69b8ebde Change the default sigmodel to "raise", it makes more sense than
causing a panic.
2011-02-20 13:09:57 +00:00
pooka
9b097994c2 Support FD_CLOEXEC in rump kernels. 2011-02-15 15:54:28 +00:00
pooka
abcc13e159 Add an "exec" callback for the proxy code. The client can now
notify the rump kernel of an exec having taken place.
2011-02-15 10:35:05 +00:00
pooka
22c822c7f3 Make vmapbuf() return success/error and make physio deal with a
failure.
2011-02-10 14:46:44 +00:00
pooka
fcae73ef09 Set b_error in vunmapbuf() if copyout_proc fails.
XXX: what if copyin fails in vmapbuf()?
2011-02-10 13:49:10 +00:00