[H-GEN] Podfuk
Jason Henry Parker
jasonp at uq.net.au
Sun Jan 9 07:03:43 EST 2000
[ Humbug *General* list - semi-serious discussions about Humbug and ]
[ Unix-related topics. Please observe the list's charter. ]
All,
I found this little gem after adding network block device support to
my kernel[1].
The name comes from ``POrtable Dodgy Filesystems in Userland
(hacK!)'', which apparently means something like ``fiddle'' in Czech,
but I prefer the imagery invoked when you read it in English. :)
As you might have guessed, podfuk provides user-space kernels, sort of
like mach or something, by pretending to be coda venus cache manager.
Why would you want to do this? The author gives an example:
pavel at Elf:/$ cd "/tmp/unarj241a.tar.gz#utar/unarj241a"/
pavel at Elf:/tmp/unarj241a.tar.gz#utar/unarj241a$ ls
Makefile os2unarj.mak tccunarj.mak unarj.doc
Makefile.orig patch241a technote.doc unarj.exe
decode.c qclunarj.mak unarj.c unarj.h
environ.c readme.doc unarj.def unarj.h.orig
pavel at Elf:/tmp/unarj241a.tar.gz#utar/unarj241a$ cd /tmp
pavel at Elf:/tmp$ head mc.diff.gz#ugz
--- /dev/null Sun Jun 2 15:30:20 1996
+++ mmc/vfs/shared.c Mon Mar 30 23:41:55 1998
@@ -0,0 +1,267 @@
The examples I've seen seem to indicate that tar, gzip, arj, and ftp
filesystems are available.
That's pretty nifty, but not the end. Not by a long shot. There's a
kernel patch required, and at the top of podfuk.c, we see this:
#if 0
ifdef notdef
*
* POrtable Dodgy Filesystems in Userland (this used to be hacK!)
* alias podfuk (v2)
...
* Notice this file is *evil*. It is both valid c source and working
* Makefile. You might want to ln -s podfuk.c Makefile.
...
endif
...(makefile stuff)...
ifdef donotdefine
#endif
...(C source file stuff)...
/* Coda/Venus in a nutshell:
* Coda is a filesystem, lives in the kernel
* Venus is an app; podfuk is a replacement for venus
* When a coda mount needs service, it sends a message
* up to podfuk through a pipe
* Coda/Podfuk both open /dev/cfs0 and make ioctl calls
* Message includes ViceFid (coda file/dir handle)
* which is: u32 volume-id, u32 node-id, u32 unique-num
* Each file has an attribute struct: very similar to inode
*
* Typ sequence of calls to podfuk from coda:
* file read: access(), open(), close()
* (the read() is done through the local file)
* dir listing: access(), open(), lookup(), access(), close()
* file write: lookup(file), access(parent), create(file), getattr(),
* open(), close(), setattr()
...
/* Leave this in place - this is here so that code still is valid
Makefile. */
#if 0
endif
#endif
Scary.
See http://atrey.karlin.mff.cuni.cz/~pavel/podfuk/podfuk.html for more
information; be sure to have a look at some of the stuff this guy is
doing.
[1] : Why? Why not?
--
____
\ _/__ ``When the RNG hands you a lemon, #apply it and
\X / see if you can make invisible ink or something.''
\/ -- Joel Gluth on rec.games.roguelike.nethack
--
* This is list (humbug) general handled by majordomo at lists.humbug.org.au .
* Postings to this list are only accepted from subscribed addresses of
* lists 'general' or 'general-post'.
More information about the General
mailing list