development
Hey,
How do you guys write your file system? Do you compile and reboot, or use an emulator?
Quoted 4 lines · Grant Miner
Hey,
How do you guys write your file system? Do you compile and reboot, or use an emulator?
We use UML for everything it can be used for.
Signature · 1 line
Hans
i was just thinking about this the other day.
Quoted 1 line · Hans Reiser
We use UML for everything it can be used for.
what about putting the core code in a lib and using a file for storage? once it stabilizes, remove the userland stuff and hook it up to the vfs. actually, you could write it all for the vfs and the blk layer. just emulated them in userspace. the app could load the lib and call the vfs entry points. the core could use routines in a blkemu.c module that would translate them to regular read/write calls.
Signature · 2 lines
Tom Vier <[email protected]> DSA Key ID 0xE6CB97DA
Quoted 9 lines · Tom Vier
Quoted 1 line · Hans Reiser
We use UML for everything it can be used for.
what about putting the core code in a lib and using a file for storage? once it stabilizes, remove the userland stuff and hook it up to the vfs. actually, you could write it all for the vfs and the blk layer. just emulated them in userspace. the app could load the lib and call the vfs entry points. the core could use routines in a
blkemu.cmodule that would translate them to regular read/write calls.
Except UML already "emulates" the VM, threads, locking, etc perfectly in user space. There is basically no point in trying to create an emulator better than UML, since for filesystem and other "non-hardware" kernel development it is a perfect kernel emulator. The only thing you don't (currently) get is SMP support, so no spinlocks, etc.
Also, with just a simple library you can't really run applications against it unless you also compile the applications where the library replaces the stdio and normal Unix IO calls.
Cheers, Andreas
--
Andreas Dilger
http://sourceforge.net/projects/ext2resize/
http://www-mddsp.enel.ucalgary.ca/People/adilger/
Tom Vier wrote on Tue, 6 Jan 2004 21:23:30 -0500:
Quoted 5 lines · Hans Reiser
Quoted 1 line
We use UML for everything it can be used for.
what about putting the core code in a lib and using a file for storage? once it stabilizes, remove the userland stuff and hook it up to the vfs. [...]
I just use lots of dprintf statements to write debugging messages out to a serial port and a log file, and avoid writing buggy code in the first place (lots of sanity checks, etc). But that was for a fancy RAM file system, a one person project, not something as big as ReiserFS. I also had a user level file system test program which was useful for comparing how different file systems handled, well, just about everything. Old screen shot at http://web.ncf.ca/au829/BeOS/AGMSRAMFSMounter.screen.gif
Admittedly I did develop some components in user-land, like the pattern matching code or the AVL trees. But most debugging (there wasn't much) just needed print statements. I also know of other people that use a VFS simulator / test harness for their file system code. But that's on BeOS so it won't be too useful for Unix style development.
- Alex