Subject: puffs - Pass-to-Userspace Framework File System
To: None <>
From: Antti Kantee <>
List: current-users
Date: 10/23/2006 04:15:39
I just finished integrating my GSoC 2005 project (time flies when you're
having fun ...)

The ultimate goal is to facilitate easy, secure and controlled file
system creation as a userspace server.  But for now it's just a trivial
way to crash your system ... ermh.  Seriously though, it works, and
if you want to play around with it:

+ get latest sources
+ compile kernel with "file-system PUFFS" (*1)
+ MAKEDEV puffs
+ compile dtfs from src/share/example/puffs/dtfs (*2)
+ run it: ./dtfs /mnt
+ play around.. pray around.. wear amulet of life-saving, etc.
+ pkill dtfs (or umount /puffs for the same effect)

But for puffs to be of any real use other than just a slower-than-average
in-memory file system (*3), you need to implement something on top of it.
Documentation on this is forthcoming ;).  Although currently it can
be said that the programming interface is very much like the vfs/vnode
layer and that you can generally start by modifying dtfs: most of the fs
internal structure is in dtfs_subr.c, while dtfs_{vn,vfs}ops.c contains
what needs to read from and fed to libpuffs.

The interfaces provided by are not guaranteed to be stable in any way,
so if you upgrade your kernel, please fetch also the latest version of
the library (and vice versa) and recompile everything.

Nothing else is guaranteed to be stable either, though it seems to work
for purely artificial workloads.  Wouldn't dream of running it on a real
machine just yet, though.

That's it for now.  I've got plenty of "fun", fun and FUN stuff planned,
but more on that later.

  - antti

*1) No, didn't add it commented out to any kernel configs yet.  If you
    want to use it, you need to write so much code anyway that adding 18
    characters into a kernel config file shouldn't be the biggest barrier.
    We are talking about *really* experimental stuff, after all.

*2) Delectable Test File System.  or as the really really clued know,
    it's really the detrempe file system

*3) Funny though, it's not even really *that* slow.  Here's a comparison
    with our very own sharesrc.tgz against mfs:

sauce-diable:5:/puffs> time tar -zxf ~/sharesrc.tgz
0.435u 1.412s 0:08.03 22.9%     0+0k 1+0io 13pf+0w
sauce-diable:6:/puffs> time cp ~/sharesrc.tgz .
0.000u 0.018s 0:00.21 4.7%      0+0k 0+0io 0pf+0w
sauce-diable:7:/puffs> time rm -rf *
0.006u 0.131s 0:00.34 38.2%     0+0k 0+0io 0pf+0w
sauce-diable:10:/tmp> time tar -zxf ~/sharesrc.tgz
0.430u 0.911s 0:01.72 77.9%     0+0k 64+26243io 0pf+0w
sauce-diable:11:/tmp> time cp ~/sharesrc.tgz .
0.000u 0.026s 0:00.04 50.0%     0+0k 0+602io 0pf+0w
sauce-diable:12:/tmp> diff -ru usr /puffs/usr

(ok, I admit, that was my laptop, but judging by the time I should be
dreaming already ... or maybe I'm just braver than I look? ;)

And just as a teaser, here's the same untar onto my laptop hd (on cgd):
sauce-diable:6:~/temp/tst> time tar -zxf ~/sharesrc.tgz
0.440u 5.454s 0:26.22 22.4%     0+0k 68+19809io 0pf+0w

Antti Kantee <>                     Of course he runs NetBSD                
    "la qualité la plus indispensable du cuisinier est l'exactitude"