Commit Graph

61 Commits

Author SHA1 Message Date
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
pooka
a1c82d9717 * Give rump_vfs_root() the option of returning the vnode unlocked.
* initialize syncdelay
* implement io_sync handler
2007-09-02 13:29:50 +00:00
pooka
420d610664 include bsd.own.mk for NETBSDSRCDIR
this time noticed by mjf
2007-09-02 12:00:12 +00:00
pooka
396d174477 allow to set ffs options with command-line -o
XXX: can't mix puffs and ffs options in one -o foo,bar
2007-08-27 23:15:26 +00:00
pooka
1cf445da3e Don't play rename & typecast games with kauth_cred_t, but rather
declare the type in rump.h only if necessary with the help of ifdef
magic.
2007-08-25 10:22:31 +00:00
pooka
8b0f2e2191 Support nfs exporting file systems. 2007-08-23 14:37:40 +00:00
pooka
faafe7834a Implement credentials. Access control is now similar to if the file
system were run in the kernel.
2007-08-21 13:57:17 +00:00
pooka
d6b288093a g/c bit about r/w && bsize < PAGE_SIZE, not a concern any more 2007-08-20 23:01:51 +00:00
pooka
3c2765f1a3 Hide NetBSD kernel headers completely from ukfs. This includes creating
accessors for:
  * struct mount & VFS ops
  * struct uio
  * struct vnode
  * struct vattr

and some namespace games for:
  * namei flags
  * VOPs
  * enum vtype

Also, split rump services into two categories: library private and public
(rump_private.h and rump.h, respectively).

As a result, it is now possible to compile and use the NetBSD kernel
file systems on Linux (and probably other systems too with very
little work), although the makefiles need a bit of work to make it
a pleasureable experience.
2007-08-20 15:58:13 +00:00
pooka
34980d5637 Namespace management: do not call VOP_FOO directly from ukfs or
p2k, but rather make the calls go through librump.  This avoids
having to include NetBSD kernel headers in userspace programs.
Stay tuned for some more mods of the same sort ...
2007-08-19 21:24:21 +00:00
pooka
29e91e1a8c * fix build if using obj dirs
* this shouldn't use rump directly
2007-08-19 20:06:58 +00:00
pooka
8e851258d0 * support symlink & readlink
* some reorg & bugfixage
2007-08-19 15:57:38 +00:00
pooka
8d4ab68505 always define __NetBSD__ 2007-08-19 14:47:24 +00:00
pooka
6c71c22a44 Add "file system console", which is meant eventually to become a
"console" to a file system, i.e. a tool for mounting any file system
image supported by rump and executing various commands on it.
Currently it's just a linear set of calls to ukfs routines and
serves mainly as a simple test program and ukfs usage example.
2007-08-16 19:48:31 +00:00
pooka
71d88cd835 use UKFS_UIOINIT 2007-08-16 19:43:09 +00:00
pooka
55a47971a5 Actually using passed parameters instead of hardcoded ones makes
a macro work better ...
2007-08-16 19:42:50 +00:00
pooka
b926b490ec Add routines for pure userspace file system operation
(i.e. no kernel involvement), namely:
* create, mknod, remove, mknod, rmdir, getdents, read, write, and link

Still obviously missing a few, but this is a start (I'm also searching
for the blessed orb of code quality, maybe someone has seen it?).
2007-08-16 19:37:18 +00:00
pooka
85a8716f91 locking fixes 2007-08-16 16:17:42 +00:00
pooka
56accd1ffe enable UFS_DIRHASH 2007-08-15 22:22:14 +00:00
pooka
ba8f4f0ea5 support VOP_LINK 2007-08-15 16:56:44 +00:00
pooka
c360a79960 * split userspace file system access into two separate libraries:
+ libp2k: the interface between libpuffs and vfs/vop
  + libukfs: generic user kernel file system library, usable
	     independent of libp2k and/or puffs
* use file system name (MOUNT_XYZ) instead of vfsops pointer to
  mount file system
2007-08-14 15:56:15 +00:00
pooka
ea312e5c20 udf support 2007-08-14 13:56:58 +00:00
pooka
7ed98ea083 Add locking assertions to check that file systems comply with the
vnode locking protocol.
2007-08-13 13:52:45 +00:00
pooka
e09047007b lock and unlock vnodes according to locking protocol 2007-08-13 12:20:55 +00:00
pooka
643e56125f * move rump_vopwrite_fault() into history - we now support the file
system faulting in pages if it does e.g. fragment reallocation
* get rid of rumpvm_findpage() and always use uvm_pagelookup()
* determine a vnode's cleanness by flagging it as being on the work
  list if we "take" a write fault and removing it from the worklist
  once pages are flushed.  There is no work list here, but at least
  there is symmetry with the kernel.
2007-08-11 17:52:12 +00:00
pooka
36c0b176cc Fix it a bit & wait for the dust to settle. Also, enable UBC by default.
ffs in userspace on top of puffs/p2k/rump is now stable enough to
host a make -j4 kernel build (well, at least my kernel build ...
but, yes, I am currently running that kernel on my desktop)
2007-08-09 13:53:36 +00:00
pooka
c1649dbc9e * fix symlink
* actually call a couple of VOPs
2007-08-09 11:59:16 +00:00
pooka
58b908ae12 Flush file's pages in inactive (they'll still be kept in the kernel
page page if it's enabled).  This very easily takes care of memory
management problems except for large files.
2007-08-09 09:54:36 +00:00
pooka
37698f56d6 Enable lfs in r/o mode, i.e. does not start lfs_clean-nerd and do
any real trickery.  Unfortunately this was the easy part; r/w
support is going to make ascending naked, blind, illiterate, without
food and as an atheist look trivial.
2007-08-09 09:19:30 +00:00
pooka
dfeea3487b Don't need to use MNT_FORCE here (my original test image was a bit
b0rked), but do stuff MNT_RDONLY down the file system's throat.
2007-08-09 08:33:25 +00:00
pooka
1f47971378 pass mntflags to puffs_mount() 2007-08-08 22:45:51 +00:00