[Tux3] we can mount tux3 in kernel

Daniel Phillips phillips at phunq.net
Sat Nov 22 14:10:01 PST 2008

On Saturday 22 November 2008 00:34, OGAWA Hirofumi wrote:
> Hi,
> I've hacked fs/tux3/. The following tarball is patches for kernel, and
> copy of fs/tux3/.  With it, now we can mount tux3, although almost all
> operations don't work :)
>    http://userweb.kernel.org/~hirofumi/tux3-hack.tar.gz
> I know it doesn't provide ->clean_inode, so we are leaking some
> memory. Well, much work is remaining, enjoy.

It's beautiful.  To try it, I made a filesystem under fuse:

   cd tux3/user
   make mkfs
   echo hello world | ./tux3 write testdev hello
   mv testdev /tmp

Then I compiled tux3 with your latest hack under uml:

   cd /src/linux-
   make linux ARCH=um
   ./linux ubda=/src/zuma/root ubdb=/src/testdev

And running under uml:

   ./linux ubda=/src/zuma/root ubdb=/src/testdev
   mount -ttux3 /dev/ubdb /mnt
   ls /mnt
   <lots of tux3 trace output>
   total 4
   -rw-r--r--    1 1001     1001           12 Nov 22 22:08 hello

Wow, there is my file!  It has the right date and the right uid.  I did
not try to cat it because I know there is still work to do there.  But
it is very close.  (Anyone else who wants to try this can get my uml
root filesystem and .config from me.)

I say we check your "hack" in and continue with it, in fact I already


Our userspace tux3 is doing real work for us now, isn't it?  Now I need
to add more of the common files to tux3/user/kernel.  In fact, why not
have all the files of fs/tux3 there, and then we make tux3/user
source-include the common ones.  So we can just diff/copy all the files
between user/kernel and fs/tux3 and keep them exactly in sync.

I will move my experimental handle work to fs/junkfs, to develop it
separtely and be able to submit the diff as a single post to lkml for
comment.  I think the handle approach is heading in the right direction
and will be a real improvement in clarity, as well as reducing cpu and
cache pressure a little.

But for now, sb-bread is working fine, and we can hack a variant to work
in file page cache.  Later, if the handles approach is working well, it
will not be hard to convert over. The basic model is the same as
getblk/bread and we already have nearly all that functionality wrapped.
To get ready, we probably want to wrap sb-bread inside blockread().



Tux3 mailing list
Tux3 at tux3.org

More information about the Tux3 mailing list