Commit Graph

91 Commits

Author SHA1 Message Date
pooka 0e278b287d Use rump_sys_pread/write instead of rump_sys_read/write to make I/O
from offset != 0 work again.

from Arnaud Ysmal
2008-05-29 12:03:52 +00:00
reinoud 5d5fb047a1 Make rump compile UDF correctly. Note that it won't work though since rump
needs to be compiled with thread support.
2008-05-14 20:13:05 +00:00
lukem 66176dfdff Rename MKPRIVATELIB to LIBISPRIVATE, to make it clearer that this is
a variable that is used by in-tree Makefiles to control behaviour.
(MKsomevar variables are generally intended to be controlled by the end-user)
2008-05-03 14:48:30 +00:00
pooka 01c429027f Workaround gcc -Wunitialized bug for -Osomething compilations.
PR lib/38385, Matthew Mondor
2008-04-08 08:25:49 +00:00
ad a9ca7a3734 Catch up with descriptor handling changes. See kern_descrip.c revision
1.173 for details.
2008-03-21 21:54:58 +00:00
pooka 546bf50253 Cache referenced rootvp in struct ukfs. Makes it possible to run
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).
2008-03-13 14:24:30 +00:00
pooka e8401439ac Implement all ukfs interfaces (except getdents, that's a bit more
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.
2008-03-12 21:37:15 +00:00
pooka b590aae6d8 Support chdir. This is useful for example when testing and not
wanting to stress namei() so much as test individual ops.
XXX: it should be implemented per calling thread, not per fs.
2008-03-12 14:49:19 +00:00
pooka 8ca4306537 Support multiple file systems within one process with ukfs by using
a "chroot" for each file system.
2008-03-12 11:17:33 +00:00
lukem 471f389be3 Add -I${LIBRUMPDIR} to fix objdir builds. 2008-03-12 05:11:51 +00:00
pooka 3f429ae81b Compile rump_syscalls, use them in a few places. 2008-03-11 22:57:26 +00:00
pooka a7ece3ec53 Backup some fixes for recent breakage from local tree. Also some
other improvements such as exporting the real kernel namei and
using that in ukfs instead of the homegrown heap'o hacks namei.
"etcetc".
2008-03-11 10:50:16 +00:00
pooka bc13687cf3 default owner to getuid() 2008-01-29 18:17:21 +00:00
pooka cc7f05eb50 Do puffs_fakecc instead of puffs_usethreads for now. 2008-01-28 11:52:38 +00:00
pooka 18e91c156a Don't fool around when recycling vnodes, simply override refcount
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.
2008-01-27 20:01:29 +00:00
pooka 67b0c1ab9c unlock vp in error branch 2008-01-27 19:19:42 +00:00
pooka fb3107360b Use vfs_subr.c from sys/kern. This brings differences in the vnode
life cycle between rump and a real kernel to a minimum.
2008-01-27 19:07:20 +00:00
pooka d7412d56b1 Introduce PUFFS_STACKSIZE_MIN to avoid overloading 0 and getting
a warning from the library when really wanting to say "just the
minimum, please".
2008-01-14 13:57:26 +00:00
pooka 72b3924d8b Set stacksize to minimum acceptable (two pages, one for cc, one
for actual stack) to mimic kernel stack size better.
2008-01-08 00:23:15 +00:00
pooka f8ff426bbb fix build for OBJDIR case. noticed by plenty 2008-01-02 22:01:41 +00:00
pooka 4f69d01d2f Add the ability to run puffs in userspace. This means that puffs
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
2008-01-02 18:15:12 +00:00
pooka 3c068d8021 fix vmlocking2 fallout:
* 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)
2008-01-02 15:44:03 +00:00
ad 4a780c9ae2 Merge vmlocking2 to head. 2008-01-02 11:48:20 +00:00
pooka ffd37c1db1 pass mmap to file systems 2008-01-01 22:31:42 +00:00
pooka 6db2b1c100 LFS_KERNEL_RFW 2007-12-13 16:08:12 +00:00
elad 021227aa78 Don't compile lfs_rfw.c, suggested by cube@. 2007-12-12 18:52:00 +00:00
pooka 21913eabe5 Rototill.
Ok, ok, a few more words about it: stop holding puffs_cc as a holy
value and passing it around to almost every possible place (popquiz:
which kernel variable does this remind you of?).  Instead, pass
the natural choice, puffs_usermount, and fetch puffs_cc via
puffs_cc_getcc() only in routines which actually need it.  This
not only simplifies code, but (thanks to the introduction of
puffs_cc_getcc()) enables constructs which weren't previously sanely
possible, say layering as a curious example.

There's still a little to do on this front, but this was the major
fs interface blast.
2007-11-30 19:02:28 +00:00
pooka 6a3d9a187d Remove "puffs_cid" from the puffs interface following l-removal
from the kernel vfs interfaces.  puffs_cc_getcaller(pcc) can be
used now should the same information be desired.
2007-11-27 11:31:17 +00:00
dogcow 1e02f40f0f fallout from the not-quite-complete curlwp removal.
I'm not sure why I had to monkey about with the includes to get VFS_SYNC to
reappear.
2007-11-27 09:14:21 +00:00
pooka 61e8303e9d Remove the "struct lwp *" argument from all VFS and VOP interfaces.
The general trend is to remove it from all kernel interfaces and
this is a start.  In case the calling lwp is desired, curlwp should
be used.

quick consensus on tech-kern
2007-11-26 19:01:26 +00:00
pooka 655af89222 Fix more uninitialized uses of variables.
noticed by lukasz.siemiradzki
2007-11-10 18:03:15 +00:00
pooka 55a3e632c4 remove accidentally committed debugging code 2007-11-07 15:51:07 +00:00
pooka 0a587be2cb Call buf_syncwait() after releasing a file system. 2007-11-07 12:08:45 +00:00
pooka 7331777bf0 default to rootnode mode 0777 2007-11-06 12:26:12 +00:00
pooka ef11b00de6 Update to new puffs_mainloop() signature. Forgot to do this yesterday.
noticed by Kurt Schreiner on current-users
2007-11-06 10:57:35 +00:00
pooka 85efd8ec20 set mask and dirmask to 0777 by default 2007-11-04 19:42:56 +00:00
pooka 2567179467 Remember to save errno before restoring it.
noticed by Lukasz on current-users
2007-11-04 17:21:08 +00:00
pooka 55ace5d0d5 Include bufq priority implementations also and link librump with
--whole-archive since the bufq priorities use link sets.
2007-10-31 17:53:38 +00:00
pooka 87f9ee4c42 Make it possible to run rumps multithreaded. This brings real
locking and makes it possible to run file systems which create
threads.  It also makes rump file system behaviour better match
file system behaviour in the kernel.
2007-10-31 15:57:19 +00:00
pooka eff8fdc9d1 Prevent recursion in INACTIVE -> vrecycle -> inactive -> ... 2007-10-27 19:36:34 +00:00
pooka 90f8810031 In threading where available. 2007-10-26 17:36:23 +00:00
pooka 4f8627af5f define _RUMPKERNEL 2007-10-26 10:44:27 +00:00
pooka f608ef6f7b Don't unmount file system when releasing ukfs - it's always already
unmounted at that point (or never was mounted in the first place).
2007-10-25 16:56:41 +00:00
pooka eb069641c1 call biooops sync from sync 2007-09-26 21:23:24 +00:00
pooka 38cdad643b check puffs_init() return value to squelch coverity CID 4568 2007-09-26 21:21:28 +00:00
pooka 1d4d5500dc -DFFS_EI 2007-09-24 01:31:07 +00:00
pooka c777421532 Expose namei. Some applications might want to call VOPs directly for
whatever reason and no need to make them implement their own copy of
namei, fun though it might be.
2007-09-18 19:59:21 +00:00
pooka dffee5c423 fix ukfs_readlink() to be of type ssize_t 2007-09-11 00:42:16 +00:00
pooka 2c096f9eae "proper" return value handling 2007-09-02 13:55:27 +00:00
pooka e61b08e4b2 fix assert 2007-09-02 13:54:21 +00:00