for any sensible operation when running the entire TCP/IP stack in
userspace (as opposed to libsockin which uses host kernel networking
to provide PF_INET).
While this basically works (although it is quite barebones), it
depends on some bit of cleanup in librump and is not built by
default yet.
which delegates the work to host kernel sockets. This does not
run the entire kernel TCP/IP stack in userspace and therefore does
not require the ability to send or receive raw packets. This
implies that root priviledges are not required. As already said
above, only supports UDPv4 for now. Extending should be easy.
to the root vnode. Properly fixing this would require fixing p2k,
which would require fixing puffs, which has some optimizations,
which are incompatible with kernel file systems... guess my Eyes
of the Overworld were misplaced at that time.
the other mount binaries do. Now syspuffs can be used to run all
puffs file systems as utilities. This includes fuse file systems
and becomes interesting with the fs-utils project. We can now do
e.g. this:
ReFUSE ntfs-3g:
golem> echo hello | fsu_write/fsu_write ntfs-3g puffs ~/img/ntfs.img dafile
golem> fsu_cat/fsu_cat ntfs-3g puffs ~/img/ntfs.img dafile
hello
golem>
puffs sysctlfs:
golem> fsu_ls/fsu_ls mount_sysctlfs puffs sysctl -l ddb
total 0
-r-xr-xr-x 1 pooka users 1 Sep 2 22:11 commandonenter
-r-xr-xr-x 1 pooka users 2 Sep 2 22:11 fromconsole
-r-xr-xr-x 1 pooka users 3 Sep 2 22:11 lines
-r-xr-xr-x 1 pooka users 8 Sep 2 22:11 maxoff
-r-xr-xr-x 1 pooka users 3 Sep 2 22:11 maxwidth
-r-xr-xr-x 1 pooka users 2 Sep 2 22:11 onpanic
-r-xr-xr-x 1 pooka users 3 Sep 2 22:11 radix
-r-xr-xr-x 1 pooka users 2 Sep 2 22:11 tabstops
-r-xr-xr-x 1 pooka users 2 Sep 2 22:11 tee_msgbuf
Same works for psshfs etcetc.
In other words, this provides total integration for "normal"
in-kernel file systems and puffs/fuse file systems on the ukfs
library level.
Note: implementation is still "first stab" and the fs-utils usage
will no doubt change.
system modules for use. Sneakily this solves the problem with the
dynamic linker not wanting to handle the modules link set for
binaries where more than one file system library is included during
the link phase and therefore only one of the file systems getting
vfs_attach()ed in rump "boot". But more importantly, this is really
TRTTD, since now applications can be built, linked and shipped
completely independently of the file systems they support.
tested by Arnaud Ysmal
Add Wasabi System's WAPBL (Write Ahead Physical Block Logging)
journaling code. Originally written by Darrin B. Jewell while
at Wasabi and updated to -current by Antti Kantee, Andy Doran,
Greg Oster and Simon Burge.
OK'd by core@, releng@.
private non-installed build infrastructure from sys/rump.
breakdown of commit:
* install relevant headers into /usr/include/rump
* build sys/rump/librump/rumpuser and sys/rump/librump/rumpkern
from src/lib and install as librumpuser and librump, respectively
+ this retains the ability to test a librump build with just the
kernel sources at hand
* move sys/rump/fs/lib/libukfs and sys/rump/fs/lib/libp2k to src/lib
for general consumption, they are not kernel-space dwellers anyway
* build and install sys/rump/fs/lib/lib$fs as librumpfs_$fs
* add chapter 3 manual pages for rump, rumpuser, ukfs and p2k
* build and install userspace kernel file system daemons if MKPUFFS=yes
is spexified
* retire fsconsole for now, it will make a comeback with an actually
implemented version shortly
for evbppc). Obligatory inlined rant: it would be really nice if
we didn't have weird ports like that which sport totally incompatible
code for different kernels.
into two parts so that some of the routines could be used by rump.
Now that rump uses both vfs_subr and vfs_subr2 and there is no
reason to keep two files lying around, re-unite them.
files rumpdefs.h, rumpnode_if.h, and rumpvnode_if.c. This is so that
an UPDATE build has a chance of succeeding.
Discussed with pooka@, and he wasn't totally against adding this...
- Don't use goto in critical paths, it can confuse the compiler.
- Sprinkle some branch hints.
- Make namecache stats per-CPU and collate once per second.
- Use vtryget().
Simplify the mount locking. Remove all the crud to deal with recursion on
the mount lock, and crud to deal with unmount as another weirdo lock.
Hopefully this will once and for all fix the deadlocks with this. With this
commit there are two locks on each mount:
- krwlock_t mnt_unmounting. This is used to prevent unmount across critical
sections like getnewvnode(). It's only ever read locked with rw_tryenter(),
and is only ever write locked in dounmount(). A write hold can't be taken
on this lock if the current LWP could hold a vnode lock.
- kmutex_t mnt_updating. This is taken by threads updating the mount, for
example when going r/o -> r/w, and is only present to serialize updates.
In order to take this lock, a read hold must first be taken on
mnt_unmounting, and the two need to be held across the operation.
One effect of this change: previously if an unmount failed, we would make a
half hearted attempt to back out of it gracefully, but that was unlikely to
work in a lot of cases. Now while an unmount that will be aborted is in
progress, new file operations within the mount will fail instead of being
delayed. That is unlikely to be a problem though, because if the admin
requests unmount of a file system then s(he) has made a decision to deny
access to the resource.
buf_memcalc is used by bootstrap as well. fix NULL dereference for them.
- limit kva usage for each cache to 20% of vm_map. XXX a bit arbitrary.
- add a comment.
pre/postcall wrapper around the exported namei, since postcall no
longer needs to execute VFS_ROOT (which is a bad thing to do while
potentially holding on to a locked vnode, mmkay).
tricky) with the help of rump system calls instead of calling namei
by themselves. Trust me when I say it was non-trivial to get the
namei calls right.
to 1, hold on tight to your hat, and call recycle. The reason is
that we might pick up extra references such as from lookup and we
don't really care about tracking those. For example with p2k,
puffs in the kernel already does all the refcounting we could ever
dream of, and therefore it's left to the client and unnecessary.
To accommodate, give the rootvnode its own vnode op vector with a
simple lookup operation. This is used for looking up the file
system's device vnode instead of doing that directly in a homesmoked
namei().
shutdown). There are still problems with device access and a PR will be
filed.
- Kill checkalias(). Allow multiple vnodes to reference a single device.
- Don't play dangerous tricks with block vnodes to ensure that only one
vnode can describe a block device. Instead, prohibit concurrent opens of
block devices. As a bonus remove the unreliable code that prevents
multiple file system mounts on the same device. It's no longer needed.
- Track opens by vnode and by device. Issue cdev_close() when the last open
goes away, instead of abusing vnode::v_usecount to tell if the device is
open.
(or at least until wakeup) instead of immediately waking up.
In other words, fix this after it broke when another piece of the
code was fixed. Ain't programming fun?
smallest sparc pagesize. This should deal with the IOCPARM_MAX
build problem, which occurs on sparc because various models have
different page size, so it's run-time determined instead.
pooka says that rump doesn't use ioctl(), so the value is apparently
of no consequence.
- Lock processes, credentials, filehead etc correctly.
- Acquire a read hold on sysctl_treelock if only doing a query.
- Don't wire down the output buffer. It doesn't work correctly and the code
regularly does long term sleeps with it held - it's not worth it.
- Don't hold locks other than sysctl_lock while doing copyout().
- Drop sysctl_lock while doing copyout / allocating memory in a few places.
- Don't take kernel_lock for sysctl.
- Fix a number of bugs spotted along the way
can now be developed in userspace using puffs for development
(I hate emulators, they are annoyingly clumsy).
To e.g. mount psshfs using puffs-on-puffs, run fs/bin/syspuffs/syspuffs
with the regular mount_psshfs command line as an argument:
golem> ./syspuffs /usr/sbin/mount_psshfs ftp.netbsd.org:/pub /puffs
This will make the mount appear as usual, with the exception that the
requests will be passed through puffs both in the kernel and userspace:
ftp.netbsd.org:/pub on /puffs type puffs|p2k|puffs|psshfs
* I heard a wild rumor that vp_interlock is a mutex these days (hi ad!)
* init new locks (hi ad)
* observe that with simple_locks only deadlocks would be caught while
releasing unlocked locks would go unnoticed. make locking work (hi pooka)
- Reduce available SPL levels for hardware devices to none, vm, sched, high.
- Acquire kernel_lock only for interrupts at IPL_VM.
- Implement threaded soft interrupts.